@@ -41,6 +41,8 @@ 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 void (*schedule_order_unlock_lock_fn_t)(void);
+typedef void (*schedule_order_lock_start_fn_t)(void);
+typedef void (*schedule_order_lock_wait_fn_t)(void);
typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void);
typedef void (*schedule_save_context_fn_t)(uint32_t queue_index);
@@ -60,6 +62,8 @@ typedef struct schedule_fn_t {
schedule_term_local_fn_t term_local;
schedule_order_lock_fn_t order_lock;
schedule_order_unlock_fn_t order_unlock;
+ schedule_order_lock_start_fn_t start_order_lock;
+ schedule_order_lock_wait_fn_t wait_order_lock;
schedule_order_unlock_lock_fn_t order_unlock_lock;
schedule_max_ordered_locks_fn_t max_ordered_locks;
@@ -105,6 +109,8 @@ typedef struct {
void (*schedule_order_lock)(uint32_t);
void (*schedule_order_unlock)(uint32_t);
void (*schedule_order_unlock_lock)(uint32_t, uint32_t);
+ void (*schedule_order_lock_start)(uint32_t);
+ void (*schedule_order_lock_wait)(uint32_t);
} schedule_api_t;
@@ -1152,6 +1152,16 @@ static void schedule_order_unlock_lock(uint32_t unlock_index,
schedule_order_lock(lock_index);
}
+static void schedule_order_lock_start(uint32_t lock_index)
+{
+ (void)lock_index;
+}
+
+static void schedule_order_lock_wait(uint32_t lock_index)
+{
+ schedule_order_lock(lock_index);
+}
+
static void schedule_pause(void)
{
sched_local.pause = 1;
@@ -1438,5 +1448,7 @@ const schedule_api_t schedule_default_api = {
.schedule_group_info = schedule_group_info,
.schedule_order_lock = schedule_order_lock,
.schedule_order_unlock = schedule_order_unlock,
- .schedule_order_unlock_lock = schedule_order_unlock_lock
+ .schedule_order_unlock_lock = schedule_order_unlock_lock,
+ .schedule_order_lock_start = schedule_order_lock_start,
+ .schedule_order_lock_wait = schedule_order_lock_wait
};
@@ -134,3 +134,14 @@ void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index)
{
sched_api->schedule_order_unlock_lock(unlock_index, lock_index);
}
+
+void odp_schedule_order_lock_start(uint32_t lock_index)
+{
+ sched_api->schedule_order_lock_start(lock_index);
+}
+
+void odp_schedule_order_lock_wait(uint32_t lock_index)
+{
+ sched_api->schedule_order_lock_wait(lock_index);
+}
+
@@ -1308,6 +1308,16 @@ static uint32_t schedule_max_ordered_locks(void)
return CONFIG_QUEUE_MAX_ORD_LOCKS;
}
+static void schedule_order_lock_start(uint32_t lock_index)
+{
+ (void)lock_index;
+}
+
+static void schedule_order_lock_wait(uint32_t lock_index)
+{
+ schedule_order_lock(lock_index);
+}
+
static inline bool is_atomic_queue(unsigned int queue_index)
{
return (sched->queues[queue_index].sync == ODP_SCHED_SYNC_ATOMIC);
@@ -1376,7 +1386,9 @@ const schedule_api_t schedule_iquery_api = {
.schedule_group_info = schedule_group_info,
.schedule_order_lock = schedule_order_lock,
.schedule_order_unlock = schedule_order_unlock,
- .schedule_order_unlock_lock = schedule_order_unlock_lock
+ .schedule_order_unlock_lock = schedule_order_unlock_lock,
+ .schedule_order_lock_start = schedule_order_lock_start,
+ .schedule_order_lock_wait = schedule_order_lock_wait
};
static void thread_set_interest(sched_thread_local_t *thread,
@@ -1186,6 +1186,16 @@ static void schedule_order_unlock_lock(uint32_t unlock_index,
schedule_order_lock(lock_index);
}
+static void schedule_order_lock_start(uint32_t lock_index)
+{
+ (void)lock_index;
+}
+
+static void schedule_order_lock_wait(uint32_t lock_index)
+{
+ schedule_order_lock(lock_index);
+}
+
static void schedule_release_atomic(void)
{
sched_scalable_thread_state_t *ts;
@@ -2096,4 +2106,6 @@ const schedule_api_t schedule_scalable_api = {
.schedule_order_lock = schedule_order_lock,
.schedule_order_unlock = schedule_order_unlock,
.schedule_order_unlock_lock = schedule_order_unlock_lock,
+ .schedule_order_lock_start = schedule_order_lock_start,
+ .schedule_order_lock_wait = schedule_order_lock_wait
};
@@ -829,6 +829,16 @@ static void schedule_order_unlock_lock(uint32_t unlock_index,
(void)lock_index;
}
+static void schedule_order_lock_start(uint32_t lock_index)
+{
+ (void)lock_index;
+}
+
+static void schedule_order_lock_wait(uint32_t lock_index)
+{
+ (void)lock_index;
+}
+
static void order_lock(void)
{
}
@@ -879,5 +889,7 @@ const schedule_api_t schedule_sp_api = {
.schedule_group_info = schedule_group_info,
.schedule_order_lock = schedule_order_lock,
.schedule_order_unlock = schedule_order_unlock,
- .schedule_order_unlock_lock = schedule_order_unlock_lock
+ .schedule_order_unlock_lock = schedule_order_unlock_lock,
+ .schedule_order_lock_start = schedule_order_lock_start,
+ .schedule_order_lock_wait = schedule_order_lock_wait
};