diff --git a/.gitignore b/.gitignore index a0f8d23bbaab9..ebae5d2583eea 100644 --- a/.gitignore +++ b/.gitignore @@ -112,3 +112,4 @@ oprofile_data/ /tools/bin /tools/GSDumpGUI/bin /tools/GSDumpGUI/obj +/.vs diff --git a/common/include/Pcsx2Defs.h b/common/include/Pcsx2Defs.h index dd3ea4fcfe718..e941b0ae2014e 100644 --- a/common/include/Pcsx2Defs.h +++ b/common/include/Pcsx2Defs.h @@ -168,7 +168,6 @@ static const int __pagesize = PCSX2_PAGESIZE; #define PCSX2_ALIGNED16_EXTERN(x) extern __declspec(align(16)) x #define __noinline __declspec(noinline) -#define __threadlocal __declspec(thread) // Don't know if there are Visual C++ equivalents of these. #define likely(x) (!!(x)) @@ -216,7 +215,6 @@ static const int __pagesize = PCSX2_PAGESIZE; #ifndef __noinline #define __noinline __attribute__((noinline)) #endif -#define __threadlocal __thread #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #endif diff --git a/common/include/Utilities/TlsVariable.inl b/common/include/Utilities/TlsVariable.inl index da592b523b0ec..c83d21663f252 100644 --- a/common/include/Utilities/TlsVariable.inl +++ b/common/include/Utilities/TlsVariable.inl @@ -18,7 +18,7 @@ #include "Threading.h" #if PCSX2_THREAD_LOCAL -#define DeclareTls(x) __threadlocal x +#define DeclareTls(x) thread_local x #else #define DeclareTls(x) Threading::TlsVariable #endif diff --git a/common/include/x86emitter/x86types.h b/common/include/x86emitter/x86types.h index d8e715e21aefe..9b2d1f4260a92 100644 --- a/common/include/x86emitter/x86types.h +++ b/common/include/x86emitter/x86types.h @@ -53,7 +53,7 @@ enum XMMSSEType { #ifndef __tls_emit #if x86EMIT_MULTITHREADED -#define __tls_emit __threadlocal +#define __tls_emit thread_local #else // Using TlsVariable is sub-optimal and could result in huge executables, so we // force-disable TLS entirely, and disallow running multithreaded recompilation diff --git a/common/src/Utilities/wxAppWithHelpers.cpp b/common/src/Utilities/wxAppWithHelpers.cpp index 635889315ac49..21179a4ecc4a5 100644 --- a/common/src/Utilities/wxAppWithHelpers.cpp +++ b/common/src/Utilities/wxAppWithHelpers.cpp @@ -678,7 +678,7 @@ wxAppWithHelpers::wxAppWithHelpers() // FS segment register won't have been initialized by the main exe, due to tls_insurance // being optimized away >_< --air - static __threadlocal int tls_insurance = 0; + static thread_local int tls_insurance = 0; tls_insurance = 1; #endif }