posix/pthreads: fix pthread_barrier_wait() behavior to match Posix

Exactly one caller of pthread_barrier_wait() should receive a return
value of PTHREAD_BARRIER_SERIAL_WAIT; all others should receive zero
(or an error code). Added a test to match.

Fixes: #9953

Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
Charles E. Youse 2019-03-01 15:22:22 -08:00 committed by Anas Nashif
commit 3522e05f76
3 changed files with 20 additions and 7 deletions

View file

@ -334,6 +334,8 @@ static inline int pthread_mutexattr_destroy(pthread_mutexattr_t *m)
.max = count, \
}
#define PTHREAD_BARRIER_SERIAL_THREAD 1
/**
* @brief POSIX threading compatibility API
*