lego1: add MxCriticalSection implementation

This commit is contained in:
Christian Semmler
2023-06-12 20:43:19 +02:00
parent d4f25fcd23
commit fba95658b5
4 changed files with 112 additions and 14 deletions

View File

@@ -1,12 +1,20 @@
#ifndef MXCRITICALSECTION_H
#define MXCRITICALSECTION_H
class MxCriticalSection
{
public:
__declspec(dllexport) MxCriticalSection();
__declspec(dllexport) ~MxCriticalSection();
__declspec(dllexport) static void SetDoMutex();
};
#endif // MXCRITICALSECTION_H
#ifndef MXCRITICALSECTION_H
#define MXCRITICALSECTION_H
#include <Windows.h>
class MxCriticalSection
{
public:
__declspec(dllexport) MxCriticalSection();
__declspec(dllexport) ~MxCriticalSection();
__declspec(dllexport) static void SetDoMutex();
void Enter();
void Leave();
private:
CRITICAL_SECTION m_criticalSection;
HANDLE m_mutex;
};
#endif // MXCRITICALSECTION_H