Wefts::OSMutexWindows Class Reference

#include <wefts_os_windows.h>

Inheritance diagram for Wefts::OSMutexWindows:

Inheritance graph
[legend]
Collaboration diagram for Wefts::OSMutexWindows:

Collaboration graph
[legend]
List of all members.

Detailed Description

Windows implementation of mutex.

Windows mutexes are currently implemented through a Windows CRITICAL_SECTION. For this reason, win95, win98 and winME calls to tryLock() will fail (always return false). Also, as reentracy is not requested by OSTAIL model, rentrant lock ability of CRITICAL_SECTION is a waste of time.

Todo:
Use very low level Interlocked exchange to create a better mutex.


Public Member Functions

 OSMutexWindows () throw ( InitError )
 ~OSMutexWindows ()
virtual void lock ()
virtual bool trylock ()
virtual void unlock ()
 Unlocks the mutex.


Protected Attributes

CRITICAL_SECTION m_sect

Private Attributes

bool m_canTryLock


Constructor & Destructor Documentation

Wefts::OSMutexWindows::OSMutexWindows  )  throw ( InitError )
 

Wefts::OSMutexWindows::~OSMutexWindows  )  [inline]
 


Member Function Documentation

virtual void Wefts::OSMutexWindows::lock  )  [inline, virtual]
 

Implements Wefts::OSMutexBase.

virtual bool Wefts::OSMutexWindows::trylock  )  [inline, virtual]
 

Implements Wefts::OSMutexBase.

virtual void Wefts::OSMutexWindows::unlock  )  [inline, virtual]
 

Unlocks the mutex.

Implements Wefts::OSMutexBase.


Member Data Documentation

bool Wefts::OSMutexWindows::m_canTryLock [private]
 

CRITICAL_SECTION Wefts::OSMutexWindows::m_sect [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Oct 5 14:57:02 2004 for Wefts by doxygen 1.3.7