@@ -17,15 +17,12 @@
extern "C" {
#endif
+#include <plat/odp_rwlock.h>
+
/**
* The odp_rwlock_t type.
- * write lock count is -1,
- * read lock count > 0
*/
-typedef struct {
- volatile int32_t cnt; /**< -1 Write lock,
- > 0 for Read lock. */
-} odp_rwlock_t;
+typedef plat_odp_rwlock_t odp_rwlock_t;
/**
new file mode 100644
@@ -0,0 +1,26 @@
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_RWLOCK_H_
+#error This file should be included only into corresponding top level header
+#else
+
+/**
+ * @file
+ *
+ * ODP RW Locks
+ */
+
+/**
+ * write lock count is -1,
+ * read lock count > 0
+ */
+typedef struct {
+ volatile int32_t cnt; /**< -1 Write lock,
+ > 0 for Read lock. */
+} plat_odp_rwlock_t;
+
+#endif /* ODP_RWLOCK_H_ */
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> --- include/odp_rwlock.h | 9 +++----- platform/linux-generic/include/plat/odp_rwlock.h | 26 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_rwlock.h