MultiReaderMutex_t Class Reference

A single writer, multiple reader mutex class.

#include <UTMutex.h>

List of all members.

Public Member Functions

 MultiReaderMutex_t ()
 ~MultiReaderMutex_t ()
void LockRead ()
void UnlockRead ()
void LockWrite ()
void UnlockWrite ()

Detailed Description

Definition at line 84 of file UTMutex.h.


Constructor & Destructor Documentation

MultiReaderMutex_t::MultiReaderMutex_t (  ) 

Constructor.

MultiReaderMutex_t::~MultiReaderMutex_t (  ) 

Destructor.


Member Function Documentation

void MultiReaderMutex_t::LockRead (  ) 

Locks the mutex for shared read. Once acquired, the caller is guaranteed safe read-only access, with all would-be writers being blocked. Note that if the protected resource contains mutable data, simultaneous read access resulting in modification of that data is almost guaranteed to cause a crash.

void MultiReaderMutex_t::UnlockRead (  ) 

Unlocks the mutex after shared read.

void MultiReaderMutex_t::LockWrite (  ) 

Locks the mutex for exclusive write. Once acquired, the caller is guaranteed exclusive access with neither readers nor writers holding the mutex. After calling LockWrite, all would-be readers or writers will be blocked until the caller has acquired and released the requested write access.

void MultiReaderMutex_t::UnlockWrite (  ) 

Unlocks the mutex after exclusive write.


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

Generated on Tue Dec 14 22:35:07 2010 for UT library by  doxygen 1.6.1