diff mbox

[PATCHv6,1/7] api: buffer/shm: prevent circular dependencies

Message ID 1418663392-28354-2-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit 835be05f8f19561e91555a31ca18b9d3f447695b
Headers show

Commit Message

Taras Kondratiuk Dec. 15, 2014, 5:09 p.m. UTC
From: Bill Fischofer <bill.fischofer@linaro.org>

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>
---
 platform/linux-generic/include/api/odp_buffer_pool.h    |  3 ---
 platform/linux-generic/include/api/odp_platform_types.h | 11 +++++++++++
 platform/linux-generic/include/api/odp_shared_memory.h  | 10 +---------
 3 files changed, 12 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_buffer_pool.h b/platform/linux-generic/include/api/odp_buffer_pool.h
index 30b83e0..c12d718 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 4db47d3..68d0c55 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 26e208b..f70db5a 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 {