diff mbox

[RFC,13/17] Split out platform-specific part of odp_spinlock.h

Message ID 1398685276-4610-14-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_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 f25d068..7dd59be 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