Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

LOW_objectSynchronizer::__synchronizeMethodReadWeak Class Reference

Weak read locking class to ensure exclusive access. More...

#include <LOW_objectSynchronizer.h>

Collaboration diagram for LOW_objectSynchronizer::__synchronizeMethodReadWeak:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 __synchronizeMethodReadWeak (const LOW_objectSynchronizer &inObjectSynchronizer, std::string inFile, int inLine)
 Obtain the weak read lock.

 ~__synchronizeMethodReadWeak ()
 Release the weak lock.


Private Attributes

const LOW_objectSynchronizerobjectSynchronizer
 Reference to the object to lock on.

bool wasObtainedWeakly
 Indicate if lock was really obtained.


Detailed Description

Weak read locking class to ensure exclusive access.

Works similar to __synchronizeMethodRead with one difference in the following situation: If the calling thread already has a write lock then no blocking will occur and no lock will be obtained.

Definition at line 443 of file LOW_objectSynchronizer.h.


Constructor & Destructor Documentation

LOW_objectSynchronizer::__synchronizeMethodReadWeak::__synchronizeMethodReadWeak const LOW_objectSynchronizer inObjectSynchronizer,
std::string  inFile,
int  inLine
[inline]
 

Obtain the weak read lock.

Inlined for performance reasons.

Parameters:
inObjectSynchronizer Reference to the object to synchronize on.

Definition at line 451 of file LOW_objectSynchronizer.h.

References LOW_platformMisc::getThreadID(), LOW_thread_rwlock::lockRead(), objectSynchronizer, LOW_objectSynchronizer::objectSyncRwlock, LOW_helper_msglog::objSync_getLock_dl, LOW_helper_msglog::objSync_lockFailed_dl, LOW_helper_msglog::printDebug(), LOW_thread_rwlock::tryLockRead(), wasObtainedWeakly, and LOW_objectSynchronizer::writeLockHolder.

LOW_objectSynchronizer::__synchronizeMethodReadWeak::~__synchronizeMethodReadWeak  )  [inline]
 

Release the weak lock.

Inlined for performance reasons.

Definition at line 479 of file LOW_objectSynchronizer.h.

References objectSynchronizer, LOW_objectSynchronizer::objectSyncRwlock, LOW_thread_rwlock::unlock(), and wasObtainedWeakly.


Member Data Documentation

const LOW_objectSynchronizer& LOW_objectSynchronizer::__synchronizeMethodReadWeak::objectSynchronizer [private]
 

Reference to the object to lock on.

Definition at line 486 of file LOW_objectSynchronizer.h.

Referenced by __synchronizeMethodReadWeak(), and ~__synchronizeMethodReadWeak().

bool LOW_objectSynchronizer::__synchronizeMethodReadWeak::wasObtainedWeakly [private]
 

Indicate if lock was really obtained.

Definition at line 487 of file LOW_objectSynchronizer.h.

Referenced by __synchronizeMethodReadWeak(), and ~__synchronizeMethodReadWeak().


The documentation for this class was generated from the following file:
Generated on Tue Feb 3 11:31:04 2004 for OneWireLibrary++ by doxygen 1.3.2