Control entering an instance of a CRITICALSECTION upon initialization and released when out of scope. More...
#include <mi32/critsec.h>
Public Member Functions | |
| LOCK (CRITICALSECTION *pCritSec) | |
| LOCK (CRITICALSECTION &CritSec, bool EnterSection=true) | |
| LOCK () | |
| ~LOCK () | |
| void | Enter (CRITICALSECTION &CritSec) |
| void | Release () |
| bool | TryEnter (CRITICALSECTION &CritSec) |
Control entering an instance of a CRITICALSECTION upon initialization and released when out of scope.
| 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.
| 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.
| pCritSec | Critical section pointer, if NULL no lock will be obtained |
| MITHREAD::CRITICALSECTION::LOCK::~LOCK | ( | ) |
Destructor - Releases critical section.
| 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.
1.6.1