function causes the current thread to wait on the barrier specified.
Once as many threads as specified by the
.Facount
parameter to the corresponding
.Fnpthread_barrier_init
call have called
.Fnpthread_barrier_wait,
all threads will wake up, return from their respective
.Fnpthread_barrier_wait
calls and continue execution.
.ShRETURNVALUES
If successful,
.Fnpthread_barrier_wait
will return zero for all waiting threads except for one. One thread will
receive status
.DvPTHREAD_BARRIER_SERIAL_THREAD,
which is intended to indicate that this thead may be used to update
shared data. It is the responsibilty of this thread to insure the visibility and atomicity of any updates to shared data with respect to the other threads participating in the barrier.
In the case of failure, an error value will be returned.