wes3 commented on code in PR #3117:
URL: https://github.com/apache/mynewt-core/pull/3117#discussion_r1419780701
##########
kernel/os/src/os_eventq.c:
##########
@@ -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) {
Review Comment:
I read the code in more detail (which I should have done before approving
admittedly) and yes you are correct. Checking evq_task first will guarantee the
above situation does not occur. This is good :-) Thanks guys
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]