@@ -23,12 +23,12 @@ extern "C" {
#include <odp_atomic.h>
/** @addtogroup odp_synchronizers
- * Barrier between threads.
+ * Synchronize threads.
* @{
*/
/**
- * ODP execution barrier
+ * ODP thread synchronization barrier
*/
typedef struct odp_barrier_t {
uint32_t count; /**< @private Thread count */
@@ -37,20 +37,24 @@ typedef struct odp_barrier_t {
/**
- * Init barrier with thread count
+ * Initialize barrier with thread count.
*
- * @param barrier Barrier
- * @param count Thread count
+ * @param[out] p_barr Pointer to a barrier variable
+ * @param[in] count Thread count
*/
-void odp_barrier_init(odp_barrier_t *barrier, int count);
+void odp_barrier_init(odp_barrier_t *p_barr, int count);
/**
- * Synchronise thread execution on barrier
+ * Synchronize thread execution on barrier.
+ * Wait for all threads to arrive at the barrier until they are let loose again.
+ * Threads will block (spin) until the last thread has arrived at the barrier.
+ * All memory operations before the odp_barrier_wait() call will be visible
+ * to all threads when they leave the barrier.
*
- * @param barrier Barrier
+ * @param[in,out] p_barr Pointer to a barrier variable
*/
-void odp_barrier_wait(odp_barrier_t *barrier);
+void odp_barrier_wait(odp_barrier_t *p_barr);
/**
* @}
Signed-off-by: Ola Liljedahl <ola.liljedahl@linaro.org> --- Update doxygen comments, renaming of function params. platform/linux-generic/include/api/odp_barrier.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)