From 6db41dd2649a9ddaf32fc779bed07dc7d61c1154 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 18 Jul 2021 14:13:59 +0200 Subject: 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 --- cppu/source/uno/EnvStack.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cppu') 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 #include -#include +#include #include using namespace com::sun::star; @@ -70,7 +70,7 @@ typedef std::unordered_map {}; + 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()) -- cgit