#include <RWLock.hh>
Public Member Functions | |
clRWLock () | |
Constructor; creates and initializes the read-write lock. | |
~clRWLock () | |
Desctructor; destroys the read-write lock. | |
bool | WaitRead () |
Obtain read-lock. | |
bool | WaitWrite () |
Obtain exclusive write-lock. | |
bool | Release () |
Release lock. | |
bool | TryRead () |
Try to obtain read-lock (non-blocking). | |
bool | TryWrite () |
Try to obtain exclusive write-lock (non-blocking). | |
Private Attributes | |
pthread_rwlock_t | ptrwlLock |
Definition at line 47 of file RWLock.hh.
|
Constructor; creates and initializes the read-write lock.
Definition at line 54 of file RWLock.hh. References ptrwlLock. |
|
Desctructor; destroys the read-write lock.
Definition at line 59 of file RWLock.hh. References ptrwlLock. |
|
Obtain read-lock. There can be multiple read-locks at the same time.
Definition at line 67 of file RWLock.hh. References ptrwlLock. |
|
Obtain exclusive write-lock. There can be only one write-lock and no read-locks at the same time.
Definition at line 80 of file RWLock.hh. References ptrwlLock. |
|
Release lock.
Definition at line 91 of file RWLock.hh. References ptrwlLock. |
|
Try to obtain read-lock (non-blocking).
Definition at line 102 of file RWLock.hh. References ptrwlLock. |
|
Try to obtain exclusive write-lock (non-blocking).
Definition at line 113 of file RWLock.hh. References ptrwlLock. |
|
Definition at line 49 of file RWLock.hh. Referenced by clRWLock(), Release(), TryRead(), TryWrite(), WaitRead(), WaitWrite(), and ~clRWLock(). |