Signed-off-by: Jerin Jacob <jerin.ja...@caviumnetworks.com>
---
 include/odp/api/rwlock.h                           | 12 ------
 .../linux-generic/include/odp/plat/rwlock_types.h  | 45 ++++++++++++++++++++++
 platform/linux-generic/include/odp/rwlock.h        |  2 +
 3 files changed, 47 insertions(+), 12 deletions(-)
 create mode 100644 platform/linux-generic/include/odp/plat/rwlock_types.h

diff --git a/include/odp/api/rwlock.h b/include/odp/api/rwlock.h
index 950b83a..233e471 100644
--- a/include/odp/api/rwlock.h
+++ b/include/odp/api/rwlock.h
@@ -13,8 +13,6 @@
  * ODP RW Locks
  */
 
-#include <odp/atomic.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -28,16 +26,6 @@ extern "C" {
  *  @{
  */
 
-/**
- * The odp_rwlock_t type.
- */
-typedef struct {
-       odp_atomic_u32_t cnt; /**< @private lock count
-                               0 lock not taken
-                               -1 write lock taken
-                               >0 read lock(s) taken */
-} odp_rwlock_t;
-
 
 /**
  * Initialize a reader/writer lock.
diff --git a/platform/linux-generic/include/odp/plat/rwlock_types.h 
b/platform/linux-generic/include/odp/plat/rwlock_types.h
new file mode 100644
index 0000000..0adae5a
--- /dev/null
+++ b/platform/linux-generic/include/odp/plat/rwlock_types.h
@@ -0,0 +1,45 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP rwlock
+ */
+
+#ifndef ODP_RWLOCK_TYPES_H_
+#define ODP_RWLOCK_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/atomic.h>
+
+/** @addtogroup odp_synchronizers
+ *  @{
+ */
+
+/**
+ * The odp_rwlock_t type.
+ */
+typedef struct {
+       odp_atomic_u32_t cnt; /**< @private lock count
+                               0 lock not taken
+                               -1 write lock taken
+                               >0 read lock(s) taken */
+} odp_rwlock_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/include/odp/rwlock.h 
b/platform/linux-generic/include/odp/rwlock.h
index 06320f6..ca88ff7 100644
--- a/platform/linux-generic/include/odp/rwlock.h
+++ b/platform/linux-generic/include/odp/rwlock.h
@@ -17,6 +17,8 @@
 extern "C" {
 #endif
 
+#include <odp/plat/rwlock_types.h>
+
 /** @ingroup odp_synchronizers
  *  @{
  */
-- 
2.1.0


_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to