blocxx
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BLOCXX_NAMESPACE::RWLocker Class Reference

#include <RWLocker.hpp>

Classes

struct  ThreadComparer
 

Public Member Functions

 RWLocker ()
 
 ~RWLocker ()
 
void getReadLock (const Timeout &timeout)
 
void getReadLock (UInt32 sTimeout, UInt32 usTimeout=0) BLOCXX_DEPRECATED
 
void getWriteLock (const Timeout &timeout)
 
void getWriteLock (UInt32 sTimeout, UInt32 usTimeout=0) BLOCXX_DEPRECATED
 
void releaseReadLock ()
 
void releaseWriteLock ()
 

Private Member Functions

 RWLocker (const RWLocker &)
 
RWLockeroperator= (const RWLocker &)
 

Private Attributes

GenericRWLockImpl< Thread_t, ThreadComparerm_impl
 

Detailed Description

Definition at line 80 of file RWLocker.hpp.

Constructor & Destructor Documentation

◆ RWLocker() [1/2]

BLOCXX_NAMESPACE::RWLocker::RWLocker ( )

Definition at line 87 of file RWLocker.cpp.

◆ ~RWLocker()

BLOCXX_NAMESPACE::RWLocker::~RWLocker ( )

Definition at line 91 of file RWLocker.cpp.

◆ RWLocker() [2/2]

BLOCXX_NAMESPACE::RWLocker::RWLocker ( const RWLocker )
private

Member Function Documentation

◆ getReadLock() [1/2]

void BLOCXX_NAMESPACE::RWLocker::getReadLock ( const Timeout timeout)
Exceptions
TimeoutExceptionif the lock isn't acquired within the timeout.

Definition at line 103 of file RWLocker.cpp.

References BLOCXX_NAMESPACE::ThreadImpl::currentThread(), and m_impl.

◆ getReadLock() [2/2]

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

Definition at line 96 of file RWLocker.cpp.

References getWriteLock(), and BLOCXX_NAMESPACE::Timeout::relative().

◆ getWriteLock() [1/2]

void BLOCXX_NAMESPACE::RWLocker::getWriteLock ( const Timeout timeout)
Exceptions
TimeoutExceptionif the lock isn't acquired within the timeout.
DeadlockExceptionif this call would upgrade a read lock to a write lock and another thread is already waiting to upgrade. If this happens, the calling thread must release it's read lock in order for forward progress to be made.

Definition at line 132 of file RWLocker.cpp.

Referenced by getReadLock().

◆ getWriteLock() [2/2]

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

Definition at line 126 of file RWLocker.cpp.

◆ operator=()

RWLocker& BLOCXX_NAMESPACE::RWLocker::operator= ( const RWLocker )
private

◆ releaseReadLock()

void BLOCXX_NAMESPACE::RWLocker::releaseReadLock ( )
Exceptions
RWLockerExceptionif a read lock hasn't been acquired.

Definition at line 111 of file RWLocker.cpp.

References BLOCXX_THROW_SUBEX, BLOCXX_NAMESPACE::ThreadImpl::currentThread(), and m_impl.

◆ releaseWriteLock()

void BLOCXX_NAMESPACE::RWLocker::releaseWriteLock ( )
Exceptions
RWLockerExceptionif a write lock hasn't been acquired.

Definition at line 140 of file RWLocker.cpp.

Member Data Documentation

◆ m_impl

GenericRWLockImpl<Thread_t, ThreadComparer> BLOCXX_NAMESPACE::RWLocker::m_impl
private

Definition at line 120 of file RWLocker.hpp.

Referenced by getReadLock(), and releaseReadLock().


The documentation for this class was generated from the following files: