Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Wefts::OSMutexWindows Class Reference

Windows implementation of mutex. More...

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

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

Friends

class OSConditionWindows

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.


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.


Friends And Related Function Documentation

friend class OSConditionWindows [friend]
 


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 files:
Generated on Sat Mar 13 21:05:44 2004 for Wefts by doxygen 1.3.5