The internal ordered processing locking functions can be more streamlined
compared to the public API functions.

Signed-off-by: Matias Elo <matias....@nokia.com>
---
 platform/linux-generic/include/odp_schedule_if.h |  4 ++++
 platform/linux-generic/odp_schedule.c            | 12 +++++++++++-
 platform/linux-generic/odp_schedule_sp.c         | 12 +++++++++++-
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/platform/linux-generic/include/odp_schedule_if.h 
b/platform/linux-generic/include/odp_schedule_if.h
index df73e70..37f88a4 100644
--- a/platform/linux-generic/include/odp_schedule_if.h
+++ b/platform/linux-generic/include/odp_schedule_if.h
@@ -37,6 +37,8 @@ typedef int (*schedule_init_global_fn_t)(void);
 typedef int (*schedule_term_global_fn_t)(void);
 typedef int (*schedule_init_local_fn_t)(void);
 typedef int (*schedule_term_local_fn_t)(void);
+typedef void (*schedule_order_lock_fn_t)(void);
+typedef void (*schedule_order_unlock_fn_t)(void);
 
 typedef struct schedule_fn_t {
        schedule_pktio_start_fn_t   pktio_start;
@@ -51,6 +53,8 @@ typedef struct schedule_fn_t {
        schedule_term_global_fn_t   term_global;
        schedule_init_local_fn_t    init_local;
        schedule_term_local_fn_t    term_local;
+       schedule_order_lock_fn_t    order_lock;
+       schedule_order_unlock_fn_t  order_unlock;
 } schedule_fn_t;
 
 /* Interface towards the scheduler */
diff --git a/platform/linux-generic/odp_schedule.c 
b/platform/linux-generic/odp_schedule.c
index dfc9555..cab68a3 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -755,6 +755,14 @@ static int schedule_multi(odp_queue_t *out_queue, uint64_t 
wait,
        return schedule_loop(out_queue, wait, events, num);
 }
 
+static void order_lock(void)
+{
+}
+
+static void order_unlock(void)
+{
+}
+
 static void schedule_pause(void)
 {
        sched_local.pause = 1;
@@ -991,7 +999,9 @@ const schedule_fn_t schedule_default_fn = {
        .init_global = schedule_init_global,
        .term_global = schedule_term_global,
        .init_local  = schedule_init_local,
-       .term_local  = schedule_term_local
+       .term_local  = schedule_term_local,
+       .order_lock = order_lock,
+       .order_unlock = order_unlock
 };
 
 /* Fill in scheduler API calls */
diff --git a/platform/linux-generic/odp_schedule_sp.c 
b/platform/linux-generic/odp_schedule_sp.c
index 8b355da..5090a5c 100644
--- a/platform/linux-generic/odp_schedule_sp.c
+++ b/platform/linux-generic/odp_schedule_sp.c
@@ -660,6 +660,14 @@ static void schedule_order_unlock(unsigned lock_index)
        (void)lock_index;
 }
 
+static void order_lock(void)
+{
+}
+
+static void order_unlock(void)
+{
+}
+
 /* Fill in scheduler interface */
 const schedule_fn_t schedule_sp_fn = {
        .pktio_start   = pktio_start,
@@ -673,7 +681,9 @@ const schedule_fn_t schedule_sp_fn = {
        .init_global   = init_global,
        .term_global   = term_global,
        .init_local    = init_local,
-       .term_local    = term_local
+       .term_local    = term_local,
+       .order_lock =    order_lock,
+       .order_unlock =  order_unlock
 };
 
 /* Fill in scheduler API calls */
-- 
2.7.4

Reply via email to