Kyoto Cabinet
|
Lightweight reader-writer locking device. More...
#include <kcthread.h>
Public Member Functions | |
SpinRWLock () | |
Default constructor. | |
~SpinRWLock () | |
Destructor. | |
void | lock_writer () |
Get the writer lock. | |
bool | lock_writer_try () |
Try to get the writer lock. | |
void | lock_reader () |
Get a reader lock. | |
bool | lock_reader_try () |
Try to get a reader lock. | |
void | unlock () |
Release the lock. | |
bool | promote () |
Promote a reader lock to the writer lock. | |
void | demote () |
Demote the writer lock to a reader lock. |
Lightweight reader-writer locking device.
kyotocabinet::SpinRWLock::SpinRWLock | ( | ) | [explicit] |
Default constructor.
Destructor.
Get the writer lock.
Try to get the writer lock.
Get a reader lock.
Try to get a reader lock.
void kyotocabinet::SpinRWLock::unlock | ( | ) |
Release the lock.
bool kyotocabinet::SpinRWLock::promote | ( | ) |
Promote a reader lock to the writer lock.
void kyotocabinet::SpinRWLock::demote | ( | ) |
Demote the writer lock to a reader lock.