aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/platform/win/MutexImpl.cpp
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-11-15 17:23:46 +0800
committerLi Jin <dragon-fly@qq.com>2022-11-15 17:52:09 +0800
commit94f8330613877b3582d32bd11abd83a97b4399ad (patch)
tree5359de314be1ebde17f8d1e48632a97d18f9e50f /src/3rdParty/efsw/platform/win/MutexImpl.cpp
parent60f8f00a022ac08701792b2897b72d8c99b50f52 (diff)
downloadyuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.gz
yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.tar.bz2
yuescript-94f8330613877b3582d32bd11abd83a97b4399ad.zip
adding -w option to Yuescript tool.
Diffstat (limited to 'src/3rdParty/efsw/platform/win/MutexImpl.cpp')
-rwxr-xr-xsrc/3rdParty/efsw/platform/win/MutexImpl.cpp25
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
5namespace efsw { namespace Platform {
6
7MutexImpl::MutexImpl() {
8 InitializeCriticalSection( &mMutex );
9}
10
11MutexImpl::~MutexImpl() {
12 DeleteCriticalSection( &mMutex );
13}
14
15void MutexImpl::lock() {
16 EnterCriticalSection( &mMutex );
17}
18
19void MutexImpl::unlock() {
20 LeaveCriticalSection( &mMutex );
21}
22
23}} // namespace efsw::Platform
24
25#endif