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


##########
sched/event/event_wait.c:
##########
@@ -121,30 +121,20 @@ nxevent_mask_t nxevent_tickwait_wait(FAR nxevent_t *event,
     {
       /* Initialize event wait */
 
-      nxsem_init(&(wait->sem), 0, 0);
       wait->expect = events;
       wait->eflags = eflags;
+      wait->wtcb = nxsched_self();
 
       list_add_tail(&event->list, &(wait->node));
       spin_unlock_irqrestore(&event->lock, flags);

Review Comment:
   By the way, the wait object used by the event wait function is only for the 
current task, although it is the same event object that all the waiting tasks 
on this event will use , so in fact each waiting task has a separate wait 
object, just like before, i just removed the sem in the wait object to save 
memory, so no problem i think
   
   What do you think?



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