#include <MercuryThreads.h>
Collaboration diagram for MercuryMutex:
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 |
Definition at line 52 of file MercuryThreads.h.
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.
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.
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.