From e7f0efa56d358acdc3d7eb865a6774e61fa827a1 Mon Sep 17 00:00:00 2001 From: Andreas Schroeder Date: Tue, 29 Apr 2014 00:54:33 +0200 Subject: [PATCH] Mac OSX: use __thread for thread-local storage --- Utilities/SMutex.cpp | 2 ++ Utilities/Thread.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Utilities/SMutex.cpp b/Utilities/SMutex.cpp index 541d20b276..06820a7afa 100644 --- a/Utilities/SMutex.cpp +++ b/Utilities/SMutex.cpp @@ -8,6 +8,8 @@ __forceinline void SM_Sleep() #ifdef _WIN32 __declspec(thread) +#elif __APPLE__ +__thread #else thread_local #endif diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 940e6b94e9..6ad547bfff 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -3,6 +3,8 @@ #ifdef _WIN32 __declspec(thread) +#elif __APPLE__ +__thread #else thread_local #endif