diff mbox

[RFC,16/17] Split out platform-specific part of odp_ticketlock.h

Message ID 1398685276-4610-17-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_ticketlock.h                           |    8 ++----
 .../linux-generic/include/plat/odp_ticketlock.h    |   29 ++++++++++++++++++++
 2 files changed, 31 insertions(+), 6 deletions(-)
 create mode 100644 platform/linux-generic/include/plat/odp_ticketlock.h
diff mbox

Patch

diff --git a/include/odp_ticketlock.h b/include/odp_ticketlock.h
index 6277a18..d873a7f 100644
--- a/include/odp_ticketlock.h
+++ b/include/odp_ticketlock.h
@@ -20,16 +20,12 @@  extern "C" {
 
 
 #include <odp_std_types.h>
-#include <odp_atomic.h>
-
+#include <plat/odp_ticketlock.h>
 
 /**
  * ODP ticketlock
  */
-typedef struct odp_ticketlock_t {
-	odp_atomic_u32_t  next_ticket; /**< @private Next ticket */
-	volatile uint32_t cur_ticket;  /**< @private Current ticket */
-} odp_ticketlock_t;
+typedef plat_odp_ticketlock_t odp_ticketlock_t;
 
 
 /**
diff --git a/platform/linux-generic/include/plat/odp_ticketlock.h b/platform/linux-generic/include/plat/odp_ticketlock.h
new file mode 100644
index 0000000..3460c79
--- /dev/null
+++ b/platform/linux-generic/include/plat/odp_ticketlock.h
@@ -0,0 +1,29 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP ticketlock
+ */
+
+#ifndef ODP_TICKETLOCK_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#include <odp_std_types.h>
+#include <odp_atomic.h>
+
+/**
+ * ODP ticketlock
+ */
+typedef struct odp_ticketlock_t {
+	odp_atomic_u32_t  next_ticket; /**< @private Next ticket */
+	volatile uint32_t cur_ticket;  /**< @private Current ticket */
+} plat_odp_ticketlock_t;
+
+#endif