aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/include/odp_buffer_internal.h
diff options
context:
space:
mode:
authorBill Fischofer <bill.fischofer@linaro.org>2015-09-03 13:59:22 -0500
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-09-03 22:57:06 +0300
commit3afd410eaa2e55f47b42508ac0b86390a7b4c711 (patch)
treeaa62d50e24e1cd44f20afabb2de70cdf95127e3c /platform/linux-generic/include/odp_buffer_internal.h
parentf1bb82d7e74f5f2f6f7973bade0649b000e69d99 (diff)
linux-generic: general: add odp_forward_typedefs to resolve clang issuev1.3.0.0
With the addition of ordered queues, there is a circular typedef relationship between odp_queue_internal.h and odp_buffer_internal.h. The standard forward declaration technique that GCC accepts is strictly not acceptable to C99 and is flagged by clang. The solution is to create a common header file that can contain these forward declarations. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/odp_buffer_internal.h')
-rw-r--r--platform/linux-generic/include/odp_buffer_internal.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h
index 6badebabf..4cacca10b 100644
--- a/platform/linux-generic/include/odp_buffer_internal.h
+++ b/platform/linux-generic/include/odp_buffer_internal.h
@@ -29,7 +29,7 @@ extern "C" {
#include <odp/byteorder.h>
#include <odp/thread.h>
#include <odp/event.h>
-
+#include <odp_forward_typedefs_internal.h>
#define ODP_BITSIZE(x) \
((x) <= 2 ? 1 : \
@@ -101,13 +101,8 @@ typedef union odp_buffer_bits_t {
};
} odp_buffer_bits_t;
-/* forward declaration */
-struct odp_buffer_hdr_t;
-union queue_entry_u;
-typedef union queue_entry_u queue_entry_t;
-
/* Common buffer header */
-typedef struct odp_buffer_hdr_t {
+struct odp_buffer_hdr_t {
struct odp_buffer_hdr_t *next; /* next buf in a list--keep 1st */
union { /* Multi-use secondary link */
struct odp_buffer_hdr_t *prev;
@@ -144,7 +139,7 @@ typedef struct odp_buffer_hdr_t {
queue_entry_t *target_qe; /* ordered queue target */
uint64_t sync; /* for ordered synchronization */
};
-} odp_buffer_hdr_t;
+};
/** @internal Compile time assert that the
* allocator field can handle any allocator id*/