tools/source/stream/strmunx.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 64aa0e462f189bf3962c3ab4ae5d5e9b0cd177bd
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Dec 22 20:54:39 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Dec 27 20:21:41 2021 +0100

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

diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 853389266ac3..9beade27e92e 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -24,7 +24,7 @@
 #include <tools/stream.hxx>
 #include <map>
 
-#include <osl/mutex.hxx>
+#include <mutex>
 #include <osl/thread.h>
 #include <sal/log.hxx>
 
@@ -37,9 +37,9 @@ using namespace osl;
 
 namespace {
 
-osl::Mutex& LockMutex()
+std::mutex& LockMutex()
 {
-    static osl::Mutex SINGLETON;
+    static std::mutex SINGLETON;
     return SINGLETON;
 }
 
@@ -63,7 +63,7 @@ bool lockFile( const SvFileStream* pStream )
     if( aStatus.getFileType() == osl::FileStatus::Directory )
         return true;
 
-    osl::MutexGuard aGuard( LockMutex() );
+    std::unique_lock aGuard( LockMutex() );
     for( const auto& [rLockStream, rLockItem] : gLocks )
     {
         if( aItem.isIdenticalTo( rLockItem ) )
@@ -86,7 +86,7 @@ bool lockFile( const SvFileStream* pStream )
 
 void unlockFile( SvFileStream const * pStream )
 {
-    osl::MutexGuard aGuard( LockMutex() );
+    std::unique_lock aGuard( LockMutex() );
     gLocks.erase(pStream);
 }
 

Reply via email to