#include <RWlock.h>
User is resonsible for enforcing semantics.
This lock favors writers
Public Member Functions | |
RWLock () | |
Construct a RWLock. | |
void | readlock (int32 id=0) |
Obtains the read permission. | |
void | writelock (int32 id=0) |
Obertains the write permission. | |
void | readunlock () |
Release the read lock. | |
void | writeunlock () |
Release the write lock. |
|
Construct a RWLock. Defines a readwriteLock template to help user protect data items. User is resonsible for enforcing semantics. This lock favors writers |
|
Obtains the read permission. If the thread is blocked and the DEBUG is defined, then a message will be ouptut saying that reader at id is blocked.
|
|
Release the read lock.
|
|
Obertains the write permission. If the thread is blocked and the DEBUG is defined, then a message will be ouptut saying that reader at id is blocked.
|
|
Release the write lock.
|