aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2023-01-23 13:01:26 +0200
committerMatias Elo <matias.elo@nokia.com>2023-01-25 08:13:15 +0200
commit579d8105776ea23f097fdb894a50759b6055b8b4 (patch)
treefa79db274144de47d8277cbbfc89a852bb47cd8b /platform
parent113b1c421623f01c938d8e1218088f46e3535bca (diff)
api: buffer: split header files
Split buffer API into separate header files for functions and types. This fixes circular dependency issues with inline headers. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/Makefile.am1
-rw-r--r--platform/linux-generic/include-abi/odp/api/abi/buffer.h20
-rw-r--r--platform/linux-generic/include-abi/odp/api/abi/buffer_types.h40
-rw-r--r--platform/linux-generic/include/odp/api/plat/buffer_inlines.h5
-rw-r--r--platform/linux-generic/include/odp/api/plat/event_validation_external.h2
5 files changed, 47 insertions, 21 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 43fcfa950..6e6cfa5f6 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -72,6 +72,7 @@ odpapiabiarchinclude_HEADERS += \
include-abi/odp/api/abi/atomic.h \
include-abi/odp/api/abi/barrier.h \
include-abi/odp/api/abi/buffer.h \
+ include-abi/odp/api/abi/buffer_types.h \
include-abi/odp/api/abi/byteorder.h \
include-abi/odp/api/abi/classification.h \
include-abi/odp/api/abi/comp.h \
diff --git a/platform/linux-generic/include-abi/odp/api/abi/buffer.h b/platform/linux-generic/include-abi/odp/api/abi/buffer.h
index 8239e15da..a6309fe39 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/buffer.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/buffer.h
@@ -1,4 +1,5 @@
/* Copyright (c) 2015-2018, Linaro Limited
+ * Copyright (c) 2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -7,7 +8,7 @@
/**
* @file
*
- * ODP buffer descriptor
+ * ODP buffer
*/
#ifndef ODP_API_ABI_BUFFER_H_
@@ -17,24 +18,9 @@
extern "C" {
#endif
-#include <odp/api/std_types.h>
-#include <odp/api/plat/strong_types.h>
-
-/** @ingroup odp_buffer
- * @{
- */
-
-typedef ODP_HANDLE_T(odp_buffer_t);
-
-#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0)
-
-/* Inlined functions for non-ABI compat mode */
+/* Inlined API functions */
#include <odp/api/plat/buffer_inlines.h>
-/**
- * @}
- */
-
#ifdef __cplusplus
}
#endif
diff --git a/platform/linux-generic/include-abi/odp/api/abi/buffer_types.h b/platform/linux-generic/include-abi/odp/api/abi/buffer_types.h
new file mode 100644
index 000000000..1d54bab07
--- /dev/null
+++ b/platform/linux-generic/include-abi/odp/api/abi/buffer_types.h
@@ -0,0 +1,40 @@
+/* Copyright (c) 2015-2018, Linaro Limited
+ * Copyright (c) 2023, Nokia
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP buffer types
+ */
+
+#ifndef ODP_API_ABI_BUFFER_TYPES_H_
+#define ODP_API_ABI_BUFFER_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/std_types.h>
+#include <odp/api/plat/strong_types.h>
+
+/** @ingroup odp_buffer
+ * @{
+ */
+
+typedef ODP_HANDLE_T(odp_buffer_t);
+
+#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0)
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/include/odp/api/plat/buffer_inlines.h b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h
index 34d4b5675..75ef36cf3 100644
--- a/platform/linux-generic/include/odp/api/plat/buffer_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/buffer_inlines.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019-2022, Nokia
+/* Copyright (c) 2019-2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -7,11 +7,10 @@
#ifndef ODP_PLAT_BUFFER_INLINES_H_
#define ODP_PLAT_BUFFER_INLINES_H_
+#include <odp/api/buffer_types.h>
#include <odp/api/event.h>
#include <odp/api/pool_types.h>
-#include <odp/api/abi/buffer.h>
-
#include <odp/api/plat/buffer_inline_types.h>
#include <odp/api/plat/debug_inlines.h>
#include <odp/api/plat/event_inline_types.h>
diff --git a/platform/linux-generic/include/odp/api/plat/event_validation_external.h b/platform/linux-generic/include/odp/api/plat/event_validation_external.h
index 5a939402f..7f5c0364f 100644
--- a/platform/linux-generic/include/odp/api/plat/event_validation_external.h
+++ b/platform/linux-generic/include/odp/api/plat/event_validation_external.h
@@ -18,7 +18,7 @@
#include <odp/autoheader_external.h>
-#include <odp/api/buffer.h>
+#include <odp/api/buffer_types.h>
#include <odp/api/event_types.h>
#include <odp/api/hints.h>
#include <odp/api/packet_types.h>