diff mbox

[v2,14/18] Split out platform-specific part of odp_spinlock.h

Message ID 1403027720-9738-15-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_spinlock.h                             |    6 ++---
 platform/linux-generic/include/plat/odp_spinlock.h |   27 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_spinlock.h
diff mbox

Patch

diff --git a/include/odp_spinlock.h b/include/odp_spinlock.h
index 52b7a71..e155ca3 100644
--- a/include/odp_spinlock.h
+++ b/include/odp_spinlock.h
@@ -20,14 +20,12 @@  extern "C" {
 
 
 #include <odp_std_types.h>
-
+#include <plat/odp_spinlock.h>
 
 /**
  * ODP spinlock
  */
-typedef struct odp_spinlock_t {
-	volatile int lock;  /**< @private Lock */
-} odp_spinlock_t;
+typedef plat_odp_spinlock_t odp_spinlock_t;
 
 
 /**
diff --git a/platform/linux-generic/include/plat/odp_spinlock.h b/platform/linux-generic/include/plat/odp_spinlock.h
new file mode 100644
index 0000000..f980a3d
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_spinlock.h
@@ -0,0 +1,27 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP spinlock
+ */
+
+#ifndef ODP_SPINLOCK_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#include <odp_std_types.h>
+
+/**
+ * ODP spinlock
+ */
+typedef struct odp_spinlock_t {
+	volatile int lock;  /**< @private Lock */
+} plat_odp_spinlock_t;
+
+#endif