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

MCRWMutex Class Reference

Representation of an readers/writer mutex object. More...

#include <mcllib/MCRWMutex.h>

Inheritance diagram for MCRWMutex:

MCMutex MCNonCopy List of all members.

Public Member Functions

virtual void lock ()
 Obtain a read lock on the the mutex object.
 MCRWMutex (const char *name, mcuint32 rank=0)
 Open an RW Mutex.
virtual void readLock ()
 Obtain a read lock on the mutex object.
virtual void unlock ()
 Unlock the mutex object.
virtual void writeLock ()
 Obtain a write lock on the mutex object.
virtual ~MCRWMutex ()
 Virtual destructor.

Detailed Description

Representation of an readers/writer mutex object.

Multiple readers or a single writer may lock the object concurrently. Readers/writer mutex objects can be shared across processes. A name specified when the object is created is used to allow the IPC.


Constructor & Destructor Documentation

MCRWMutex const char *  name,
mcuint32  rank = 0
 

Open an RW Mutex.

Parameters:
name the name of the RW Mutex
rank the rank of the RW Mutex

virtual ~MCRWMutex  )  [virtual]
 

Virtual destructor.

Free any allocated resources


Member Function Documentation

virtual void readLock  )  [virtual]
 

Obtain a read lock on the mutex object.

Multiple readers may concurrently hold a read lock but not at the same time as a writer.

virtual void unlock  )  [virtual]
 

Unlock the mutex object.

It doesn't matter if the mutex was previously read or write locked.

Implements MCMutex.

virtual void writeLock  )  [virtual]
 

Obtain a write lock on the mutex object.

A single writer may hold a read lock but not at the same time as other writers or readers.


Generated on Wed Jan 12 19:05:50 2005 for MCLLIB by  doxygen 1.3.9.1