summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-12-05 14:22:18 -0800
committerRichard Linden <none@none>2012-12-05 14:22:18 -0800
commit68967e7b2b9416ff66cb49ae755fb33d7b81d129 (patch)
tree677a3fc20b046ddb5d656da31fc081a4c9baaa4c /indra/llcommon/llthread.cpp
parent6c7825107f6ebb3dd8697a52aeb5d29a93060dc4 (diff)
SH-3406 WIP convert fast timers to lltrace system
changed thread id declaration to be local to llthread.cpp and use currentID() uniformly across platforms
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 8ce739bf23..6374b5398b 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -62,9 +62,9 @@
#if LL_DARWIN
// statically allocated thread local storage not supported in Darwin executable formats
#elif LL_WINDOWS
-U32 __declspec(thread) LLThread::sThreadID = 0;
+U32 __declspec(thread) sThreadID = 0;
#elif LL_LINUX
-U32 __thread LLThread::sThreadID = 0;
+U32 __thread sThreadID = 0;
#endif
U32 LLThread::sIDIter = 0;
@@ -294,7 +294,13 @@ 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