@@ -81,6 +81,7 @@ typedef struct {
void (*schedule_resume)(void);
void (*schedule_release_atomic)(void);
void (*schedule_release_ordered)(void);
+ void (*schedule_release_context)(void);
void (*schedule_prefetch)(int);
int (*schedule_num_prio)(void);
odp_schedule_group_t (*schedule_group_create)(const char *,
@@ -127,3 +127,9 @@ void odp_schedule_order_unlock(unsigned lock_index)
{
return sched_api->schedule_order_unlock(lock_index);
}
+
+void odp_schedule_order_unlock_lock(uint32_t lock_index)
+{
+ sched_api->schedule_release_context();
+ sched_api->schedule_order_lock(lock_index);
+}
@@ -1356,6 +1356,7 @@ const schedule_api_t schedule_iquery_api = {
.schedule_resume = schedule_resume,
.schedule_release_atomic = schedule_release_atomic,
.schedule_release_ordered = schedule_release_ordered,
+ .schedule_release_context = schedule_release_context,
.schedule_prefetch = schedule_prefetch,
.schedule_num_prio = number_of_priorites,
.schedule_group_create = schedule_group_create,
@@ -1055,6 +1055,27 @@ static void schedule_release_ordered(void)
_schedule_release_ordered(ts);
}
+static void schedule_release_context(void)
+{
+ sched_scalable_thread_state_t *ts;
+
+ ts = sched_ts;
+ if (ts->rctx != NULL)
+ _schedule_release_ordered(ts);
+ else if (odp_likely(ts->atomq != NULL)) {
+#ifdef CONFIG_QSCHST_LOCK
+ sched_elem_t *atomq;
+
+ atomq = ts->atomq;
+ LOCK(&atomq->qschlock);
+#endif
+ _schedule_release_atomic(ts);
+#ifdef CONFIG_QSCHST_LOCK
+ UNLOCK(&atomq->qschlock);
+#endif
+ }
+}
+
static int schedule_multi(odp_queue_t *from, uint64_t wait, odp_event_t ev[],
int num)
{
@@ -1966,6 +1987,7 @@ const schedule_api_t schedule_scalable_api = {
.schedule_resume = schedule_resume,
.schedule_release_atomic = schedule_release_atomic,
.schedule_release_ordered = schedule_release_ordered,
+ .schedule_release_context = schedule_release_context,
.schedule_prefetch = schedule_prefetch,
.schedule_num_prio = schedule_num_prio,
.schedule_group_create = schedule_group_create,
@@ -608,6 +608,10 @@ static void schedule_release_ordered(void)
{
}
+static void schedule_release_context(void)
+{
+}
+
static void schedule_prefetch(int num)
{
(void)num;
@@ -856,6 +860,7 @@ const schedule_api_t schedule_sp_api = {
.schedule_resume = schedule_resume,
.schedule_release_atomic = schedule_release_atomic,
.schedule_release_ordered = schedule_release_ordered,
+ .schedule_release_context = schedule_release_context,
.schedule_prefetch = schedule_prefetch,
.schedule_num_prio = schedule_num_prio,
.schedule_group_create = schedule_group_create,