diff options
Diffstat (limited to 'core/minute-ia/task.c')
-rw-r--r-- | core/minute-ia/task.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/minute-ia/task.c b/core/minute-ia/task.c index 6d5be5f92d..0cdc8a41e5 100644 --- a/core/minute-ia/task.c +++ b/core/minute-ia/task.c @@ -331,7 +331,7 @@ static uint32_t __wait_evt(int timeout_us, task_id_t resched) return evt; } -uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait) +uint32_t task_set_event(task_id_t tskid, uint32_t event) { task_ *receiver = __task_id_to_ptr(tskid); @@ -352,10 +352,7 @@ uint32_t task_set_event(task_id_t tskid, uint32_t event, int wait) /* The receiver might run again */ atomic_or(&tasks_ready, 1 << tskid); } else { - if (wait) - return __wait_evt(-1, tskid); - else - __schedule(0, tskid); + __schedule(0, tskid); } return 0; @@ -493,7 +490,7 @@ void mutex_unlock(struct mutex *mtx) waiters &= ~BIT(id); /* Somebody is waiting on the mutex */ - task_set_event(id, TASK_EVENT_MUTEX, 0); + task_set_event(id, TASK_EVENT_MUTEX); } /* Ensure no event is remaining from mutex wake-up */ |