diff options
author | Li Jin <dragon-fly@qq.com> | 2022-11-15 17:23:46 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-11-15 17:52:09 +0800 |
commit | 94f8330613877b3582d32bd11abd83a97b4399ad (patch) | |
tree | 5359de314be1ebde17f8d1e48632a97d18f9e50f /src/3rdParty/efsw/platform/win/MutexImpl.hpp | |
parent | 60f8f00a022ac08701792b2897b72d8c99b50f52 (diff) | |
download | yuescript-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.hpp')
-rwxr-xr-x | src/3rdParty/efsw/platform/win/MutexImpl.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/platform/win/MutexImpl.hpp b/src/3rdParty/efsw/platform/win/MutexImpl.hpp new file mode 100755 index 0000000..7b06492 --- /dev/null +++ b/src/3rdParty/efsw/platform/win/MutexImpl.hpp | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef EFSW_MUTEXIMPLWIN_HPP | ||
2 | #define EFSW_MUTEXIMPLWIN_HPP | ||
3 | |||
4 | #include <efsw/base.hpp> | ||
5 | |||
6 | #if EFSW_PLATFORM == EFSW_PLATFORM_WIN32 | ||
7 | |||
8 | #ifndef WIN32_LEAN_AND_MEAN | ||
9 | #define WIN32_LEAN_AND_MEAN | ||
10 | #endif | ||
11 | #include <windows.h> | ||
12 | |||
13 | namespace efsw { namespace Platform { | ||
14 | |||
15 | class MutexImpl { | ||
16 | public: | ||
17 | MutexImpl(); | ||
18 | |||
19 | ~MutexImpl(); | ||
20 | |||
21 | void lock(); | ||
22 | |||
23 | void unlock(); | ||
24 | |||
25 | private: | ||
26 | CRITICAL_SECTION mMutex; | ||
27 | }; | ||
28 | |||
29 | }} // namespace efsw::Platform | ||
30 | |||
31 | #endif | ||
32 | |||
33 | #endif | ||