|
Kyoto Cabinet
|
Slotted lightweight reader-writer lock devices. More...
#include <kcthread.h>
Public Member Functions | |
| SlottedSpinRWLock (size_t slotnum) | |
| Constructor. | |
| ~SlottedSpinRWLock () | |
| Destructor. | |
| void | lock_writer (size_t idx) |
| Get the writer lock of a slot. | |
| void | lock_reader (size_t idx) |
| Get the reader lock of a slot. | |
| void | unlock (size_t idx) |
| Release the lock of a slot. | |
| void | lock_writer_all () |
| Get the writer locks of all slots. | |
| void | lock_reader_all () |
| Get the reader locks of all slots. | |
| void | unlock_all () |
| Release the locks of all slots. | |
Slotted lightweight reader-writer lock devices.
| kyotocabinet::SlottedSpinRWLock::SlottedSpinRWLock | ( | size_t | slotnum | ) | [explicit] |
Constructor.
| slotnum | the number of slots. |
Destructor.
| void kyotocabinet::SlottedSpinRWLock::lock_writer | ( | size_t | idx | ) |
Get the writer lock of a slot.
| idx | the index of a slot. |
| void kyotocabinet::SlottedSpinRWLock::lock_reader | ( | size_t | idx | ) |
Get the reader lock of a slot.
| idx | the index of a slot. |
| void kyotocabinet::SlottedSpinRWLock::unlock | ( | size_t | idx | ) |
Release the lock of a slot.
| idx | the index of a slot. |
Get the writer locks of all slots.
Get the reader locks of all slots.
Release the locks of all slots.
1.7.6.1