From 2904e96f1e15f3b0d79055de1ed79f74f73742cb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 4 Feb 2016 23:05:58 -0500 Subject: [PATCH] Core: Use the thread_local keyword Android and OSX are still twiddling their thumbs though, so we have to keep pthreads around for them. --- Source/Core/Core/Core.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index f01b17beae..ab7601f07d 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -73,15 +73,11 @@ #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoBackendBase.h" -// This can mostly be removed when we move to VS2015 -// to use the thread_local keyword -#ifdef _MSC_VER -#define ThreadLocalStorage __declspec(thread) -#elif defined __ANDROID__ || defined __APPLE__ -// This will most likely have to stay, to support android +// Android and OSX haven't implemented the keyword yet. +#if defined __ANDROID__ || defined __APPLE__ #include -#else // Everything besides VS and Android -#define ThreadLocalStorage __thread +#else // Everything besides OSX and Android +#define ThreadLocalStorage thread_local #endif namespace Core