Signed-off-by: Jerin Jacob <jerin.ja...@caviumnetworks.com>
---
 include/odp/api/ticketlock.h                       | 12 +-----
 platform/linux-generic/Makefile.am                 |  1 +
 .../include/odp/plat/ticketlock_types.h            | 46 ++++++++++++++++++++++
 platform/linux-generic/include/odp/ticketlock.h    |  2 +
 4 files changed, 51 insertions(+), 10 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..e395ac4 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
@@ -32,13 +28,9 @@ extern "C" {
  */
 
 /**
- * ODP ticket lock
+ * @typedef odp_ticketlock_t
+ * ODP ticketlock
  */
-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/Makefile.am 
b/platform/linux-generic/Makefile.am
index 200523c..cef7ecc 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -63,6 +63,7 @@ odpplatinclude_HEADERS = \
                  
$(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h \
                  
$(top_srcdir)/platform/linux-generic/include/odp/plat/spinlock_types.h \
                  
$(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h \
+                 
$(top_srcdir)/platform/linux-generic/include/odp/plat/ticketlock_types.h \
                  
$(top_srcdir)/platform/linux-generic/include/odp/plat/timer_types.h \
                  
$(top_srcdir)/platform/linux-generic/include/odp/plat/version_types.h
 
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..be93085
--- /dev/null
+++ b/platform/linux-generic/include/odp/plat/ticketlock_types.h
@@ -0,0 +1,46 @@
+/* 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>
+
+/**
+ * @internal
+ * ODP ticketlock
+ */
+struct odp_ticketlock_s {
+       odp_atomic_u32_t  next_ticket; /**< Next ticket */
+       odp_atomic_u32_t  cur_ticket;  /**< Current ticket */
+};
+
+/** @addtogroup odp_synchronizers
+ *  @{
+ */
+
+typedef struct odp_ticketlock_s 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