Multithreaded Programming Guide

pthread_barrier_wait() Return Values

When pthread_barrier_wait() completes successfully, the function returns PTHREAD_BARRIER_SERIAL_THREAD, which is defined in pthread.h, for one arbitrary thread synchronized at the barrier. The function returns zero for each of the other threads. Otherwise an error code is returned.


EINVAL

Description:

The value specified by barrier does not refer to an initialized barrier object.