Phoenix
Object-oriented orthogonally persistent operating system
|
Read/write spin lock. More...
#include <md_lock.h>
Public Member Functions | |
void | ReadLock () |
Acquire read lock. | |
void | ReadUnlock () |
Release read lock. | |
void | WriteLock () |
Acquire write lock. | |
void | WriteUnlock () |
Release write lock. |
Read/write spin lock.
It allows several simultaneous reads but doesn't allow write simultaneously with another read or write.
Several fields are defined:
void RWSpinLock::ReadLock | ( | ) | [inline] |
Acquire read lock.
Several simultaneous read locks can be acquired.
void RWSpinLock::ReadUnlock | ( | ) | [inline] |
Release read lock.
void RWSpinLock::WriteLock | ( | ) | [inline] |
Acquire write lock.
It can be acquired only exclusively. It will not be acquired after previous write lock released and there are pending read locks.
void RWSpinLock::WriteUnlock | ( | ) | [inline] |
Release write lock.