1 #ifndef COIN_SBRWMUTEX_H
2 #define COIN_SBRWMUTEX_H
27 #include <Inventor/C/threads/rwmutex.h>
37 this->rwmutex = cc_rwmutex_construct_etc(
38 (policy == WRITE_PRECEDENCE)? CC_WRITE_PRECEDENCE : CC_READ_PRECEDENCE);
43 return cc_rwmutex_write_lock(this->rwmutex) == CC_OK ? 0 : 1;
46 return cc_rwmutex_write_try_lock(this->rwmutex) == CC_OK;
49 return cc_rwmutex_write_unlock(this->rwmutex) == CC_OK ? 0 : 1;
53 return cc_rwmutex_read_lock(this->rwmutex) == CC_OK ? 0 : 1;
56 return cc_rwmutex_read_try_lock(this->rwmutex) == CC_OK;
59 return cc_rwmutex_read_unlock(this->rwmutex) == CC_OK ? 0 : 1;
66 #endif // !COIN_SBRWMUTEX_H
int tryReadLock(void)
Definition: SbRWMutex.h:55
int readLock(void)
Definition: SbRWMutex.h:52
~SbRWMutex(void)
Definition: SbRWMutex.h:40
int readUnlock(void)
Definition: SbRWMutex.h:58
SbRWMutex(Precedence policy)
Definition: SbRWMutex.h:36
int writeUnlock(void)
Definition: SbRWMutex.h:48
SbBool tryWriteLock(void)
Definition: SbRWMutex.h:45
int writeLock(void)
Definition: SbRWMutex.h:42
Definition: SbRWMutex.h:29