ergo
|
Functions | |
int | ergo_barrier_init (ergo_barrier_t *barrier, const void *attr_ignored, unsigned int count) |
int | ergo_barrier_destroy (ergo_barrier_t *barrier) |
int | ergo_barrier_wait (ergo_barrier_t *barrier) |
implements a pthread-compatible barrier. This is to be used with older pthread implementations that do not provide barriers. This implementation is applicable only in simple cases. Check section 7.1.1 of "Programming with POSIX threads" for a full-blown implementation. In particular, this implementation does not check for some error conditions, like destroying the barrier when some threads wait on it.
int ergo_barrier_destroy | ( | ergo_barrier_t * | barrier | ) |
References ergo_barrier::barrierMutex, and ergo_barrier::conditionVar.
Referenced by sync_threads().
int ergo_barrier_init | ( | ergo_barrier_t * | barrier, |
const void * | attr_ignored, | ||
unsigned int | count | ||
) |
References ergo_barrier::barrierMutex, ergo_barrier::conditionVar, ergo_barrier::currCount, and ergo_barrier::initCount.
Referenced by sync_threads().
int ergo_barrier_wait | ( | ergo_barrier_t * | barrier | ) |
References ergo_barrier::barrierMutex, ergo_barrier::conditionVar, ergo_barrier::currCount, ergo_barrier::cycle, ergo_barrier::initCount, and PTHREAD_BARRIER_SERIAL_THREAD.
Referenced by sync_threads().