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