Kyoto Cabinet
|
Slotted spin lock devices. More...
#include <kcthread.h>
Public Member Functions | |
SlottedSpinLock (size_t slotnum) | |
Constructor. | |
~SlottedSpinLock () | |
Destructor. | |
void | lock (size_t idx) |
Get the lock of a slot. | |
void | unlock (size_t idx) |
Release the lock of a slot. | |
void | lock_all () |
Get the locks of all slots. | |
void | unlock_all () |
Release the locks of all slots. |
Slotted spin lock devices.
kyotocabinet::SlottedSpinLock::SlottedSpinLock | ( | size_t | slotnum | ) | [explicit] |
Constructor.
slotnum | the number of slots. |
Destructor.
void kyotocabinet::SlottedSpinLock::lock | ( | size_t | idx | ) |
Get the lock of a slot.
idx | the index of a slot. |
void kyotocabinet::SlottedSpinLock::unlock | ( | size_t | idx | ) |
Release the lock of a slot.
idx | the index of a slot. |
Get the locks of all slots.
Release the locks of all slots.