Kyoto Cabinet

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
kyotocabinet::SlottedSpinLock Class Reference

Slotted spin lock devices. More...

`#include <kcthread.h>`

List of all members.

## 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.

## Detailed Description

Slotted spin lock devices.

## Constructor & Destructor Documentation

kyotocabinet::SlottedSpinLock::SlottedSpinLock | ( | size_t | slotnum | ) | `[explicit]`

Constructor.

Parameters:

  slotnum | the number of slots.

kyotocabinet::SlottedSpinLock::~SlottedSpinLock | ( |  | ) |

Destructor.

## Member Function Documentation

void kyotocabinet::SlottedSpinLock::lock | ( | size_t | idx | ) |

Get the lock of a slot.

Parameters:

  idx | the index of a slot.

void kyotocabinet::SlottedSpinLock::unlock | ( | size_t | idx | ) |

Release the lock of a slot.

Parameters:

  idx | the index of a slot.

void kyotocabinet::SlottedSpinLock::lock_all | ( |  | ) |

Get the locks of all slots.

void kyotocabinet::SlottedSpinLock::unlock_all | ( |  | ) |

Release the locks of all slots.