Definition at line 19 of file RWLock.h.
◆ RWLock()
◆ ~RWLock()
◆ destroy()
Definition at line 52 of file RWLock.cc.
53{
54 if (pthread_rwlock_destroy(&m_lock) != 0) {
55 return true;
56 } else {
57 return false;
58 }
59}
◆ init()
Definition at line 16 of file RWLock.cc.
17{
18 pthread_rwlockattr_t attr;
19 pthread_rwlockattr_init(&attr);
20 pthread_rwlockattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
21 pthread_rwlock_init(&m_lock, &attr);
22 pthread_rwlockattr_destroy(&attr);
23 return true;
24}
◆ rdlock()
Definition at line 26 of file RWLock.cc.
27{
28 if (pthread_rwlock_rdlock(&m_lock) != 0) {
29 return false;
30 } else {
31 return true;
32 }
33}
◆ size()
Definition at line 22 of file RWLock.h.
23 {
24 return sizeof(pthread_rwlock_t);
25 }
◆ unlock()
Definition at line 43 of file RWLock.cc.
44{
45 if (pthread_rwlock_unlock(&m_lock) != 0) {
46 return true;
47 } else {
48 return false;
49 }
50}
◆ wrlock()
Definition at line 35 of file RWLock.cc.
36{
37 if (pthread_rwlock_wrlock(&m_lock) != 0) {
38 return false;
39 }
40 return true;
41}
◆ m_lock
The documentation for this class was generated from the following files: