summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthreadlocalstorage.h
diff options
context:
space:
mode:
authorCinder <cinder@sdf.org>2014-11-19 22:27:36 -0700
committerCinder <cinder@sdf.org>2014-11-19 22:27:36 -0700
commit6df6aef62176328c3b0fafa43fd611d4e25ef35c (patch)
tree055860a356bd100d94fbc5f782c04314d969e740 /indra/llcommon/llthreadlocalstorage.h
parent5f608c0a23487ae78cdc134b1e685a6c3cd4ec19 (diff)
OPEN-282 - Define LL_THREAD_LOCAL for our platforms in order to unify TLS support
Diffstat (limited to 'indra/llcommon/llthreadlocalstorage.h')
-rw-r--r--indra/llcommon/llthreadlocalstorage.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/indra/llcommon/llthreadlocalstorage.h b/indra/llcommon/llthreadlocalstorage.h
index da648902aa..3b5786023f 100644
--- a/indra/llcommon/llthreadlocalstorage.h
+++ b/indra/llcommon/llthreadlocalstorage.h
@@ -139,20 +139,10 @@ public:
}
private:
-
-#if LL_WINDOWS
- static __declspec(thread) DERIVED_TYPE* sInstance;
-#else
- static __thread DERIVED_TYPE* sInstance;
-#endif
+ static LL_THREAD_LOCAL DERIVED_TYPE* sInstance;
};
-#if LL_WINDOWS
-template<typename DERIVED_TYPE>
-__declspec(thread) DERIVED_TYPE* LLThreadLocalSingletonPointer<DERIVED_TYPE>::sInstance = NULL;
-#else
template<typename DERIVED_TYPE>
-__thread DERIVED_TYPE* LLThreadLocalSingletonPointer<DERIVED_TYPE>::sInstance = NULL;
-#endif
+LL_THREAD_LOCAL DERIVED_TYPE* LLThreadLocalSingletonPointer<DERIVED_TYPE>::sInstance = NULL;
#endif // LL_LLTHREADLOCALSTORAGE_H