summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmutex.cpp
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-07-21 20:11:56 +0000
committerDave Houlton <euclid@lindenlab.com>2020-07-21 20:11:56 +0000
commit8153e7d63923a0022ffc1d6f526d4be57d34ba3d (patch)
tree596d38d591177ccc2ffef695b6f79437c5efce97 /indra/llcommon/llmutex.cpp
parent6362aa300766484909cdfc8884edf3e6744fc727 (diff)
parent19d063952c4706d4344f207775aa5dfdff8802fd (diff)
Merged in merge-6.4.6 (pull request #207)
Merge master 6.4.6 into DRTVWR-510 (VS2017 update)
Diffstat (limited to 'indra/llcommon/llmutex.cpp')
-rw-r--r--indra/llcommon/llmutex.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp
index 75f43a4704..4d73c04d07 100644
--- a/indra/llcommon/llmutex.cpp
+++ b/indra/llcommon/llmutex.cpp
@@ -32,8 +32,7 @@
//============================================================================
LLMutex::LLMutex() :
- mCount(0),
- mLockingThread(NO_THREAD)
+ mCount(0)
{
}
@@ -55,7 +54,7 @@ void LLMutex::lock()
#if MUTEX_DEBUG
// Have to have the lock before we can access the debug info
- U32 id = LLThread::currentID();
+ auto id = LLThread::currentID();
if (mIsLocked[id] != FALSE)
LL_ERRS() << "Already locked in Thread: " << id << LL_ENDL;
mIsLocked[id] = TRUE;
@@ -74,13 +73,13 @@ void LLMutex::unlock()
#if MUTEX_DEBUG
// Access the debug info while we have the lock
- U32 id = LLThread::currentID();
+ auto id = LLThread::currentID();
if (mIsLocked[id] != TRUE)
LL_ERRS() << "Not locked in Thread: " << id << LL_ENDL;
mIsLocked[id] = FALSE;
#endif
- mLockingThread = NO_THREAD;
+ mLockingThread = LLThread::id_t();
mMutex.unlock();
}
@@ -102,7 +101,7 @@ bool LLMutex::isSelfLocked()
return mLockingThread == LLThread::currentID();
}
-U32 LLMutex::lockingThread() const
+LLThread::id_t LLMutex::lockingThread() const
{
return mLockingThread;
}
@@ -122,7 +121,7 @@ bool LLMutex::trylock()
#if MUTEX_DEBUG
// Have to have the lock before we can access the debug info
- U32 id = LLThread::currentID();
+ auto id = LLThread::currentID();
if (mIsLocked[id] != FALSE)
LL_ERRS() << "Already locked in Thread: " << id << LL_ENDL;
mIsLocked[id] = TRUE;