summaryrefslogtreecommitdiff
path: root/bridges/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-01 15:56:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-02 06:59:36 +0000
commit5233bc74ea6c66795b5e5299e6ce554de877ef8a (patch)
treed56ea9bed7f9e3b5dd03714df8719e55c0700934 /bridges/source
parente8d2a9ffc0d96418dbec94cdbba14aac1c09adf5 (diff)
osl::Mutex->std::mutex in JniUnoEnvironmentData
Change-Id: Iab6d430af7afc0d21e118b05d64a15664fc2f677 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bridges/source')
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx2
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx2
-rw-r--r--bridges/source/jni_uno/jniunoenvironmentdata.hxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index be2e3d37ec12..5e09a8899690 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -428,7 +428,7 @@ static void java_env_dispose(uno_Environment * env) {
jobject async;
{
- osl::MutexGuard g(envData->mutex);
+ std::unique_lock g(envData->mutex);
async = envData->asynchronousFinalizer;
envData->asynchronousFinalizer = nullptr;
}
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 5edb2b7b3453..53f761e82657 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -74,7 +74,7 @@ jobject Bridge::map_to_java(
auto * envData = static_cast<jni_uno::JniUnoEnvironmentData *>(
m_java_env->pContext);
{
- osl::MutexGuard g(envData->mutex);
+ std::unique_lock g(envData->mutex);
args2[ 7 ].l = envData->asynchronousFinalizer;
}
jo_iface = jni->CallStaticObjectMethodA(
diff --git a/bridges/source/jni_uno/jniunoenvironmentdata.hxx b/bridges/source/jni_uno/jniunoenvironmentdata.hxx
index 39ffdeea6ece..d1f3bab4b12d 100644
--- a/bridges/source/jni_uno/jniunoenvironmentdata.hxx
+++ b/bridges/source/jni_uno/jniunoenvironmentdata.hxx
@@ -24,10 +24,10 @@
#include <jni.h>
#include <jvmaccess/unovirtualmachine.hxx>
-#include <osl/mutex.hxx>
#include <rtl/ref.hxx>
#include "jni_info.h"
+#include <mutex>
namespace jni_uno {
@@ -45,7 +45,7 @@ struct JniUnoEnvironmentData {
rtl::Reference<jvmaccess::UnoVirtualMachine> const machine;
JNI_info const * const info;
- osl::Mutex mutex;
+ std::mutex mutex;
jobject asynchronousFinalizer;
};