Slotted mutex device.
More...
#include <kcthread.h>
List of all members.
Public Member Functions |
| SlottedMutex (size_t slotnum) |
| Constructor.
|
| ~SlottedMutex () |
| 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.
|
Detailed Description
Constructor & Destructor Documentation
kyotocabinet::SlottedMutex::SlottedMutex |
( |
size_t |
slotnum | ) |
[explicit] |
Constructor.
- Parameters:
-
slotnum | the number of slots. |
kyotocabinet::SlottedMutex::~SlottedMutex |
( |
| ) |
|
Member Function Documentation
void kyotocabinet::SlottedMutex::lock |
( |
size_t |
idx | ) |
|
Get the lock of a slot.
- Parameters:
-
void kyotocabinet::SlottedMutex::unlock |
( |
size_t |
idx | ) |
|
Release the lock of a slot.
- Parameters:
-
void kyotocabinet::SlottedMutex::lock_all |
( |
| ) |
|
Get the locks of all slots.
void kyotocabinet::SlottedMutex::unlock_all |
( |
| ) |
|
Release the locks of all slots.