summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-02-07 13:11:39 -0500
committerNat Goodspeed <nat@lindenlab.com>2012-02-07 13:11:39 -0500
commit3bcd4f4608a7ce33b61c6978544096436dea4e53 (patch)
tree6ef7168a6ec646c023d2f4badc9a0960d20eea3e /indra/llcommon/llthread.cpp
parent33a42b32ca72031a79edca821966f6ebbdcddc93 (diff)
parent5e367f0d9de593c45683f7c640024a378bb03919 (diff)
Merge daggy fix at r32811ea374ab to tip
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 4063cc730b..a6ad6b125c 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -337,11 +337,7 @@ LLMutex::~LLMutex()
void LLMutex::lock()
{
-#if LL_DARWIN
- if (mLockingThread == LLThread::currentID())
-#else
- if (mLockingThread == sThreadID)
-#endif
+ if(isSelfLocked())
{ //redundant lock
mCount++;
return;
@@ -398,6 +394,15 @@ bool LLMutex::isLocked()
}
}
+bool LLMutex::isSelfLocked()
+{
+#if LL_DARWIN
+ return mLockingThread == LLThread::currentID();
+#else
+ return mLockingThread == sThreadID;
+#endif
+}
+
U32 LLMutex::lockingThread() const
{
return mLockingThread;