Skip to content

Commit

Permalink
FWS-1372 Fix os_eventq_put() to wake up task only if EVQ_WAIT flag is
Browse files Browse the repository at this point in the history
set

- This was causing a task waiting on a semaphore to wakeup on scheduling
an event
  • Loading branch information
vrahane committed Dec 7, 2023
1 parent 259b76d commit 7f6187b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/os/src/os_eventq.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ os_eventq_put(struct os_eventq *evq, struct os_event *ev)
* Check if task is sleeping, because another event
* queue may have woken this task up beforehand.
*/
if (evq->evq_task->t_state == OS_TASK_SLEEP) {
if (evq->evq_task->t_state == OS_TASK_SLEEP &&
evq->evq_task->t_flags & OS_TASK_FLAG_EVQ_WAIT) {
os_sched_wakeup(evq->evq_task);
resched = 1;
}
Expand Down

0 comments on commit 7f6187b

Please sign in to comment.