@@ -95,6 +95,7 @@ typedef struct {
odp_schedule_group_info_t *);
void (*schedule_order_lock)(unsigned);
void (*schedule_order_unlock)(unsigned);
+ void (*schedule_order_unlock_lock)(uint32_t, uint32_t);
} schedule_api_t;
@@ -1144,6 +1144,13 @@ static void schedule_order_unlock(unsigned lock_index)
odp_atomic_store_rel_u64(ord_lock, sched_local.ordered.ctx + 1);
}
+static void schedule_order_unlock_lock(uint32_t unlock_index,
+ uint32_t lock_index)
+{
+ schedule_order_unlock(unlock_index);
+ schedule_order_lock(lock_index);
+}
+
static void schedule_pause(void)
{
sched_local.pause = 1;
@@ -1429,5 +1436,6 @@ const schedule_api_t schedule_default_api = {
.schedule_group_thrmask = schedule_group_thrmask,
.schedule_group_info = schedule_group_info,
.schedule_order_lock = schedule_order_lock,
- .schedule_order_unlock = schedule_order_unlock
+ .schedule_order_unlock = schedule_order_unlock,
+ .schedule_order_unlock_lock = schedule_order_unlock_lock
};
@@ -129,3 +129,8 @@ void odp_schedule_order_unlock(unsigned lock_index)
{
return sched_api->schedule_order_unlock(lock_index);
}
+
+void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index)
+{
+ sched_api->schedule_order_unlock_lock(unlock_index, lock_index);
+}
@@ -1296,6 +1296,13 @@ static void schedule_order_unlock(unsigned lock_index)
odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1);
}
+static void schedule_order_unlock_lock(uint32_t unlock_index,
+ uint32_t lock_index)
+{
+ schedule_order_unlock(unlock_index);
+ schedule_order_lock(lock_index);
+}
+
static unsigned schedule_max_ordered_locks(void)
{
return CONFIG_QUEUE_MAX_ORD_LOCKS;
@@ -1368,7 +1375,8 @@ const schedule_api_t schedule_iquery_api = {
.schedule_group_thrmask = schedule_group_thrmask,
.schedule_group_info = schedule_group_info,
.schedule_order_lock = schedule_order_lock,
- .schedule_order_unlock = schedule_order_unlock
+ .schedule_order_unlock = schedule_order_unlock,
+ .schedule_order_unlock_lock = schedule_order_unlock_lock
};
static void thread_set_interest(sched_thread_local_t *thread,
@@ -1028,6 +1028,13 @@ static void schedule_order_unlock(unsigned lock_index)
rctx->olock_flags |= 1U << lock_index;
}
+static void schedule_order_unlock_lock(uint32_t unlock_index,
+ uint32_t lock_index)
+{
+ schedule_order_unlock(unlock_index);
+ schedule_order_lock(lock_index);
+}
+
static void schedule_release_atomic(void)
{
sched_scalable_thread_state_t *ts;
@@ -1978,4 +1985,5 @@ const schedule_api_t schedule_scalable_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,
};
@@ -819,6 +819,13 @@ static void schedule_order_unlock(unsigned lock_index)
(void)lock_index;
}
+static void schedule_order_unlock_lock(uint32_t unlock_index,
+ uint32_t lock_index)
+{
+ (void)unlock_index;
+ (void)lock_index;
+}
+
static void order_lock(void)
{
}
@@ -868,5 +875,6 @@ const schedule_api_t schedule_sp_api = {
.schedule_group_thrmask = schedule_group_thrmask,
.schedule_group_info = schedule_group_info,
.schedule_order_lock = schedule_order_lock,
- .schedule_order_unlock = schedule_order_unlock
+ .schedule_order_unlock = schedule_order_unlock,
+ .schedule_order_unlock_lock = schedule_order_unlock_lock
};