summaryrefslogtreecommitdiffstats
path: root/cppu
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-18 14:13:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-18 20:46:27 +0200
commit6db41dd2649a9ddaf32fc779bed07dc7d61c1154 (patch)
tree291c8a86e695d87e1bea24fc70ae36eb105ef6bf /cppu
parentosl::Mutex->std::mutex in NamingService_Impl (diff)
downloadcore-6db41dd2649a9ddaf32fc779bed07dc7d61c1154.tar.gz
core-6db41dd2649a9ddaf32fc779bed07dc7d61c1154.zip
osl::Mutex->std::mutex in EnvStack
Change-Id: I1339a362046c96d9056f70cd687d023a055b4cf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppu')
-rw-r--r--cppu/source/uno/EnvStack.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx
index f6b11352cf14..0b037687cdd9 100644
--- a/cppu/source/uno/EnvStack.cxx
+++ b/cppu/source/uno/EnvStack.cxx
@@ -27,8 +27,8 @@
#include <osl/thread.h>
#include <osl/thread.hxx>
-#include <osl/mutex.hxx>
+#include <mutex>
#include <unordered_map>
using namespace com::sun::star;
@@ -70,7 +70,7 @@ typedef std::unordered_map<oslThreadIdentifier,
namespace
{
- struct s_threadMap_mutex : public rtl::Static< osl::Mutex, s_threadMap_mutex > {};
+ std::mutex s_threadMap_mutex;
struct s_threadMap : public rtl::Static< ThreadMap, s_threadMap > {};
}
@@ -78,7 +78,7 @@ static void s_setCurrent(uno_Environment * pEnv)
{
oslThreadIdentifier threadId = osl::Thread::getCurrentIdentifier();
- osl::MutexGuard guard(s_threadMap_mutex::get());
+ std::lock_guard guard(s_threadMap_mutex);
ThreadMap &rThreadMap = s_threadMap::get();
if (pEnv)
{
@@ -98,7 +98,7 @@ static uno_Environment * s_getCurrent()
oslThreadIdentifier threadId = osl::Thread::getCurrentIdentifier();
- osl::MutexGuard guard(s_threadMap_mutex::get());
+ std::lock_guard guard(s_threadMap_mutex);
ThreadMap &rThreadMap = s_threadMap::get();
ThreadMap::iterator iEnv = rThreadMap.find(threadId);
if(iEnv != rThreadMap.end())