Kea 2.7.5
|
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 |
Lock read.
Definition at line 74 of file readwrite_mutex.h.
References MAX_READERS.
Referenced by isc::util::ReadLockGuard::ReadLockGuard().
|
inline |
Unlock read.
Definition at line 84 of file readwrite_mutex.h.
References MAX_READERS.
Referenced by isc::util::ReadLockGuard::~ReadLockGuard().
|
inline |
Lock write.
Definition at line 54 of file readwrite_mutex.h.
References WRITE_ENTERED.
Referenced by isc::util::WriteLockGuard::WriteLockGuard().
|
inline |
Unlock write.
Definition at line 66 of file readwrite_mutex.h.
Referenced by isc::util::WriteLockGuard::~WriteLockGuard().
|
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().