diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-01-30 17:24:49 -0800 |
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-01-30 17:24:49 -0800 |
| commit | 12a045f199da3eb11dd8368158131ccee5a42f72 (patch) | |
| tree | 4c1712fcfef615cbeda8b783a8d0555e7fc9fe5c /indra/llcommon/llthread.cpp | |
| parent | de6ae690b5315307b59b1a2ac722700c3839e4ba (diff) | |
| parent | 0e609cc95b08c28bd51f5ab48160fd93df7a6b28 (diff) | |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-development.
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; |
