[21/29] linux-gen, include: switch sync.h to api+abi

Message ID 20171023111057.6328-22-dmitry.ereminsolenikov@linaro.org
State Superseded
Headers show
Series
  • restructure headers for ABI-compat/platform-optimized modes
Related show

Commit Message

Dmitry Eremin-Solenikov Oct. 23, 2017, 11:10 a.m.
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
 include/Makefile.am                                |  1 +
 include/odp/api/sync.h                             | 28 ++++++++++++++++++++++
 platform/linux-generic/Makefile.am                 |  2 +-
 .../odp/api => include-abi/odp/api/abi}/sync.h     | 12 ++++------
 platform/linux-generic/odp_sync.c                  |  1 +
 5 files changed, 35 insertions(+), 9 deletions(-)
 create mode 100644 include/odp/api/sync.h
 rename platform/linux-generic/{include/odp/api => include-abi/odp/api/abi}/sync.h (63%)

-- 
2.14.2

Patch

diff --git a/include/Makefile.am b/include/Makefile.am
index 6b3d12f793a4..4a9c3efe674a 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -24,6 +24,7 @@  odpapiinclude_HEADERS = \
 	odp/api/spinlock_recursive.h \
 	odp/api/std_clib.h \
 	odp/api/std_types.h \
+	odp/api/sync.h \
 	odp/api/thread.h \
 	odp/api/thrmask.h \
 	odp/api/time.h \
diff --git a/include/odp/api/sync.h b/include/odp/api/sync.h
new file mode 100644
index 000000000000..b84289ca8cb6
--- /dev/null
+++ b/include/odp/api/sync.h
@@ -0,0 +1,28 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP synchronisation
+ */
+
+#ifndef ODP_API_SYNC_H_
+#define ODP_API_SYNC_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/abi/sync.h>
+
+#include <odp/api/spec/sync.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index cdb45d8e0c9a..69ccd8e0b978 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -37,7 +37,6 @@  odpapiinclude_HEADERS = \
 		  include/odp/api/packet_io_stats.h \
 		  include/odp/api/random.h \
 		  include/odp/api/support.h \
-		  include/odp/api/sync.h \
 		  include/odp/api/system_info.h \
 		  include/odp/api/ticketlock.h
 
@@ -85,6 +84,7 @@  odpapiabiarchinclude_HEADERS = \
 		  include-abi/odp/api/abi/spinlock_recursive.h \
 		  include-abi/odp/api/abi/std_clib.h \
 		  include-abi/odp/api/abi/std_types.h \
+		  include-abi/odp/api/abi/sync.h \
 		  include-abi/odp/api/abi/thread.h \
 		  include-abi/odp/api/abi/thrmask.h \
 		  include-abi/odp/api/abi/time.h \
diff --git a/platform/linux-generic/include/odp/api/sync.h b/platform/linux-generic/include-abi/odp/api/abi/sync.h
similarity index 63%
rename from platform/linux-generic/include/odp/api/sync.h
rename to platform/linux-generic/include-abi/odp/api/abi/sync.h
index e1afcc722d07..74e3fb15fef9 100644
--- a/platform/linux-generic/include/odp/api/sync.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/sync.h
@@ -1,4 +1,4 @@ 
-/* Copyright (c) 2013, Linaro Limited
+/* Copyright (c) 2015, Linaro Limited
  * All rights reserved.
  *
  * SPDX-License-Identifier:     BSD-3-Clause
@@ -7,11 +7,11 @@ 
 /**
  * @file
  *
- * ODP synchronisation
+ * ODP barrier
  */
 
-#ifndef ODP_PLAT_SYNC_H_
-#define ODP_PLAT_SYNC_H_
+#ifndef ODP_API_ABI_SYNC_H_
+#define ODP_API_ABI_SYNC_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -22,16 +22,12 @@  extern "C" {
  */
 
 #include <odp/api/plat/static_inline.h>
-#if ODP_ABI_COMPAT == 0
 #include <odp/api/plat/sync_inlines.h>
-#endif
 
 /**
  * @}
  */
 
-#include <odp/api/spec/sync.h>
-
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/odp_sync.c b/platform/linux-generic/odp_sync.c
index 7acdc92dd497..a9d2bbe24369 100644
--- a/platform/linux-generic/odp_sync.c
+++ b/platform/linux-generic/odp_sync.c
@@ -7,6 +7,7 @@ 
 #include "config.h"
 
 #include <odp/api/sync.h>
+#include <odp/api/plat/static_inline.h>
 #if ODP_ABI_COMPAT == 1
 #include <odp/api/plat/sync_inlines.h>
 #endif