Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

IPC::Mutex Class Reference

A single mutex semaphore. More...

#include <ipcplus.h>

List of all members.

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

SemSetpSet
 A pointer to the set of semaphores.

int semIdx
 The index number of the semaphore to use.


Detailed Description

A single mutex semaphore.

This class addresses a single semaphore in a SemSet as a mutex semaphore.


Constructor & Destructor Documentation

IPC::Mutex::Mutex SemSet   pSemSet,
const int    idx
[inline]
 

Constructor.

Parameters:
pSemSet  A pointer to the set of semaphores.
idx  The index number of the semaphore to use.


Member Function Documentation

bool IPC::Mutex::Signal   [inline]
 

Signal (or raise) the semaphore; allow mutex access.

This method attempts to raise the specified semaphore by one. This should always succeed.

Returns:
False if an error occurred.

bool IPC::Mutex::Wait   [inline]
 

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).

Returns:
False if an error occurred.


The documentation for this class was generated from the following file:
Generated on Wed May 15 09:33:33 2002 for IPCPlus by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001