You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/28 17:16:17 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on pull request #4246: libc/pthread_barrierattr_destory.c: Destroy shouldn't reinitialize the attributes

gustavonihei commented on pull request #4246:
URL: https://github.com/apache/incubator-nuttx/pull/4246#issuecomment-888480481


   Quoting from the Description section of standard latest version:
   
   > The behavior is undefined if the value specified by the attr argument to pthread_barrierattr_destroy() does not refer to an initialized barrier attributes object.
   
   And the update on Issue 7:
   
   > The [EINVAL] error for an uninitialized barrier attributes object is removed; this condition results in undefined behavior.
   
   So `pthread_barrierattr_destroy` should simply return 0, which is the same behavior from other implementations:
   - glibc: https://chromium.googlesource.com/chromiumos/third_party/glibc/+/refs/heads/master/nptl/pthread_barrierattr_destroy.c
   - musl: http://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_barrierattr_destroy.c
   
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org