new file mode 100644
@@ -0,0 +1,66 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODPDRV execution barriers
+ */
+
+#ifndef ODPDRV_API_BARRIER_H_
+#define ODPDRV_API_BARRIER_H_
+#include <odp/visibility_begin.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup odpdrv_barrier ODPDRV BARRIER
+ * Thread execution and memory ordering barriers.
+ *
+ * @details
+ * <b> Thread execution barrier (odpdrv_barrier_t) </b>
+ *
+ * Thread execution barrier synchronizes a group of threads to wait on the
+ * barrier until the entire group has reached the barrier.
+ * @{
+ */
+
+/**
+ * @typedef odpdrv_barrier_t
+ * ODPDRV thread synchronization barrier
+ */
+
+/**
+ * Initialize barrier with thread count.
+ *
+ * @param barr Pointer to a barrier variable
+ * @param count Thread count
+ */
+void odpdrv_barrier_init(odpdrv_barrier_t *barr, int count);
+
+/**
+ * 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 odpdrv_barrier_wait() call will be visible
+ * to all threads when they leave the barrier.
+ *
+ * @param barr Pointer to a barrier variable
+ */
+void odpdrv_barrier_wait(odpdrv_barrier_t *barr);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <odp/visibility_end.h>
+#endif
@@ -65,6 +65,7 @@ odpdrvspecincludedir= $(includedir)/odp/drv/spec
odpdrvspecinclude_HEADERS = \
$(top_srcdir)/include/odp/drv/spec/align.h \
$(top_srcdir)/include/odp/drv/spec/atomic.h \
+ $(top_srcdir)/include/odp/drv/spec/barrier.h \
$(top_srcdir)/include/odp/drv/spec/byteorder.h \
$(top_srcdir)/include/odp/drv/spec/compiler.h \
$(top_srcdir)/include/odp/drv/spec/spinlock.h \
Based on API interface file. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> --- include/odp/drv/spec/barrier.h | 66 ++++++++++++++++++++++++++++++++++++++++++ platform/Makefile.inc | 1 + 2 files changed, 67 insertions(+) create mode 100644 include/odp/drv/spec/barrier.h -- 2.7.4