Signed-off-by: Jerin Jacob <jerin.ja...@caviumnetworks.com> --- include/odp/api/barrier.h | 7 +--- platform/linux-generic/include/odp/barrier.h | 1 + .../linux-generic/include/odp/plat/barrier_types.h | 47 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 platform/linux-generic/include/odp/plat/barrier_types.h
diff --git a/include/odp/api/barrier.h b/include/odp/api/barrier.h index 35f0981..28310ba 100644 --- a/include/odp/api/barrier.h +++ b/include/odp/api/barrier.h @@ -18,20 +18,15 @@ extern "C" { #endif - /** @addtogroup odp_synchronizers * Synchronize threads. * @{ */ /** + * @typedef odp_barrier_t * ODP thread synchronization barrier */ -typedef struct odp_barrier_t { - uint32_t count; /**< @private Thread count */ - odp_atomic_u32_t bar; /**< @private Barrier counter */ -} odp_barrier_t; - /** * Initialize barrier with thread count. diff --git a/platform/linux-generic/include/odp/barrier.h b/platform/linux-generic/include/odp/barrier.h index d63c219..7ea5a6b 100644 --- a/platform/linux-generic/include/odp/barrier.h +++ b/platform/linux-generic/include/odp/barrier.h @@ -19,6 +19,7 @@ extern "C" { #include <odp/atomic.h> #include <odp/plat/shared_memory_types.h> +#include <odp/plat/barrier_types.h> /** @ingroup odp_synchronizers * @{ diff --git a/platform/linux-generic/include/odp/plat/barrier_types.h b/platform/linux-generic/include/odp/plat/barrier_types.h new file mode 100644 index 0000000..c8c978d --- /dev/null +++ b/platform/linux-generic/include/odp/plat/barrier_types.h @@ -0,0 +1,47 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + + +/** + * @file + * + * ODP barrier + */ + +#ifndef ODP_BARRIER_TYPES_H_ +#define ODP_BARRIER_TYPES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <odp/std_types.h> +#include <odp/atomic.h> + +/** + * @internal + * ODP thread synchronization barrier + */ +struct odp_barrier_s { + uint32_t count; /**< Thread count */ + odp_atomic_u32_t bar; /**< Barrier counter */ +}; + +/** @addtogroup odp_synchronizers + * @{ + */ + +typedef struct odp_barrier_s odp_barrier_t; + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif -- 2.1.0 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org http://lists.linaro.org/mailman/listinfo/lng-odp