DxLibEx
thread.hpp
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2015-2017 DxLibEx project
3  https://github.com/Nagarei/DxLibEx/
4 
5  Distributed under the Boost Software License, Version 1.0.
6  (See http://www.boost.org/LICENSE_1_0.txt)
7 =============================================================================*/
8 #ifndef DXLE_INC_THREAD_HPP_
9 #define DXLE_INC_THREAD_HPP_
10 
12 #if defined(__c2__) && __clang_major__ == 3 && __clang_minor__ == 8
13 //To avoid compile error
14 //C:\Program Files (x86)\Windows Kits\8.1\Include\um\combaseapi.h(229,21): error : unknown type name 'IUnknown'
15 // static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown
16 struct IUnknown;
17 #endif
18 #include <mutex>
19 #include "DxLib.h"
20 #include "dxlibex/config/defines.h"
21 
22 #ifdef DX_THREAD_SAFE
23 #define DXLE_GET_LOCK(mtx) std::lock_guard<decltype(mtx)> lock(mtx);
24 #define DXLE_NOEXCEPT_OR_NOTHROW_SINGLE
25 #else
26 #define DXLE_GET_LOCK(mtx)
27 #define DXLE_NOEXCEPT_OR_NOTHROW_SINGLE DXLE_NOEXCEPT_OR_NOTHROW
28 #endif
29 
30 //インクルードガード
31 #endif