wangchdo commented on code in PR #17223:
URL: https://github.com/apache/nuttx/pull/17223#discussion_r2455054761


##########
include/nuttx/sched.h:
##########
@@ -253,6 +253,7 @@ enum tstate_e
   TSTATE_TASK_INACTIVE,       /* BLOCKED      - Initialized but not yet 
activated */
   TSTATE_WAIT_SEM,            /* BLOCKED      - Waiting for a semaphore */
   TSTATE_WAIT_SIG,            /* BLOCKED      - Waiting for a signal */
+  TSTATE_WAIT_EVENT,          /* BLOCKED      - Waiting for a event */

Review Comment:
   I think event is different than sleep... the scheduler need to treat task 
waiting on event separately for things like task cancellation, you can refer to 
the function `nxevent_wait_irq()` I implemented and it is called from 
`nxnotify_cancellation()`:
   
   
   <img width="1135" height="544" alt="image" 
src="https://github.com/user-attachments/assets/c1794dcc-8c3d-48ea-a665-cbc83649982e";
 />
   
   



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