diff options
author | Bill Fischofer <bill.fischofer@linaro.org> | 2015-09-03 13:59:22 -0500 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-09-03 22:57:06 +0300 |
commit | 3afd410eaa2e55f47b42508ac0b86390a7b4c711 (patch) | |
tree | aa62d50e24e1cd44f20afabb2de70cdf95127e3c /platform/linux-generic/include/odp_queue_internal.h | |
parent | f1bb82d7e74f5f2f6f7973bade0649b000e69d99 (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_queue_internal.h')
-rw-r--r-- | platform/linux-generic/include/odp_queue_internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/linux-generic/include/odp_queue_internal.h b/platform/linux-generic/include/odp_queue_internal.h index 0f30965c1..19a0f0731 100644 --- a/platform/linux-generic/include/odp_queue_internal.h +++ b/platform/linux-generic/include/odp_queue_internal.h @@ -19,6 +19,7 @@ extern "C" { #endif #include <odp/queue.h> +#include <odp_forward_typedefs_internal.h> #include <odp_buffer_internal.h> #include <odp_align_internal.h> #include <odp/packet_io.h> @@ -86,10 +87,10 @@ struct queue_entry_s { odp_atomic_u64_t sync_out; }; -typedef union queue_entry_u { +union queue_entry_u { struct queue_entry_s s; uint8_t pad[ODP_CACHE_LINE_SIZE_ROUNDUP(sizeof(struct queue_entry_s))]; -} queue_entry_t; +}; queue_entry_t *get_qentry(uint32_t queue_id); |