summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
commitbb87365c37047a35bf524a98d5a48cdb2d56948e (patch)
tree5b44b30944f794c2e2f78a0990cf56f81d27fa78 /indra/llcommon/llthread.cpp
parenta89f3f29a0af37c7f3e78e38acb78f78e99dae78 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Merge viewer-release, become version 3.7.29
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rwxr-xr-xindra/llcommon/llthread.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 51c89e1eaf..c3f235c6ee 100755
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -92,13 +92,7 @@ void set_thread_name( DWORD dwThreadID, const char* threadName)
//
//----------------------------------------------------------------------------
-#if LL_DARWIN
-// statically allocated thread local storage not supported in Darwin executable formats
-#elif LL_WINDOWS
-U32 __declspec(thread) sThreadID = 0;
-#elif LL_LINUX
-U32 __thread sThreadID = 0;
-#endif
+U32 LL_THREAD_LOCAL sThreadID = 0;
U32 LLThread::sIDIter = 0;
@@ -115,9 +109,7 @@ LL_COMMON_API void assert_main_thread()
void LLThread::registerThreadID()
{
-#if !LL_DARWIN
sThreadID = ++sIDIter;
-#endif
}
//
@@ -134,9 +126,7 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
// for now, hard code all LLThreads to report to single master thread recorder, which is known to be running on main thread
threadp->mRecorder = new LLTrace::ThreadRecorder(*LLTrace::get_master_thread_recorder());
-#if !LL_DARWIN
sThreadID = threadp->mID;
-#endif
// Run the user supplied function
threadp->run();
@@ -347,13 +337,7 @@ void LLThread::setQuitting()
// static
U32 LLThread::currentID()
{
-#if LL_DARWIN
- // statically allocated thread local storage not supported in Darwin executable formats
- return (U32)apr_os_thread_current();
-#else
return sThreadID;
-#endif
-
}
// static