framework/source/fwi/threadhelp/transactionmanager.cxx |    8 ++++----
 include/framework/transactionmanager.hxx               |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 8a29fb309878ccf4ad880b02d544ddf4e207116c
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 16 11:11:04 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue May 17 08:09:33 2022 +0200

    osl::Mutex->std::mutex in framework::TransactionManager
    
    Change-Id: I8a1c8e8ccec8ca64cc4f615ea8e9e415a343996d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134396
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/framework/source/fwi/threadhelp/transactionmanager.cxx 
b/framework/source/fwi/threadhelp/transactionmanager.cxx
index 21c8fb69bf13..86d5b354a064 100644
--- a/framework/source/fwi/threadhelp/transactionmanager.cxx
+++ b/framework/source/fwi/threadhelp/transactionmanager.cxx
@@ -71,7 +71,7 @@ void  TransactionManager::setWorkingMode( EWorkingMode eMode )
     // Safe member access.
     bool bWaitFor = false;
     {
-        osl::MutexGuard aAccessGuard(m_aAccessLock);
+        std::unique_lock aAccessGuard(m_aAccessLock);
         // Change working mode first!
         if (
             (m_eWorkingMode == E_INIT && eMode == E_WORK) ||
@@ -137,7 +137,7 @@ void  TransactionManager::setWorkingMode( EWorkingMode 
eMode )
 EWorkingMode TransactionManager::getWorkingMode() const
 {
     // Synchronize access to internal member!
-    ::osl::MutexGuard aAccessLock( m_aAccessLock );
+    std::unique_lock aAccessLock( m_aAccessLock );
     return m_eWorkingMode;
 }
 
@@ -154,7 +154,7 @@ EWorkingMode TransactionManager::getWorkingMode() const
 
*//*-*****************************************************************************************************/
 void  TransactionManager::registerTransaction( EExceptionMode eMode )
 {
-    ::osl::MutexGuard aAccessGuard( m_aAccessLock );
+    std::unique_lock aAccessGuard( m_aAccessLock );
     switch( m_eWorkingMode )
     {
     case E_INIT:
@@ -201,7 +201,7 @@ void  TransactionManager::unregisterTransaction()
 {
     // This call could not rejected!
     // Safe access to internal member.
-    ::osl::MutexGuard aAccessGuard( m_aAccessLock );
+    std::unique_lock aAccessGuard( m_aAccessLock );
 
     // Deregister this transaction.
     // If it was the last one ... open gate to enable changing of working mode!
diff --git a/include/framework/transactionmanager.hxx 
b/include/framework/transactionmanager.hxx
index d6a07293a976..fe011968cf32 100644
--- a/include/framework/transactionmanager.hxx
+++ b/include/framework/transactionmanager.hxx
@@ -19,7 +19,7 @@
 
 #pragma once
 
-#include <osl/mutex.hxx>
+#include <mutex>
 
 #include "gate.hxx"
 
@@ -111,7 +111,7 @@ class TransactionManager
 
     private:
 
-        mutable ::osl::Mutex    m_aAccessLock;   /// regulate access on 
internal member of this instance
+        mutable std::mutex      m_aAccessLock;   /// regulate access on 
internal member of this instance
         Gate                    m_aBarrier;   /// used to block transactions 
requests during change or work mode
         EWorkingMode            m_eWorkingMode;   /// current working mode of 
object which use this manager (used to reject calls at wrong time)
         sal_Int32               m_nTransactionCount;   /// every transaction 
request is registered by this counter

Reply via email to