NLMISC::CSharedMutex Class Reference

#include <mutex.h>


Detailed Description

Windows: uses Mutex, the handle can't be shared among processes, but the mutex still can be be shared by passing a common object name to createByName() / createByKey(). Note: the mutex must be explicitely destroyed by calling destroy().

Author:
Olivier Cado

Nevrax France

Date:
2002

Definition at line 404 of file mutex.h.

Public Member Functions

bool createByKey (int key, bool createNew)
 Create (with createNew to true) or access an existing mutex (created by another process) with a specific key. Returns false if it failed.

 CSharedMutex ()
 Constructor (does not create the mutex, see createByName()/createByKey()).

void destroy ()
 Destroy the mutex.

void enter ()
 Enter the critical section.

void leave ()
 Leave the critical section.


Private Attributes

int _SemId
 The semaphore id.


Constructor & Destructor Documentation

NLMISC::CSharedMutex::CSharedMutex  ) 
 

Constructor (does not create the mutex, see createByName()/createByKey()).


Member Function Documentation

bool NLMISC::CSharedMutex::createByKey int  key,
bool  createNew
 

Create (with createNew to true) or access an existing mutex (created by another process) with a specific key. Returns false if it failed.

void NLMISC::CSharedMutex::destroy  ) 
 

Destroy the mutex.

void NLMISC::CSharedMutex::enter  ) 
 

Enter the critical section.

void NLMISC::CSharedMutex::leave  ) 
 

Leave the critical section.


Field Documentation

int NLMISC::CSharedMutex::_SemId [private]
 

The semaphore id.

Definition at line 435 of file mutex.h.


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 13:32:44 2004 for NeL by doxygen 1.3.6