From 31fbad6ac546ee00cd560d386fefabf6c7f76525 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 2 Feb 2023 17:45:09 -0500 Subject: [PATCH] Back to mutex --- indra/llcommon/llapr.cpp | 2 +- indra/llcommon/llapr.h | 2 +- indra/llcommon/llinstancetracker.h | 2 +- indra/llcommon/llmutex.cpp | 2 +- indra/llcommon/llmutex.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index 4d7205b209f..db06b695218 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -146,7 +146,7 @@ LLVolatileAPRPool::LLVolatileAPRPool(std::string name, BOOL is_local, apr_pool_t mNumTotalRef(0) { //create mutex for thread safe. - mMutexp = std::make_unique<std::shared_mutex>(); + mMutexp = std::make_unique<std::mutex>(); } LLVolatileAPRPool::~LLVolatileAPRPool() diff --git a/indra/llcommon/llapr.h b/indra/llcommon/llapr.h index c9723180102..64425fae230 100644 --- a/indra/llcommon/llapr.h +++ b/indra/llcommon/llapr.h @@ -119,7 +119,7 @@ class LL_COMMON_API LLVolatileAPRPool final : public LLAPRPool S32 mNumActiveRef ; //number of active pointers pointing to the apr_pool. S32 mNumTotalRef ; //number of total pointers pointing to the apr_pool since last creating. - std::unique_ptr<std::shared_mutex> mMutexp; + std::unique_ptr<std::mutex> mMutexp; } ; // File IO convenience functions. diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 4a33e644a64..5d1fb34ed55 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -52,7 +52,7 @@ namespace LLInstanceTrackerPrivate struct StaticBase { // We need to be able to lock static data while manipulating it. - std::shared_mutex mMutex; + std::mutex mMutex; }; void logerrs(const char* cls, const std::string&, const std::string&, const std::string&); diff --git a/indra/llcommon/llmutex.cpp b/indra/llcommon/llmutex.cpp index d3b4215de2c..673203bb219 100644 --- a/indra/llcommon/llmutex.cpp +++ b/indra/llcommon/llmutex.cpp @@ -94,7 +94,7 @@ void LLCondition::broadcast() // // LLScopedLock // -LLScopedLock::LLScopedLock(std::shared_mutex* mutex) : mMutex(mutex) +LLScopedLock::LLScopedLock(std::mutex* mutex) : mMutex(mutex) { LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD if(mutex) diff --git a/indra/llcommon/llmutex.h b/indra/llcommon/llmutex.h index 9e3ef0558f4..8c5316549c0 100644 --- a/indra/llcommon/llmutex.h +++ b/indra/llcommon/llmutex.h @@ -198,7 +198,7 @@ class LL_COMMON_API LLScopedLock : private boost::noncopyable * @param mutex An allocated mutex. If you pass in NULL, * this wrapper will not lock. */ - LLScopedLock(std::shared_mutex* mutex); + LLScopedLock(std::mutex* mutex); /** * @brief Destructor which unlocks the mutex if still locked. @@ -217,7 +217,7 @@ class LL_COMMON_API LLScopedLock : private boost::noncopyable protected: bool mLocked; - std::shared_mutex* mMutex; + std::mutex* mMutex; }; #endif // LL_LLMUTEX_H -- GitLab