aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/platform/win/MutexImpl.cpp
blob: 62b7f836e515ec8d68905b8e334d53ab88df8612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <efsw/platform/win/MutexImpl.hpp>

#if EFSW_PLATFORM == EFSW_PLATFORM_WIN32

namespace efsw { namespace Platform {

MutexImpl::MutexImpl() {
	InitializeCriticalSection( &mMutex );
}

MutexImpl::~MutexImpl() {
	DeleteCriticalSection( &mMutex );
}

void MutexImpl::lock() {
	EnterCriticalSection( &mMutex );
}

void MutexImpl::unlock() {
	LeaveCriticalSection( &mMutex );
}

}} // namespace efsw::Platform

#endif