|  | Kea 3.0.0
    | 
Read-Write Mutex. More...
#include <readwrite_mutex.h>
| Public Member Functions | |
| ReadWriteMutex () | |
| Constructor. | |
| virtual | ~ReadWriteMutex () | 
| Destructor. | |
| void | readLock () | 
| Lock read. | |
| void | readUnlock () | 
| Unlock read. | |
| void | writeLock () | 
| Lock write. | |
| void | writeUnlock () | 
| Unlock write. | |
| Static Public Attributes | |
| static const unsigned | MAX_READERS = ~WRITE_ENTERED | 
| The maximum number of readers (flag complement so 2^31 - 1). | |
| static const unsigned | WRITE_ENTERED | 
| Constants. | |
Read-Write Mutex.
The code is based on Howard Hinnant's reference implementation for C++17 shared_mutex.
Definition at line 29 of file readwrite_mutex.h.
| 
 | inline | 
Constructor.
Definition at line 42 of file readwrite_mutex.h.
| 
 | inlinevirtual | 
Destructor.
Definition at line 49 of file readwrite_mutex.h.
| 
 | inline | 
| 
 | inline | 
Unlock read.
Definition at line 84 of file readwrite_mutex.h.
References MAX_READERS.
| 
 | inline | 
| 
 | inline | 
Unlock write.
Definition at line 66 of file readwrite_mutex.h.
| 
 | static | 
The maximum number of readers (flag complement so 2^31 - 1).
Definition at line 39 of file readwrite_mutex.h.
Referenced by readLock(), and readUnlock().
| 
 | static | 
Constants.
The write entered flag (higher bit so 2^31).
Definition at line 35 of file readwrite_mutex.h.
Referenced by writeLock().