BLOCXX_NAMESPACE::RWLocker Class Reference

#include <RWLocker.hpp>

List of all members.

Public Member Functions

 RWLocker ()
 ~RWLocker ()
void getReadLock (UInt32 sTimeout, UInt32 usTimeout=0)
void getWriteLock (UInt32 sTimeout, UInt32 usTimeout=0)
void releaseReadLock ()
void releaseWriteLock ()

Private Member Functions

void doWakeups ()

Private Attributes

Condition m_waiting_writers
Condition m_waiting_readers
int m_num_waiting_writers
int m_num_waiting_readers
int m_readers_next
NonRecursiveMutex m_guard
int m_state
Array< Thread_tm_readers
Thread_t m_writer


Detailed Description

Definition at line 51 of file RWLocker.hpp.


Constructor & Destructor Documentation

BLOCXX_NAMESPACE::RWLocker::RWLocker  ) 
 

Definition at line 50 of file RWLocker.cpp.

BLOCXX_NAMESPACE::RWLocker::~RWLocker  ) 
 

Definition at line 61 of file RWLocker.cpp.


Member Function Documentation

void BLOCXX_NAMESPACE::RWLocker::doWakeups  )  [private]
 

Definition at line 190 of file RWLocker.cpp.

References m_num_waiting_readers, m_num_waiting_writers, m_readers_next, m_waiting_readers, m_waiting_writers, BLOCXX_NAMESPACE::Condition::notifyAll(), and BLOCXX_NAMESPACE::Condition::notifyOne().

Referenced by releaseReadLock(), and releaseWriteLock().

void BLOCXX_NAMESPACE::RWLocker::getReadLock UInt32  sTimeout,
UInt32  usTimeout = 0
 

Definition at line 75 of file RWLocker.cpp.

References BLOCXX_THROW, BLOCXX_NAMESPACE::ThreadImpl::currentThread(), m_guard, m_num_waiting_readers, m_state, m_waiting_readers, m_writer, BLOCXX_NAMESPACE::ThreadImpl::sameThreads(), and BLOCXX_NAMESPACE::Condition::timedWait().

void BLOCXX_NAMESPACE::RWLocker::getWriteLock UInt32  sTimeout,
UInt32  usTimeout = 0
 

Definition at line 111 of file RWLocker.cpp.

References BLOCXX_THROW, BLOCXX_NAMESPACE::ThreadImpl::currentThread(), i, m_guard, m_readers, m_state, BLOCXX_NAMESPACE::ThreadImpl::sameThreads(), and BLOCXX_NAMESPACE::Array< T >::size().

void BLOCXX_NAMESPACE::RWLocker::releaseReadLock  ) 
 

Definition at line 146 of file RWLocker.cpp.

References BLOCXX_THROW, BLOCXX_NAMESPACE::ThreadImpl::currentThread(), doWakeups(), i, m_guard, m_readers, m_state, BLOCXX_NAMESPACE::Array< T >::remove(), BLOCXX_NAMESPACE::ThreadImpl::sameThreads(), and BLOCXX_NAMESPACE::Array< T >::size().

void BLOCXX_NAMESPACE::RWLocker::releaseWriteLock  ) 
 

Definition at line 173 of file RWLocker.cpp.

References BLOCXX_THROW, doWakeups(), m_guard, and m_state.


Member Data Documentation

NonRecursiveMutex BLOCXX_NAMESPACE::RWLocker::m_guard [private]
 

Definition at line 69 of file RWLocker.hpp.

Referenced by getReadLock(), getWriteLock(), releaseReadLock(), and releaseWriteLock().

int BLOCXX_NAMESPACE::RWLocker::m_num_waiting_readers [private]
 

Definition at line 66 of file RWLocker.hpp.

Referenced by doWakeups(), and getReadLock().

int BLOCXX_NAMESPACE::RWLocker::m_num_waiting_writers [private]
 

Definition at line 65 of file RWLocker.hpp.

Referenced by doWakeups().

Array<Thread_t> BLOCXX_NAMESPACE::RWLocker::m_readers [private]
 

Definition at line 79 of file RWLocker.hpp.

Referenced by getWriteLock(), and releaseReadLock().

int BLOCXX_NAMESPACE::RWLocker::m_readers_next [private]
 

Definition at line 67 of file RWLocker.hpp.

Referenced by doWakeups().

int BLOCXX_NAMESPACE::RWLocker::m_state [private]
 

Definition at line 72 of file RWLocker.hpp.

Referenced by getReadLock(), getWriteLock(), releaseReadLock(), and releaseWriteLock().

Condition BLOCXX_NAMESPACE::RWLocker::m_waiting_readers [private]
 

Definition at line 63 of file RWLocker.hpp.

Referenced by doWakeups(), and getReadLock().

Condition BLOCXX_NAMESPACE::RWLocker::m_waiting_writers [private]
 

Definition at line 62 of file RWLocker.hpp.

Referenced by doWakeups().

Thread_t BLOCXX_NAMESPACE::RWLocker::m_writer [private]
 

Definition at line 85 of file RWLocker.hpp.

Referenced by getReadLock().


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 15:39:11 2006 for blocxx by  doxygen 1.4.6