17class PosixThreadBarrier
48 outstandingThreads(0),
volatile long outstandingThreads
Definition posixthreadbarrier.h:38
long numThreads
Definition posixthreadbarrier.h:37
void Setup(SizeT numThreads)
setup the object with the number of threads
Definition posixthreadbarrier.h:69
bool Arrive()
enter thread barrier, return false if not all threads have arrived yet
Definition posixthreadbarrier.h:90
void Wait()
call after Arrive() returns false to wait for other threads
Definition posixthreadbarrier.h:102
~PosixThreadBarrier()
destructor
Definition posixthreadbarrier.h:58
bool IsValid() const
return true if the object has been setup
Definition posixthreadbarrier.h:81
Threading::CriticalSection critSect
Definition posixthreadbarrier.h:36
sem_t * semaphore
Definition posixthreadbarrier.h:39
PosixThreadBarrier()
constructor
Definition posixthreadbarrier.h:46
bool isValid
Definition posixthreadbarrier.h:40
void SignalContinue()
call after Arrive() returns true to resume all threads
Definition posixthreadbarrier.h:121
Critical section objects are used to protect a portion of code from parallel execution.
#define n_assert(exp)
Definition debug.h:50
Posix implemention of a read-many write-few lock.
Definition posixsysfunc.cc:21
A semaphore is an inter-GPU queue synchronization primitive.
int SizeT
Definition types.h:49