Isle
Loading...
Searching...
No Matches
mxcriticalsection.h
Go to the documentation of this file.
1#ifndef MXCRITICALSECTION_H
2#define MXCRITICALSECTION_H
3
4#include <windows.h>
5
11public:
17
23
28 static void SetDoMutex();
29
34 void Enter();
35
40 void Leave();
41
42private:
43 CRITICAL_SECTION m_criticalSection;
44 HANDLE m_mutex;
45};
46
47#endif // MXCRITICALSECTION_H
[AI] Provides a critical section object for mutual exclusion with optional use of OS mutex.
static void SetDoMutex()
[AI] Globally enforces the use of mutexes for all subsequent MxCriticalSection allocation.
void Enter()
[AI] Acquires/gains entry to the critical section or mutex, blocking if not available.
~MxCriticalSection()
[AI] Destroys the critical section object.
void Leave()
[AI] Releases/leaves the critical section or mutex.
MxCriticalSection()
[AI] Constructs the critical section object.