NLMISC::CUnfairMutex Class Reference

#include <mutex.h>


Detailed Description

Classic mutex implementation (not necessarly fair) Don't assume the mutex are recursive (ie don't call enter() several times on the same mutex from the same thread without having called leave()) ; and don't assume either the threads are woken-up in the same order as they were put to sleep !

Windows: uses Mutex, cannot be shared among processes. Linux: uses PThread POSIX Mutex, cannot be shared among processes.

CUnfairMutex m; m.enter (); // do critical stuffs m.leave (); *
Author:
Vianney Lecroart, Olivier Cado

Nevrax France

Date:
2000

Definition at line 79 of file mutex.h.

Public Member Functions

 CUnfairMutex (const std::string &name)
 CUnfairMutex ()
 Constructor.

void enter ()
 Enter the critical section.

void leave ()
 Leave the critical section.

 ~CUnfairMutex ()
 Destructor.


Constructor & Destructor Documentation

NLMISC::CUnfairMutex::CUnfairMutex  ) 
 

Constructor.

NLMISC::CUnfairMutex::CUnfairMutex const std::string &  name  ) 
 

NLMISC::CUnfairMutex::~CUnfairMutex  ) 
 

Destructor.


Member Function Documentation

void NLMISC::CUnfairMutex::enter  ) 
 

Enter the critical section.

void NLMISC::CUnfairMutex::leave  ) 
 

Leave the critical section.


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