diff options
author | Oz Linden <oz@lindenlab.com> | 2012-01-30 15:48:44 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-01-30 15:48:44 -0500 |
commit | 1ed8faee81804af2f0640784191f1deadfa9f50c (patch) | |
tree | 1bbee24e0c0c388b1f0544145db8eff1588546f7 /indra/llcommon/llthread.cpp | |
parent | 4ef9277761b5faee2825177112939b72c563a4ea (diff) | |
parent | 717a6f3306d9382ea252c3e0f243b785c9cae15a (diff) |
merge changes for vmrg-219
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r-- | indra/llcommon/llthread.cpp | 15 |
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; |