MercuryMutex Class Reference

Mutual exclusion object. More...

#include <MercuryThreads.h>

Collaboration diagram for MercuryMutex:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MercuryMutex ()
 MercuryMutex (const MString &name)
 ~MercuryMutex ()
int Wait (long lMilliseconds=0xFFFFFF)
 Wait for a mutex to unlock (0xFFFFFF is infinate on windows).
int UnLock ()
 Unlock a mutex for the next thing waiting in line.
int Open ()
 Start up a mutex. You need to do this as well as UnLock() afterwards when in a constructor.
int Close ()
 Clean up a mutex. This is done automatically on destruction of mutex.

Private Attributes

MString m_name
pthread_mutex_t m_mutex

Detailed Description

Mutual exclusion object.

Definition at line 52 of file MercuryThreads.h.


Constructor & Destructor Documentation

MercuryMutex::MercuryMutex (  ) 

Definition at line 104 of file MercuryThreads.cpp.

MercuryMutex::MercuryMutex ( const MString name  ) 

Definition at line 111 of file MercuryThreads.cpp.

MercuryMutex::~MercuryMutex (  ) 

Definition at line 118 of file MercuryThreads.cpp.


Member Function Documentation

int MercuryMutex::Wait ( long  lMilliseconds = 0xFFFFFF  ) 

Wait for a mutex to unlock (0xFFFFFF is infinate on windows).

Definition at line 123 of file MercuryThreads.cpp.

int MercuryMutex::UnLock (  ) 

Unlock a mutex for the next thing waiting in line.

Definition at line 140 of file MercuryThreads.cpp.

int MercuryMutex::Open (  ) 

Start up a mutex. You need to do this as well as UnLock() afterwards when in a constructor.

Definition at line 150 of file MercuryThreads.cpp.

int MercuryMutex::Close (  ) 

Clean up a mutex. This is done automatically on destruction of mutex.

Definition at line 169 of file MercuryThreads.cpp.


Member Data Documentation

MString MercuryMutex::m_name [private]

Definition at line 71 of file MercuryThreads.h.

pthread_mutex_t MercuryMutex::m_mutex [private]

Definition at line 79 of file MercuryThreads.h.


The documentation for this class was generated from the following files:
Hosted by SourceForge.net Logo