# 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  

mutex.h File Reference

OS independant class for the mutex management with Windows and Posix implementation Classes CMutex, CSynchronized. More...

#include "nel/misc/types_nl.h"
#include "nel/misc/time_nl.h"
#include <map>

Go to the source code of this file.

Namespaces

namespace  NLMISC

Defines

#define STORE_MUTEX_NAME
#define CMutex   CFairMutex
#define CFastMutex   CMutex
 Fast mutex implementation (not fairly) The mutex ARE NOT recursive (ie don't call enter() several times on the same mutex from the same thread without having called leave()) ; The threads ARE NOT woken-up in the same order as they were put to sleep. More...

#define CSynchronized   CFairSynchronized


Detailed Description

OS independant class for the mutex management with Windows and Posix implementation Classes CMutex, CSynchronized.

Id:
mutex.h,v 1.20 2002/11/04 15:40:42 boucher Exp

Definition in file mutex.h.


Define Documentation

#define CFastMutex   CMutex
 

Fast mutex implementation (not fairly) The mutex ARE NOT recursive (ie don't call enter() several times on the same mutex from the same thread without having called leave()) ; The threads ARE NOT woken-up in the same order as they were put to sleep.

The threads ARE NOT woken-up using signals but using Sleep(). This mutex works but is not optimal for multiprocessors because if the mutex is locked, next enter will be sleeped without waiting a little.

Implementation notes:

  • Implementated under WIN32
  • Other OS use CMutex
 CFastMutex m;
 m.enter ();
 // do critical stuffs
 m.leave ();
 *
Author:
Cyril 'Hulud' Corvazier , Nevrax France
Date:
2000

Definition at line 194 of file mutex.h.

#define CMutex   CFairMutex
 

Definition at line 55 of file mutex.h.

Referenced by NLMISC::IDisplayer::IDisplayer.

#define CSynchronized   CFairSynchronized
 

Definition at line 369 of file mutex.h.

#define STORE_MUTEX_NAME
 

Definition at line 51 of file mutex.h.