# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::CSharedMutex Class Reference

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

#include <mutex.h>

List of all members.

Public Methods

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

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

void destroy ()
 Destroy the mutex. More...

void enter ()
 Enter the critical section. More...

void leave ()
 Leave the critical section. More...


Private Attributes

int _SemId
 The semaphore id. More...


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 210 of file mutex.h.


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.


Member Data Documentation

int NLMISC::CSharedMutex::_SemId [private]
 

The semaphore id.

Definition at line 241 of file mutex.h.


The documentation for this class was generated from the following file: