Kyoto Cabinet: kyotocabinet::SlottedRWLock Class Reference

Kyoto Cabinet

- Main Page
- Namespaces
- Classes
- Files

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

Public Member Functions
kyotocabinet::SlottedRWLock Class Reference

Slotted reader-writer lock devices. More...

`#include <kcthread.h>`

List of all members.

## Public Member Functions
| SlottedRWLock (size_t slotnum)
| Constructor.
| ~SlottedRWLock ()
| 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.

## Detailed Description

Slotted reader-writer lock devices.

## Constructor & Destructor Documentation

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

Constructor.

Parameters:

  slotnum | the number of slots.

kyotocabinet::SlottedRWLock::~SlottedRWLock | ( |  | ) |

Destructor.

## Member Function Documentation

void kyotocabinet::SlottedRWLock::lock_writer | ( | size_t | idx | ) |

Get the writer lock of a slot.

Parameters:

  idx | the index of a slot.

void kyotocabinet::SlottedRWLock::lock_reader | ( | size_t | idx | ) |

Get the reader lock of a slot.

Parameters:

  idx | the index of a slot.

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

Release the lock of a slot.

Parameters:

  idx | the index of a slot.

void kyotocabinet::SlottedRWLock::lock_writer_all | ( |  | ) |

Get the writer locks of all slots.

void kyotocabinet::SlottedRWLock::lock_reader_all | ( |  | ) |

Get the reader locks of all slots.

void kyotocabinet::SlottedRWLock::unlock_all | ( |  | ) |

Release the locks of all slots.