The
pthread_barrier_init()
function will initialize
barrier
with attributes specified in
attr,
or if it is
NULL,
with default attributes.
The number of threads that must call
pthread_barrier_wait()
before any of the waiting threads can be
released is specified by
count.
The
pthread_barrier_destroy()
function will destroy
barrier
and release any resources that may have been allocated on its behalf.
The
pthread_barrier_wait()
function will synchronize calling threads at
barrier.
The threads will be blocked from
making further progress until
a sufficient number of threads calls this function.
The number of threads that must call it before
any of them will be released is determined by the
count
argument to
pthread_barrier_init().
Once the threads have been released the barrier will be reset.