diff options
Diffstat (limited to 'src/3rdParty/efsw/platform/win/MutexImpl.cpp')
-rwxr-xr-x | src/3rdParty/efsw/platform/win/MutexImpl.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/platform/win/MutexImpl.cpp b/src/3rdParty/efsw/platform/win/MutexImpl.cpp new file mode 100755 index 0000000..62b7f83 --- /dev/null +++ b/src/3rdParty/efsw/platform/win/MutexImpl.cpp | |||
@@ -0,0 +1,25 @@ | |||
1 | #include <efsw/platform/win/MutexImpl.hpp> | ||
2 | |||
3 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 | ||
4 | |||
5 | namespace efsw { namespace Platform { | ||
6 | |||
7 | MutexImpl::MutexImpl() { | ||
8 | InitializeCriticalSection( &mMutex ); | ||
9 | } | ||
10 | |||
11 | MutexImpl::~MutexImpl() { | ||
12 | DeleteCriticalSection( &mMutex ); | ||
13 | } | ||
14 | |||
15 | void MutexImpl::lock() { | ||
16 | EnterCriticalSection( &mMutex ); | ||
17 | } | ||
18 | |||
19 | void MutexImpl::unlock() { | ||
20 | LeaveCriticalSection( &mMutex ); | ||
21 | } | ||
22 | |||
23 | }} // namespace efsw::Platform | ||
24 | |||
25 | #endif | ||