27 #include <Inventor/SbBasic.h> 28 #include <Inventor/C/threads/mutex.h> 32 SbMutex(
void) { this->mutex = cc_mutex_construct(); }
33 ~SbMutex(
void) { cc_mutex_destruct(this->mutex); }
36 return cc_mutex_lock(this->mutex) == CC_OK ? 0 : 1;
39 return cc_mutex_try_lock(this->mutex) == CC_OK;
42 return cc_mutex_unlock(this->mutex) == CC_OK ? 0 : 1;
56 #include <Inventor/threads/SbThreadAutoLock.h> 57 #endif // COIN_INTERNAL 59 #endif // !COIN_SBMUTEX_H A basic class for managing a mutex.This class provides a portable framework around the mutex interfac...
Definition: SbMutex.h:30
SbBool tryLock(void)
Definition: SbMutex.h:38
int unlock(void)
Definition: SbMutex.h:41
int lock(void)
Definition: SbMutex.h:35
A class for synchronizing access to global variables.Condition variables are used to protect global v...
Definition: SbCondVar.h:32
SbMutex(void)
Definition: SbMutex.h:32
~SbMutex(void)
Definition: SbMutex.h:33