aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2014-12-15 19:09:46 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-12-16 01:26:03 +0300
commit835be05f8f19561e91555a31ca18b9d3f447695b (patch)
treefbcf875015ac81819806a2eca3d09377f5ecb23c /platform/linux-generic
parent7e924cfb0b230795e4f372cdb0d57fb2e1141732 (diff)
api: buffer/shm: prevent circular dependencies
Move shared memory and buffer pool handles to odp_platform_types.h to allow ODP types cross-references. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r--platform/linux-generic/include/api/odp_buffer_pool.h3
-rw-r--r--platform/linux-generic/include/api/odp_platform_types.h11
-rw-r--r--platform/linux-generic/include/api/odp_shared_memory.h10
3 files changed, 12 insertions, 12 deletions
diff --git a/platform/linux-generic/include/api/odp_buffer_pool.h b/platform/linux-generic/include/api/odp_buffer_pool.h
index 30b83e0d2..c12d71822 100644
--- a/platform/linux-generic/include/api/odp_buffer_pool.h
+++ b/platform/linux-generic/include/api/odp_buffer_pool.h
@@ -32,9 +32,6 @@ extern "C" {
/** Maximum queue name lenght in chars */
#define ODP_BUFFER_POOL_NAME_LEN 32
-/** Invalid buffer pool */
-#define ODP_BUFFER_POOL_INVALID 0
-
/**
* Create a buffer pool
*
diff --git a/platform/linux-generic/include/api/odp_platform_types.h b/platform/linux-generic/include/api/odp_platform_types.h
index 4db47d32c..68d0c55d0 100644
--- a/platform/linux-generic/include/api/odp_platform_types.h
+++ b/platform/linux-generic/include/api/odp_platform_types.h
@@ -26,6 +26,9 @@
/** ODP Buffer pool */
typedef uint32_t odp_buffer_pool_t;
+/** Invalid buffer pool */
+#define ODP_BUFFER_POOL_INVALID (0)
+
/** ODP buffer */
typedef uint32_t odp_buffer_t;
@@ -65,6 +68,14 @@ typedef uint32_t odp_pktio_t;
#define ODP_PKTIO_ANY ((odp_pktio_t)~0)
/**
+ * ODP shared memory block
+ */
+typedef uint32_t odp_shm_t;
+
+/** Invalid shared memory block */
+#define ODP_SHM_INVALID 0
+
+/**
* @}
*/
diff --git a/platform/linux-generic/include/api/odp_shared_memory.h b/platform/linux-generic/include/api/odp_shared_memory.h
index 26e208b9a..f70db5a62 100644
--- a/platform/linux-generic/include/api/odp_shared_memory.h
+++ b/platform/linux-generic/include/api/odp_shared_memory.h
@@ -20,6 +20,7 @@ extern "C" {
#include <odp_std_types.h>
+#include <odp_platform_types.h>
/** @defgroup odp_shared_memory ODP SHARED MEMORY
* Operations on shared memory.
@@ -38,15 +39,6 @@ extern "C" {
#define ODP_SHM_PROC 0x2 /**< Share with external processes */
/**
- * ODP shared memory block
- */
-typedef uint32_t odp_shm_t;
-
-/** Invalid shared memory block */
-#define ODP_SHM_INVALID 0
-
-
-/**
* Shared memory block info
*/
typedef struct odp_shm_info_t {