Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

RWLock Class Reference

#include <RWlock.h>

List of all members.


Detailed Description

RWLock class implements a readwriteLock template to help user protect data items.

User is resonsible for enforcing semantics.

This lock favors writers


Public Member Functions

 RWLock ()
 Construct a RWLock.
void readlock (int32 id=0)
 Obtains the read permission.
void writelock (int32 id=0)
 Obertains the write permission.
void readunlock ()
 Release the read lock.
void writeunlock ()
 Release the write lock.


Constructor & Destructor Documentation

RWLock::RWLock  ) 
 

Construct a RWLock.

Defines a readwriteLock template to help user protect data items. User is resonsible for enforcing semantics.

This lock favors writers


Member Function Documentation

void RWLock::readlock int32  id = 0  ) 
 

Obtains the read permission.

If the thread is blocked and the DEBUG is defined, then a message will be ouptut saying that reader at id is blocked.

Parameters:
id The given parameter id can be used for debugging.

void RWLock::readunlock  ) 
 

Release the read lock.

void RWLock::writelock int32  id = 0  ) 
 

Obertains the write permission.

If the thread is blocked and the DEBUG is defined, then a message will be ouptut saying that reader at id is blocked.

Parameters:
id The given parameter id can be used for debugging.

void RWLock::writeunlock  ) 
 

Release the write lock.


The documentation for this class was generated from the following files:
Generated on Fri Nov 12 15:15:24 2004 for Borealis by doxygen 1.3.8