xiaoxiang781216 commented on pull request #4129:
URL: https://github.com/apache/incubator-nuttx/pull/4129#issuecomment-881153955


   > my reading of the standard is that if an implementation detects the 
condition, it can report EBUSY.
   > it seems fine not to detect the condition.
   > IMO this is something which shouldn't be "fixed".
   > ltp is just broken or probably checking too specific implementation 
behavior.
   
   It isn't an implementation behaviour, it specify and recommand in standard:
   ```
   [EBUSY]
   The implementation has detected an attempt to destroy a barrier while it is 
in use (for example, while being used in a pthread_barrier_wait() call) by 
another thread.
   ```
   
   > i think it's better not to "fix" this.
   
   And openbsd also return EBUSY too:
   
https://github.com/openbsd/src/blob/2207c4325726fdc5c4bcd0011af0fdf7d3dab137/lib/librthread/rthread_barrier.c#L86-L89


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