#include <ipcplus.h>
Public Methods | |
Mutex (SemSet *pSemSet, const int idx) | |
Constructor. More... | |
virtual | ~Mutex () |
Destructor. | |
bool | Wait () |
Wait for mutex access. More... | |
bool | Signal () |
Signal (or raise) the semaphore; allow mutex access. More... | |
Private Attributes | |
SemSet * | pSet |
A pointer to the set of semaphores. | |
int | semIdx |
The index number of the semaphore to use. |
This class addresses a single semaphore in a SemSet as a mutex semaphore.
|
Constructor.
|
|
Signal (or raise) the semaphore; allow mutex access. This method attempts to raise the specified semaphore by one. This should always succeed.
|
|
Wait for mutex access. This method attempts to reduce the specified semaphore by one. This will only succeed if the semaphore has a value greater than zero (ie. if it is raised).
|