diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-22 20:54:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-27 20:21:41 +0100 |
commit | 64aa0e462f189bf3962c3ab4ae5d5e9b0cd177bd (patch) | |
tree | e4aa3bc31200c3cf64f0559667775c239b0ae5f7 /tools | |
parent | c143160737e0aa6a44f7ca23392171b55091a120 (diff) |
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.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/stream/strmunx.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
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); } |