new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/buffer.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/buffer.h>
new file mode 100644
@@ -0,0 +1,38 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_BUFFER_H_
+#define ODP_ABI_BUFFER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_buffer_t;
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_buffer_seg_t;
+
+/** @ingroup odp_buffer
+ * @{
+ */
+
+typedef _odp_abi_buffer_t *odp_buffer_t;
+typedef _odp_abi_buffer_seg_t *odp_buffer_seg_t;
+
+#define ODP_BUFFER_INVALID ((odp_buffer_t)0xffffffff)
+#define ODP_SEGMENT_INVALID ((odp_buffer_seg_t)0xffffffff)
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/buffer.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/buffer.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/buffer.h>
new file mode 100644
@@ -0,0 +1,7 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <odp/arch/default/api/abi/buffer.h>
@@ -62,10 +62,12 @@ odpapispecinclude_HEADERS = \
odpapiabidefaultincludedir= $(includedir)/odp/arch/default/api/abi
odpapiabidefaultinclude_HEADERS = \
+ $(top_srcdir)/include/odp/arch/default/api/abi/buffer.h \
$(top_srcdir)/include/odp/arch/default/api/abi/event.h
odpapiabiarchincludedir= $(includedir)/odp/arch/@ARCH_ABI@/odp/api/abi
odpapiabiarchinclude_HEADERS = \
+ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/buffer.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/event.h
EXTRA_DIST = \
@@ -17,26 +17,31 @@
extern "C" {
#endif
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/abi/buffer.h>
+#else
+
#include <odp/api/std_types.h>
#include <odp/api/plat/strong_types.h>
-/** ODP buffer */
+/** @ingroup odp_buffer
+ * @{
+ */
+
typedef ODP_HANDLE_T(odp_buffer_t);
-/** Invalid buffer */
#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0xffffffff)
-/** ODP buffer segment */
typedef ODP_HANDLE_T(odp_buffer_seg_t);
-/** Invalid segment */
#define ODP_SEGMENT_INVALID ((odp_buffer_seg_t)ODP_BUFFER_INVALID)
-/** Get printable format of odp_buffer_t */
-static inline uint64_t odp_buffer_to_u64(odp_buffer_t hdl)
-{
- return _odp_pri(hdl);
-}
+/**
+ * @}
+ */
+
+#endif
#ifdef __cplusplus
}
@@ -76,3 +76,8 @@ void odp_buffer_print(odp_buffer_t buf)
ODP_PRINT("\n%s\n", str);
}
+
+uint64_t odp_buffer_to_u64(odp_buffer_t hdl)
+{
+ return _odp_pri(hdl);
+}
Initially, use the same default ABI file for all architectures. Default values match those defined in odp-linux implementation to minimize changes in this phase. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- include/odp/arch/arm32-linux/odp/api/abi/buffer.h | 7 ++++ include/odp/arch/arm64-linux/odp/api/abi/buffer.h | 7 ++++ include/odp/arch/default/api/abi/buffer.h | 38 ++++++++++++++++++++++ include/odp/arch/mips64-linux/odp/api/abi/buffer.h | 7 ++++ .../odp/arch/power64-linux/odp/api/abi/buffer.h | 7 ++++ include/odp/arch/x86_32-linux/odp/api/abi/buffer.h | 7 ++++ include/odp/arch/x86_64-linux/odp/api/abi/buffer.h | 7 ++++ platform/Makefile.inc | 2 ++ .../include/odp/api/plat/buffer_types.h | 23 ++++++++----- platform/linux-generic/odp_buffer.c | 5 +++ 10 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/buffer.h create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/buffer.h create mode 100644 include/odp/arch/default/api/abi/buffer.h create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/buffer.h create mode 100644 include/odp/arch/power64-linux/odp/api/abi/buffer.h create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/buffer.h create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/buffer.h -- 2.8.1