anchao opened a new pull request, #21034:
URL: https://github.com/apache/nuttx/pull/21034

   ## Summary                                                                   
     
                                                                                
     
   Optimize `nxevent_post()` by skipping waiter wakeup processing when the 
event     
   wait list is empty.                                                          
     
                                                                                
     
   The posted event bits are still updated first, so future waiters can observe 
     
   the posted event state as before. If there are no tasks currently waiting on 
     
   the event object, the function now returns immediately instead of preparing  
     
   post-processing state and iterating over an empty wait list.                 
     
                                                                                
     
   This avoids unnecessary work in the common case where events are posted 
before    
   any task is waiting for them.                                                
     
                                                                                
     
   ## Impact                                                                    
     
                                                                                
     
   No user-visible behavior change is expected.                                 
     
                                                                                
     
   Expected impact:                                                             
     
                                                                                
     
   - reduces overhead when posting events with no current waiters               
     
   - preserves existing event state semantics for future waiters                
     
   - does not change wakeup behavior when waiters are present                   
     
   - no API, ABI, build-system, documentation, or security impact is expected   
     
                                                                                
     
   ## Testing                                                                   
     
   
   sim/nsh


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