@@ -167,7 +167,6 @@ __LIB__libodp_linux_la_SOURCES = \
odp_barrier.c \
odp_bitmap.c \
odp_buffer.c \
- odp_byteorder.c \
odp_chksum.c \
odp_classification.c \
odp_cpu.c \
@@ -215,12 +214,9 @@ __LIB__libodp_linux_la_SOURCES = \
odp_sorted_list.c \
odp_spinlock.c \
odp_spinlock_recursive.c \
- odp_std_clib.c \
- odp_sync.c \
odp_system_info.c \
odp_thread.c \
odp_thrmask.c \
- odp_ticketlock.c \
odp_time.c \
odp_timer.c \
odp_timer_wheel.c \
@@ -233,6 +229,15 @@ __LIB__libodp_linux_la_SOURCES = \
drv_shm.c \
drv_spinlock.c
+if ODP_ABI_COMPAT
+__LIB__libodp_linux_la_SOURCES += \
+ odp_atomic_api.c \
+ odp_byteorder.c \
+ odp_std_clib.c \
+ odp_sync.c \
+ odp_ticketlock.c
+endif
+
if ARCH_IS_ARM
__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_arch.c \
arch/default/odp_cpu_cycles.c \
@@ -33,4 +33,10 @@ _ODP_INLINE int odp_ticketlock_is_locked(odp_ticketlock_t *lock)
return _odp_ticketlock_is_locked(lock);
}
+_ODP_INLINE void odp_ticketlock_init(odp_ticketlock_t *ticketlock)
+{
+ odp_atomic_init_u32(&ticketlock->next_ticket, 0);
+ odp_atomic_init_u32(&ticketlock->cur_ticket, 0);
+}
+
#endif
@@ -7,10 +7,6 @@
#include "config.h"
#include <odp/api/atomic.h>
-#include <odp/api/plat/static_inline.h>
-#if ODP_ABI_COMPAT == 1
-#include <odp/api/plat/atomic_inlines.h>
-#endif
int odp_atomic_lock_free_u64(odp_atomic_op_t *atomic_op)
{
new file mode 100644
@@ -0,0 +1,13 @@
+/* Copyright (c) 2015, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include "config.h"
+
+#include <odp/api/atomic.h>
+
+/* Include non-inlined versions of API functions */
+#define _ODP_INLINE
+#include <odp/api/plat/atomic_inlines.h>
@@ -7,7 +7,7 @@
#include "config.h"
#include <odp/api/byteorder.h>
-#include <odp/api/plat/static_inline.h>
-#if ODP_ABI_COMPAT == 1
+
+/* Include non-inlined versions of API functions */
+#define _ODP_INLINE
#include <odp/api/plat/byteorder_inlines.h>
-#endif
@@ -7,7 +7,7 @@
#include "config.h"
#include <odp/api/std_clib.h>
-#include <odp/api/plat/static_inline.h>
-#if ODP_ABI_COMPAT == 1
+
+/* Include non-inlined versions of API functions */
+#define _ODP_INLINE
#include <odp/api/plat/std_clib_inlines.h>
-#endif
@@ -7,7 +7,7 @@
#include "config.h"
#include <odp/api/sync.h>
-#include <odp/api/plat/static_inline.h>
-#if ODP_ABI_COMPAT == 1
+
+/* Include non-inlined versions of API functions */
+#define _ODP_INLINE
#include <odp/api/plat/sync_inlines.h>
-#endif
@@ -10,14 +10,6 @@
#include <odp/api/plat/ticketlock_inlines.h>
-void odp_ticketlock_init(odp_ticketlock_t *ticketlock)
-{
- odp_atomic_init_u32(&ticketlock->next_ticket, 0);
- odp_atomic_init_u32(&ticketlock->cur_ticket, 0);
-}
-
/* Include non-inlined versions of API functions */
-#include <odp/api/plat/static_inline.h>
-#if ODP_ABI_COMPAT == 1
+#define _ODP_INLINE
#include <odp/api/plat/ticketlock_inlines_api.h>
-#endif
Several files consist only (or mostly) of functions compiled only if ODP is compiled in ABI compatibility mode. Instead of having an ifdef inside, guard them with if ODP_ABI_COMPAT condition in Makefile.am Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> --- platform/linux-generic/Makefile.am | 13 +++++++++---- .../include/odp/api/plat/ticketlock_inlines_api.h | 6 ++++++ platform/linux-generic/odp_atomic.c | 4 ---- platform/linux-generic/odp_atomic_api.c | 13 +++++++++++++ platform/linux-generic/odp_byteorder.c | 6 +++--- platform/linux-generic/odp_std_clib.c | 6 +++--- platform/linux-generic/odp_sync.c | 6 +++--- platform/linux-generic/odp_ticketlock.c | 10 +--------- 8 files changed, 38 insertions(+), 26 deletions(-) create mode 100644 platform/linux-generic/odp_atomic_api.c -- 2.14.2