diff mbox

[v2,05/18] Split out platform-specific part of odp_barrier.h

Message ID 1403027720-9738-6-git-send-email-taras.kondratiuk@linaro.org
State RFC
Headers show

Commit Message

Taras Kondratiuk June 17, 2014, 5:55 p.m. UTC
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 include/odp_barrier.h                             |    8 ++----
 platform/linux-generic/include/plat/odp_barrier.h |   28 +++++++++++++++++++++
 2 files changed, 30 insertions(+), 6 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_barrier.h
diff mbox

Patch

diff --git a/include/odp_barrier.h b/include/odp_barrier.h
index a7b3215..68065d0 100644
--- a/include/odp_barrier.h
+++ b/include/odp_barrier.h
@@ -20,16 +20,12 @@  extern "C" {
 
 
 #include <odp_std_types.h>
-#include <odp_atomic.h>
-
+#include <plat/odp_barrier.h>
 
 /**
  * ODP execution barrier
  */
-typedef struct odp_barrier_t {
-	int              count;  /**< @private Thread count */
-	odp_atomic_int_t bar;    /**< @private Barrier counter */
-} odp_barrier_t;
+typedef plat_odp_barrier_t odp_barrier_t;
 
 
 /**
diff --git a/platform/linux-generic/include/plat/odp_barrier.h b/platform/linux-generic/include/plat/odp_barrier.h
new file mode 100644
index 0000000..f976ef5
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_barrier.h
@@ -0,0 +1,28 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP execution barriers
+ */
+
+#ifndef ODP_BARRIER_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#include <odp_atomic.h>
+
+/**
+ * ODP execution barrier
+ */
+typedef struct odp_barrier_t {
+	int              count;  /**< @private Thread count */
+	odp_atomic_int_t bar;    /**< @private Barrier counter */
+} plat_odp_barrier_t;
+
+#endif