mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-28 02:32:23 +00:00
23 lines
No EOL
309 B
C
23 lines
No EOL
309 B
C
#pragma once
|
|
|
|
struct Mutex : CRITICAL_SECTION
|
|
{
|
|
Mutex()
|
|
{
|
|
InitializeCriticalSection(this);
|
|
}
|
|
~Mutex()
|
|
{
|
|
DeleteCriticalSection(this);
|
|
}
|
|
|
|
void lock()
|
|
{
|
|
EnterCriticalSection(this);
|
|
}
|
|
|
|
void unlock()
|
|
{
|
|
LeaveCriticalSection(this);
|
|
}
|
|
}; |