summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-21 14:16:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-21 19:43:10 +0100
commit449977192b04878a2e3ea0ce1ff3445d02f084ce (patch)
tree56d06da4d48c986a228f92fba6e4e97c1f03e543 /framework
parentd54a1380d13d8d832841cdc33440aac2e14d3300 (diff)
osl::Mutex->std::mutex in ActionLockGuard
Change-Id: I8081d017f8a03be94b60011fcd4eb34eba786aa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125623 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/inc/loadenv/actionlockguard.hxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/framework/source/inc/loadenv/actionlockguard.hxx b/framework/source/inc/loadenv/actionlockguard.hxx
index dd3c9ab51280..ee52fcc0dc54 100644
--- a/framework/source/inc/loadenv/actionlockguard.hxx
+++ b/framework/source/inc/loadenv/actionlockguard.hxx
@@ -20,7 +20,7 @@
#pragma once
#include <com/sun/star/document/XActionLockable.hpp>
-#include <osl/mutex.hxx>
+#include <mutex>
namespace framework{
@@ -36,7 +36,7 @@ class ActionLockGuard final
// member
private:
- osl::Mutex m_mutex;
+ std::mutex m_mutex;
/** @short points to the object, which can be locked from outside. */
css::uno::Reference< css::document::XActionLockable > m_xActionLock;
@@ -81,7 +81,7 @@ class ActionLockGuard final
*/
bool setResource(const css::uno::Reference< css::document::XActionLockable >& xLock)
{
- osl::MutexGuard g(m_mutex);
+ std::unique_lock g(m_mutex);
if (m_bActionLocked || !xLock.is())
return false;
@@ -107,7 +107,7 @@ class ActionLockGuard final
void freeResource()
{
// SAFE -> ..........................
- osl::ClearableMutexGuard aMutexLock(m_mutex);
+ std::unique_lock aMutexLock(m_mutex);
css::uno::Reference< css::document::XActionLockable > xLock = m_xActionLock;
bool bLocked = m_bActionLocked;
@@ -115,7 +115,7 @@ class ActionLockGuard final
m_xActionLock.clear();
m_bActionLocked = false;
- aMutexLock.clear();
+ aMutexLock.unlock();
// <- SAFE ..........................
if (bLocked && xLock.is())
@@ -125,7 +125,7 @@ class ActionLockGuard final
/** @short unlock the internal wrapped resource, if it's not already done. */
void unlock()
{
- osl::MutexGuard g(m_mutex);
+ std::unique_lock g(m_mutex);
if (m_bActionLocked && m_xActionLock.is())
{
m_xActionLock->removeActionLock();