@@ -520,7 +520,7 @@ err:
if (gbls != NULL && gbls->tp != ODP_TIMER_POOL_INVALID)
odp_timer_pool_destroy(gbls->tp);
- if (gbls != NULL && gbls->pool != ODP_TIMER_POOL_INVALID)
+ if (gbls != NULL && gbls->pool != ODP_POOL_INVALID)
if (odp_pool_destroy(gbls->pool))
err = 1;
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/pool.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/pool.h>
new file mode 100644
@@ -0,0 +1,43 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef ODP_ABI_POOL_H_
+#define ODP_ABI_POOL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/abi/event.h>
+
+/** @internal Dummy type for strong typing */
+typedef struct { char dummy; /**< @internal Dummy */ } _odp_abi_pool_t;
+
+/** @ingroup odp_pool
+ * @{
+ */
+
+typedef _odp_abi_pool_t *odp_pool_t;
+
+#define ODP_POOL_INVALID ((odp_pool_t)0xffffffff)
+
+#define ODP_POOL_NAME_LEN 32
+
+typedef enum odp_pool_type_t {
+ ODP_POOL_BUFFER = ODP_EVENT_BUFFER,
+ ODP_POOL_PACKET = ODP_EVENT_PACKET,
+ ODP_POOL_TIMEOUT = ODP_EVENT_TIMEOUT
+} odp_pool_type_t;
+
+/**
+ * @}
+ */
+
+#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/pool.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/pool.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/pool.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/pool.h>
@@ -66,7 +66,8 @@ odpapiabidefaultinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/default/api/abi/classification.h \
$(top_srcdir)/include/odp/arch/default/api/abi/crypto.h \
$(top_srcdir)/include/odp/arch/default/api/abi/event.h \
- $(top_srcdir)/include/odp/arch/default/api/abi/packet.h
+ $(top_srcdir)/include/odp/arch/default/api/abi/packet.h \
+ $(top_srcdir)/include/odp/arch/default/api/abi/pool.h
odpapiabiarchincludedir= $(includedir)/odp/arch/@ARCH_ABI@/odp/api/abi
odpapiabiarchinclude_HEADERS = \
@@ -74,7 +75,8 @@ odpapiabiarchinclude_HEADERS = \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/classification.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/crypto.h \
$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/event.h \
- $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/packet.h
+ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/packet.h \
+ $(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/pool.h
EXTRA_DIST = \
arch/arm/odp/api/cpu_arch.h \
@@ -13,16 +13,20 @@
#ifndef ODP_POOL_TYPES_H_
#define ODP_POOL_TYPES_H_
-#include <odp/api/std_types.h>
-#include <odp/api/plat/strong_types.h>
-#include <odp/api/plat/event_types.h>
-
#ifdef __cplusplus
extern "C" {
#endif
-/** @addtogroup odp_buffer
- * Operations on a pool.
+#include <odp/api/plat/static_inline.h>
+#if ODP_ABI_COMPAT == 1
+#include <odp/api/abi/pool.h>
+#else
+
+#include <odp/api/std_types.h>
+#include <odp/api/plat/strong_types.h>
+#include <odp/api/plat/event_types.h>
+
+/** @ingroup odp_pool
* @{
*/
@@ -32,9 +36,6 @@ typedef ODP_HANDLE_T(odp_pool_t);
#define ODP_POOL_NAME_LEN 32
-/**
- * Pool type
- */
typedef enum odp_pool_type_t {
ODP_POOL_BUFFER = ODP_EVENT_BUFFER,
ODP_POOL_PACKET = ODP_EVENT_PACKET,
@@ -45,6 +46,8 @@ typedef enum odp_pool_type_t {
* @}
*/
+#endif
+
#ifdef __cplusplus
}
#endif
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> --- example/timer/odp_timer_test.c | 2 +- include/odp/arch/arm32-linux/odp/api/abi/pool.h | 7 ++++ include/odp/arch/arm64-linux/odp/api/abi/pool.h | 7 ++++ include/odp/arch/default/api/abi/pool.h | 43 ++++++++++++++++++++++ include/odp/arch/mips64-linux/odp/api/abi/pool.h | 7 ++++ include/odp/arch/power64-linux/odp/api/abi/pool.h | 7 ++++ include/odp/arch/x86_32-linux/odp/api/abi/pool.h | 7 ++++ include/odp/arch/x86_64-linux/odp/api/abi/pool.h | 7 ++++ platform/Makefile.inc | 6 ++- .../include/odp/api/plat/pool_types.h | 21 ++++++----- 10 files changed, 102 insertions(+), 12 deletions(-) create mode 100644 include/odp/arch/arm32-linux/odp/api/abi/pool.h create mode 100644 include/odp/arch/arm64-linux/odp/api/abi/pool.h create mode 100644 include/odp/arch/default/api/abi/pool.h create mode 100644 include/odp/arch/mips64-linux/odp/api/abi/pool.h create mode 100644 include/odp/arch/power64-linux/odp/api/abi/pool.h create mode 100644 include/odp/arch/x86_32-linux/odp/api/abi/pool.h create mode 100644 include/odp/arch/x86_64-linux/odp/api/abi/pool.h -- 2.8.1