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

diff --git a/include/odp/api/ticketlock.h b/include/odp/api/ticketlock.h
index e088e8b..40ac00f 100644
--- a/include/odp/api/ticketlock.h
+++ b/include/odp/api/ticketlock.h
@@ -18,10 +18,6 @@
 extern "C" {
 #endif
 
-
-#include <odp/std_types.h>
-#include <odp/atomic.h>
-
 /** @addtogroup odp_synchronizers
  * Operations on ticket locks.
  * Acquiring a ticket lock happens in two phases. First the threads takes a
@@ -31,14 +27,6 @@ extern "C" {
  *  @{
  */
 
-/**
- * ODP ticket lock
- */
-typedef struct odp_ticketlock_t {
-       odp_atomic_u32_t  next_ticket; /**< @private Next ticket */
-       odp_atomic_u32_t  cur_ticket;  /**< @private Current ticket */
-} odp_ticketlock_t;
-
 
 /**
  * Initialize ticket lock.
diff --git a/platform/linux-generic/include/odp/plat/ticketlock_types.h 
b/platform/linux-generic/include/odp/plat/ticketlock_types.h
new file mode 100644
index 0000000..3cb76cb
--- /dev/null
+++ b/platform/linux-generic/include/odp/plat/ticketlock_types.h
@@ -0,0 +1,43 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP ticketlock
+ */
+
+#ifndef ODP_TICKETLOCK_TYPES_H_
+#define ODP_TICKETLOCK_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/atomic.h>
+
+/** @addtogroup odp_synchronizers
+ *  @{
+ */
+
+/**
+ * ODP ticket lock
+ */
+typedef struct odp_ticketlock_t {
+       odp_atomic_u32_t  next_ticket; /**< @private Next ticket */
+       odp_atomic_u32_t  cur_ticket;  /**< @private Current ticket */
+} odp_ticketlock_t;
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/include/odp/ticketlock.h 
b/platform/linux-generic/include/odp/ticketlock.h
index fc7f438..658e27f 100644
--- a/platform/linux-generic/include/odp/ticketlock.h
+++ b/platform/linux-generic/include/odp/ticketlock.h
@@ -17,6 +17,8 @@
 extern "C" {
 #endif
 
+#include <odp/plat/ticketlock_types.h>
+
 /** @ingroup odp_synchronizers
  *  Operations on ticket locks.
  *  @{
-- 
2.1.0


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

Reply via email to