Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PReadWriteMutex Class Reference

#include <syncthrd.h>

Inheritance diagram for PReadWriteMutex:

PObject

List of all members.


Detailed Description

This class defines a thread synchonisation object.

This is a special type of mutual exclusion, where the excluded area may have multiple read threads but only one write thread and the read threads are blocked on write as well.

Definition at line 294 of file syncthrd.h.


Comparison functions

virtual Comparison Compare (const PObject &obj) const
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
bool operator!= (const PObject &obj) const
bool operator< (const PObject &obj) const
bool operator<= (const PObject &obj) const
bool operator== (const PObject &obj) const
bool operator> (const PObject &obj) const
bool operator>= (const PObject &obj) const
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }

Run Time Type functions

virtual const char * GetClass (unsigned=0) const
virtual BOOL InternalIsDescendant (const char *clsName) const
BOOL IsClass (const char *cls) const
static const char * Class ()

I/O functions

virtual void PrintOn (ostream &strm) const
virtual void ReadFrom (istream &strm)
ostream & operator<< (ostream &strm, const PObject &obj)
istream & operator>> (istream &strm, PObject &obj)

Public Member Functions

Miscellaneous functions
virtual PObjectClone () const
virtual PINDEX HashFunction () const
Operations
void EndRead ()
void EndWrite ()
void StartRead ()
void StartWrite ()
Construction
 PReadWriteMutex ()

Protected Member Functions

void EndNest ()
Nest * GetNest () const
void InternalEndRead ()
void InternalStartRead ()
Nest & StartNest ()

Protected Attributes

PDictionary< POrdinalKey, Nest > nestedThreads
PMutex nestingMutex
unsigned readerCount
PMutex readerMutex
PSemaphore readerSemaphore
PMutex starvationPreventer
unsigned writerCount
PMutex writerMutex
PSemaphore writerSemaphore

Private Member Functions

 PCLASSINFO (PReadWriteMutex, PObject)

Classes

class  Nest

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

Generated by  Doxygen 1.6.0   Back to index