1 #ifndef COIN_SBCONDVAR_H 2 #define COIN_SBCONDVAR_H 27 #include <Inventor/SbBasic.h> 28 #include <Inventor/SbTime.h> 29 #include <Inventor/C/threads/condvar.h> 30 #include <Inventor/threads/SbMutex.h> 34 SbCondVar(
void) { this->condvar = cc_condvar_construct(); }
38 return cc_condvar_wait(this->condvar, mutex.mutex) == CC_OK;
41 return cc_condvar_timed_wait(this->condvar, mutex.mutex, period.
getValue()) == CC_OK;
44 void wakeOne(
void) { cc_condvar_wake_one(this->condvar); }
45 void wakeAll(
void) { cc_condvar_wake_all(this->condvar); }
51 #endif // !COIN_SBCONDVAR_H A basic class for managing a mutex.This class provides a portable framework around the mutex interfac...
Definition: SbMutex.h:30
double getValue(void) const
Definition: SbTime.cpp:278
void wakeOne(void)
Definition: SbCondVar.h:44
SbBool timedWait(SbMutex &mutex, SbTime period)
Definition: SbCondVar.h:40
A class for synchronizing access to global variables.Condition variables are used to protect global v...
Definition: SbCondVar.h:32
SbBool wait(SbMutex &mutex)
Definition: SbCondVar.h:37
~SbCondVar(void)
Definition: SbCondVar.h:35
The SbTime class instances represents time values.SbTime is a convenient way of doing system independ...
Definition: SbTime.h:41
void wakeAll(void)
Definition: SbCondVar.h:45
SbCondVar(void)
Definition: SbCondVar.h:34