kasjer commented on code in PR #3117:
URL: https://github.com/apache/mynewt-core/pull/3117#discussion_r1418579271


##########
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:
   While this does not break anything I don't think it solves the problem.
   `evq->evq_task` is only set when task calls `os_eventq_get()` this is 
blocking call so it's strange that same task can later call `os_sem_pend()`.
   For me it more likely looks like memory corruption of task struct.



-- 
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]

Reply via email to