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


##########
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 prefer to introduce a new state TSTATE_WAIT_EVENT...... Because although 
the **scheduler list** is shared with signals, but in event case the task not 
only needs a timeout,  it is also blocked on a new object — **the event 
object**  and then **special actions are needed for scheduler to cope with 
cases that task is waiting on a event**, just like this `XXX_wait_irq` function 
for task cancel cases. This is similar to how a semaphore blocks a task on a 
**semaphore object**.



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