MITHREAD::CRITICALSECTION::LOCK Class Reference

Control entering an instance of a CRITICALSECTION upon initialization and released when out of scope. More...

#include <mi32/critsec.h>

List of all members.

Public Member Functions

 LOCK (CRITICALSECTION *pCritSec)
 LOCK (CRITICALSECTION &CritSec, bool EnterSection=true)
 LOCK ()
 ~LOCK ()
void Enter (CRITICALSECTION &CritSec)
void Release ()
bool TryEnter (CRITICALSECTION &CritSec)

Detailed Description

Control entering an instance of a CRITICALSECTION upon initialization and released when out of scope.


Constructor & Destructor Documentation

MITHREAD::CRITICALSECTION::LOCK::LOCK (  ) 

Default constructor - used to implement TryEnter() paradigm.

MITHREAD::CRITICALSECTION::LOCK::LOCK ( CRITICALSECTION CritSec,
bool  EnterSection = true 
) [explicit]

Constructor - Get critical section or wait until it is available.

Parameters:
EnterSection Flag to allow setting of non-multithread mode
MITHREAD::CRITICALSECTION::LOCK::LOCK ( CRITICALSECTION pCritSec  )  [explicit]

Constructor - Get critical section or wait until it is available.

Parameters:
pCritSec Critical section pointer, if NULL no lock will be obtained
MITHREAD::CRITICALSECTION::LOCK::~LOCK (  ) 

Destructor - Releases critical section.


Member Function Documentation

void MITHREAD::CRITICALSECTION::LOCK::Enter ( CRITICALSECTION CritSec  ) 

Enter a critical section.

void MITHREAD::CRITICALSECTION::LOCK::Release (  ) 

Release the critical section lock.

bool MITHREAD::CRITICALSECTION::LOCK::TryEnter ( CRITICALSECTION CritSec  ) 

Check if it is possible to enter a critical section.

Returns immediately, regardless of 'spin count' setting.

Returns:
'True' if entered critical section, 'false' if not

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

Generated on Sun Oct 7 21:36:38 2012 for TNTsdk 2012 by  doxygen 1.6.1