aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/linux-dpdk/Makefile.am3
l---------platform/linux-dpdk/include/odp/api/plat/schedule_inline_types.h1
l---------platform/linux-dpdk/include/odp/api/plat/schedule_inlines.h1
-rw-r--r--platform/linux-dpdk/odp_schedule_eventdev.c4
-rw-r--r--platform/linux-dpdk/odp_schedule_if.c103
5 files changed, 21 insertions, 91 deletions
diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index f74cac7c7..18bd58964 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -45,6 +45,8 @@ odpapiplatinclude_HEADERS = \
include/odp/api/plat/pool_inline_types.h \
include/odp/api/plat/queue_inlines.h \
include/odp/api/plat/queue_inline_types.h \
+ include/odp/api/plat/schedule_inlines.h \
+ include/odp/api/plat/schedule_inline_types.h \
include/odp/api/plat/rwlock_inlines.h \
include/odp/api/plat/rwlock_recursive_inlines.h \
include/odp/api/plat/spinlock_inlines.h \
@@ -251,6 +253,7 @@ __LIB__libodp_dpdk_la_SOURCES += \
../linux-generic/odp_packet_io_api.c \
../linux-generic/odp_pool_api.c \
../linux-generic/odp_queue_api.c \
+ ../linux-generic/odp_schedule_api.c \
../linux-generic/odp_rwlock_api.c \
../linux-generic/odp_rwlock_recursive_api.c \
../linux-generic/odp_spinlock_api.c \
diff --git a/platform/linux-dpdk/include/odp/api/plat/schedule_inline_types.h b/platform/linux-dpdk/include/odp/api/plat/schedule_inline_types.h
new file mode 120000
index 000000000..a9b051e5b
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/schedule_inline_types.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/schedule_inline_types.h \ No newline at end of file
diff --git a/platform/linux-dpdk/include/odp/api/plat/schedule_inlines.h b/platform/linux-dpdk/include/odp/api/plat/schedule_inlines.h
new file mode 120000
index 000000000..a15dbee6a
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/plat/schedule_inlines.h
@@ -0,0 +1 @@
+../../../../../linux-generic/include/odp/api/plat/schedule_inlines.h \ No newline at end of file
diff --git a/platform/linux-dpdk/odp_schedule_eventdev.c b/platform/linux-dpdk/odp_schedule_eventdev.c
index 6e03f7747..8a6a1dd45 100644
--- a/platform/linux-dpdk/odp_schedule_eventdev.c
+++ b/platform/linux-dpdk/odp_schedule_eventdev.c
@@ -13,6 +13,8 @@
#include <odp/api/ticketlock.h>
#include <odp/api/thrmask.h>
+#include <odp/api/plat/schedule_inline_types.h>
+
#include <odp_config_internal.h>
#include <odp_debug_internal.h>
#include <odp_eventdev_internal.h>
@@ -1087,7 +1089,7 @@ const schedule_fn_t _odp_schedule_eventdev_fn = {
};
/* Fill in scheduler API calls */
-const schedule_api_t _odp_schedule_eventdev_api = {
+const _odp_schedule_api_fn_t _odp_schedule_eventdev_api = {
.schedule_wait_time = schedule_wait_time,
.schedule_capability = schedule_capability,
.schedule_config_init = schedule_config_init,
diff --git a/platform/linux-dpdk/odp_schedule_if.c b/platform/linux-dpdk/odp_schedule_if.c
index 332504b6b..f11fe6832 100644
--- a/platform/linux-dpdk/odp_schedule_if.c
+++ b/platform/linux-dpdk/odp_schedule_if.c
@@ -1,5 +1,5 @@
/* Copyright (c) 2018, Linaro Limited
- * Copyright (c) 2021, Nokia
+ * Copyright (c) 2021-2022, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -7,6 +7,8 @@
#include <odp/autoheader_internal.h>
+#include <odp/api/plat/schedule_inline_types.h>
+
#include <odp_schedule_if.h>
#include <odp_init_internal.h>
#include <odp_debug_internal.h>
@@ -18,24 +20,25 @@
#include <stdlib.h>
#include <string.h>
+/* Enable visibility to inline headers */
+#include <odp/visibility_begin.h>
+
+const _odp_schedule_api_fn_t *_odp_sched_api;
+
+#include <odp/visibility_end.h>
+
extern const schedule_fn_t _odp_schedule_sp_fn;
-extern const schedule_api_t _odp_schedule_sp_api;
+extern const _odp_schedule_api_fn_t _odp_schedule_sp_api;
extern const schedule_fn_t _odp_schedule_basic_fn;
-extern const schedule_api_t _odp_schedule_basic_api;
+extern const _odp_schedule_api_fn_t _odp_schedule_basic_api;
extern const schedule_fn_t _odp_schedule_eventdev_fn;
-extern const schedule_api_t _odp_schedule_eventdev_api;
+extern const _odp_schedule_api_fn_t _odp_schedule_eventdev_api;
const schedule_fn_t *_odp_sched_fn;
-const schedule_api_t *_odp_sched_api;
int _odp_sched_id;
-uint64_t odp_schedule_wait_time(uint64_t ns)
-{
- return _odp_sched_api->schedule_wait_time(ns);
-}
-
int odp_schedule_capability(odp_schedule_capability_t *capa)
{
return _odp_sched_api->schedule_capability(capa);
@@ -71,56 +74,6 @@ int odp_schedule_config(const odp_schedule_config_t *config)
return ret;
}
-odp_event_t odp_schedule(odp_queue_t *from, uint64_t wait)
-{
- _ODP_ASSERT(odp_global_rw->schedule_configured);
-
- return _odp_sched_api->schedule(from, wait);
-}
-
-int odp_schedule_multi(odp_queue_t *from, uint64_t wait, odp_event_t events[],
- int num)
-{
- _ODP_ASSERT(odp_global_rw->schedule_configured);
-
- return _odp_sched_api->schedule_multi(from, wait, events, num);
-}
-
-int odp_schedule_multi_wait(odp_queue_t *from, odp_event_t events[], int num)
-{
- return _odp_sched_api->schedule_multi_wait(from, events, num);
-}
-
-int odp_schedule_multi_no_wait(odp_queue_t *from, odp_event_t events[], int num)
-{
- return _odp_sched_api->schedule_multi_no_wait(from, events, num);
-}
-
-void odp_schedule_pause(void)
-{
- _odp_sched_api->schedule_pause();
-}
-
-void odp_schedule_resume(void)
-{
- _odp_sched_api->schedule_resume();
-}
-
-void odp_schedule_release_atomic(void)
-{
- _odp_sched_api->schedule_release_atomic();
-}
-
-void odp_schedule_release_ordered(void)
-{
- _odp_sched_api->schedule_release_ordered();
-}
-
-void odp_schedule_prefetch(int num)
-{
- _odp_sched_api->schedule_prefetch(num);
-}
-
int odp_schedule_min_prio(void)
{
return _odp_sched_api->schedule_min_prio();
@@ -181,36 +134,6 @@ int odp_schedule_group_info(odp_schedule_group_t group,
return _odp_sched_api->schedule_group_info(group, info);
}
-void odp_schedule_order_lock(uint32_t lock_index)
-{
- _odp_sched_api->schedule_order_lock(lock_index);
-}
-
-void odp_schedule_order_unlock(uint32_t lock_index)
-{
- _odp_sched_api->schedule_order_unlock(lock_index);
-}
-
-void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index)
-{
- _odp_sched_api->schedule_order_unlock_lock(unlock_index, lock_index);
-}
-
-void odp_schedule_order_lock_start(uint32_t lock_index)
-{
- _odp_sched_api->schedule_order_lock_start(lock_index);
-}
-
-void odp_schedule_order_lock_wait(uint32_t lock_index)
-{
- _odp_sched_api->schedule_order_lock_wait(lock_index);
-}
-
-void odp_schedule_order_wait(void)
-{
- _odp_sched_api->schedule_order_wait();
-}
-
void odp_schedule_print(void)
{
_odp_sched_api->schedule_print();