From 1e28e9e854e2f82a7f9b8753875d55a9b7053c11 Mon Sep 17 00:00:00 2001
From: Drake Arconis <drake@alchemyviewer.org>
Date: Wed, 29 Oct 2014 12:15:08 -0400
Subject: [PATCH] changed: Minor cleanup in mutex code and prep for future

---
 indra/llcommon/llmutex.cpp         | 2 +-
 indra/llcommon/llmutex.h           | 6 +++---
 indra/llvfs/llvfs.cpp              | 2 +-
 indra/newview/llmeshrepository.cpp | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp
index 4e83a4d882..b8e7384fc4 100644
--- a/indra/llcommon/llmutex.cpp
+++ b/indra/llcommon/llmutex.cpp
@@ -133,7 +133,7 @@ uintptr_t LLMutex::lockingThread() const
 	return mLockingThread;
 }
 
-bool LLMutex::trylock()
+bool LLMutex::try_lock()
 {
 	if(isSelfLocked())
 	{ //redundant lock
diff --git a/indra/llcommon/llmutex.h b/indra/llcommon/llmutex.h
index ebe1d54b14..904da73f94 100644
--- a/indra/llcommon/llmutex.h
+++ b/indra/llcommon/llmutex.h
@@ -49,7 +49,7 @@ public:
 	virtual ~LLMutex();
 	
 	void lock();		// blocks
-	bool trylock();		// non-blocking, returns true if lock held.
+	bool try_lock();		// non-blocking, returns true if lock held.
 	void unlock();		// undefined behavior when called on mutex not being held
 	bool isLocked(); 	// non-blocking, but does do a lock/unlock so not free
 	bool isSelfLocked(); //return true if locked in a same thread
@@ -105,7 +105,7 @@ private:
 //============================================================================
 
 // Scoped locking class similar in function to LLMutexLock but uses
-// the trylock() method to conditionally acquire lock without
+// the try_lock() method to conditionally acquire lock without
 // blocking.  Caller resolves the resulting condition by calling
 // the isLocked() method and either punts or continues as indicated.
 //
@@ -120,7 +120,7 @@ public:
 		  mLocked(false)
 	{
 		if (mMutex)
-			mLocked = mMutex->trylock();
+			mLocked = mMutex->try_lock();
 	}
 
 	~LLMutexTrylock()
diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp
index 1cc0e819db..f62214042a 100755
--- a/indra/llvfs/llvfs.cpp
+++ b/indra/llvfs/llvfs.cpp
@@ -234,7 +234,7 @@ LLVFS::LLVFS(const std::string& index_filename, const std::string& data_filename
 	mDataFP(NULL),
 	mIndexFP(NULL)
 {
-	mDataMutex = new LLMutex(0);
+	mDataMutex = new LLMutex(NULL);
 
 	S32 i;
 	for (i = 0; i < VFSLOCK_COUNT; i++)
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index fcb69e3e1e..0eff72d63e 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2513,7 +2513,7 @@ void LLMeshRepoThread::notifyLoadedMeshes()
 
 	if (! mSkinInfoQ.empty() || ! mDecompositionQ.empty())
 	{
-		if (mMutex->trylock())
+		if (mMutex->try_lock())
 		{
 			std::list<LLMeshSkinInfo> skin_info_q;
 			std::list<LLModel::Decomposition*> decomp_q;
-- 
GitLab