diff mbox

[RFC,04/17] Split out platform-specific part of odp_barrier.h

Message ID 1398685276-4610-5-git-send-email-taras.kondratiuk@linaro.org
State RFC
Headers show

Commit Message

Taras Kondratiuk April 28, 2014, 11:41 a.m. UTC
---
 include/odp_barrier.h                             |   16 ++----------
 platform/linux-generic/include/plat/odp_barrier.h |   28 +++++++++++++++++++++
 2 files changed, 30 insertions(+), 14 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 4547a26..fcd8575 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;
 
 
 /**
@@ -48,16 +44,8 @@  void odp_barrier_init_count(odp_barrier_t *barrier, int count);
  */
 void odp_barrier_sync(odp_barrier_t *barrier);
 
-
 #ifdef __cplusplus
 }
 #endif
 
 #endif
-
-
-
-
-
-
-
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