kyotocabinet::SlottedSpinRWLock< SLOTNUM > Class Template Reference

Slotted lightweight reader-writer lock devices. More...

#include <kcthread.h>

List of all members.

Public Member Functions

 SlottedSpinRWLock ()
 Constructor.
 ~SlottedSpinRWLock ()
 Destructor.
void lock_writer (int32_t idx)
 Get the writer lock of a slot.
void lock_reader (int32_t idx)
 Get the reader lock of a slot.
void unlock (int32_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

template<int32_t SLOTNUM>
class kyotocabinet::SlottedSpinRWLock< SLOTNUM >

Slotted lightweight reader-writer lock devices.

Parameters:
SLOTNUM the number of slots.

Constructor & Destructor Documentation

template<int32_t SLOTNUM>
kyotocabinet::SlottedSpinRWLock< SLOTNUM >::SlottedSpinRWLock (  )  [explicit]

Constructor.

template<int32_t SLOTNUM>
kyotocabinet::SlottedSpinRWLock< SLOTNUM >::~SlottedSpinRWLock (  ) 

Destructor.


Member Function Documentation

template<int32_t SLOTNUM>
void kyotocabinet::SlottedSpinRWLock< SLOTNUM >::lock_writer ( int32_t  idx  ) 

Get the writer lock of a slot.

Parameters:
idx the index of a slot.
template<int32_t SLOTNUM>
void kyotocabinet::SlottedSpinRWLock< SLOTNUM >::lock_reader ( int32_t  idx  ) 

Get the reader lock of a slot.

Parameters:
idx the index of a slot.
template<int32_t SLOTNUM>
void kyotocabinet::SlottedSpinRWLock< SLOTNUM >::unlock ( int32_t  idx  ) 

Release the lock of a slot.

Parameters:
idx the index of a slot.
template<int32_t SLOTNUM>
void kyotocabinet::SlottedSpinRWLock< SLOTNUM >::lock_writer_all (  ) 

Get the writer locks of all slots.

template<int32_t SLOTNUM>
void kyotocabinet::SlottedSpinRWLock< SLOTNUM >::lock_reader_all (  ) 

Get the reader locks of all slots.

template<int32_t SLOTNUM>
void kyotocabinet::SlottedSpinRWLock< SLOTNUM >::unlock_all (  ) 

Release the locks of all slots.

Generated on Sun Dec 19 12:53:11 2010 for Kyoto Cabinet by  doxygen 1.6.3