cheshirekow
v0.1.0
|
A barrier is an object which synchronizes a fixed number of threads at a specific point. More...
#include <cpp_pthreads/barrier.h>
Public Member Functions | |
int | destroy () |
destroy the barrier More... | |
int | init (unsigned count) |
initialize a barrier for count threads using default attributes More... | |
int | init (const Attr< Barrier > &attr, unsigned count) |
initialize a barrier for count threads using the specified attributes More... | |
int | wait () |
called by a thread which wishes to synchronize on the barrier. Will block until count threads are all wait()ing on the barrier More... | |
Private Attributes | |
pthread_barrier_t | m_data |
A barrier is an object which synchronizes a fixed number of threads at a specific point.
count
threads are waiting on the barrier, they will all be released. int pthreads::Barrier::destroy | ( | ) |
destroy the barrier
int pthreads::Barrier::init | ( | unsigned | count | ) |
initialize a barrier for count
threads using default attributes
initialize a barrier for count
threads using the specified attributes
int pthreads::Barrier::wait | ( | ) |
called by a thread which wishes to synchronize on the barrier. Will block until count
threads are all wait()ing on the barrier