[Libreoffice-commits] core.git: cppu/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 18 18:47:01 UTC 2021
cppu/source/uno/EnvStack.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 6db41dd2649a9ddaf32fc779bed07dc7d61c1154
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Jul 18 14:13:59 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 18 20:46:27 2021 +0200
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 at collabora.co.uk>
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())
More information about the Libreoffice-commits
mailing list