kyotocabinet::SlottedSpinRWLock Class Reference
Slotted lightweight reader-writer lock devices.
More...
#include <kcthread.h>
List of all members.
Detailed Description
Slotted lightweight reader-writer lock devices.
Constructor & Destructor Documentation
kyotocabinet::SlottedSpinRWLock::SlottedSpinRWLock |
( |
size_t |
slotnum |
) |
[explicit] |
Constructor.
- Parameters:
-
| slotnum | the number of slots. |
kyotocabinet::SlottedSpinRWLock::~SlottedSpinRWLock |
( |
|
) |
|
Member Function Documentation
void kyotocabinet::SlottedSpinRWLock::lock_writer |
( |
size_t |
idx |
) |
|
Get the writer lock of a slot.
- Parameters:
-
void kyotocabinet::SlottedSpinRWLock::lock_reader |
( |
size_t |
idx |
) |
|
Get the reader lock of a slot.
- Parameters:
-
void kyotocabinet::SlottedSpinRWLock::unlock |
( |
size_t |
idx |
) |
|
Release the lock of a slot.
- Parameters:
-
void kyotocabinet::SlottedSpinRWLock::lock_writer_all |
( |
|
) |
|
Get the writer locks of all slots.
void kyotocabinet::SlottedSpinRWLock::lock_reader_all |
( |
|
) |
|
Get the reader locks of all slots.
void kyotocabinet::SlottedSpinRWLock::unlock_all |
( |
|
) |
|
Release the locks of all slots.