diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-01 16:01:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-02 07:00:23 +0000 |
commit | 17523906a875f84e3c435127700bcd9ae932997b (patch) | |
tree | 5dfe3cc89a378e8c4d2536976e1bf866087a1b14 /configmgr/source | |
parent | 90ff8cc432fd043ed662d478f7ace49438d00ff3 (diff) |
osl::Mutex->std::mutex in configmgr::read_write_access::Service
Change-Id: Ic8f688d3ad66c1be33a147e05b0e9145593214f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146471
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr/source')
-rw-r--r-- | configmgr/source/readwriteaccess.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/configmgr/source/readwriteaccess.cxx b/configmgr/source/readwriteaccess.cxx index 57e8b298a966..1e16cbb717a9 100644 --- a/configmgr/source/readwriteaccess.cxx +++ b/configmgr/source/readwriteaccess.cxx @@ -22,9 +22,9 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/weak.hxx> -#include <osl/mutex.hxx> #include <rtl/ref.hxx> #include <rtl/ustring.hxx> +#include <mutex> #include <utility> #include <sal/types.h> @@ -98,7 +98,7 @@ private: css::uno::Reference< css::uno::XComponentContext > context_; - osl::Mutex mutex_; + std::mutex mutex_; rtl::Reference< RootAccess > root_; }; @@ -110,7 +110,7 @@ void Service::initialize(css::uno::Sequence< css::uno::Any > const & aArguments) "not exactly one string argument", static_cast< cppu::OWeakObject * >(this), -1); } - osl::MutexGuard g1(mutex_); + std::unique_lock g1(mutex_); if (root_.is()) { throw css::uno::RuntimeException( "already initialized", static_cast< cppu::OWeakObject * >(this)); @@ -122,7 +122,7 @@ void Service::initialize(css::uno::Sequence< css::uno::Any > const & aArguments) } rtl::Reference< RootAccess > Service::getRoot() { - osl::MutexGuard g(mutex_); + std::unique_lock g(mutex_); if (!root_.is()) { throw css::lang::NotInitializedException( "not initialized", static_cast< cppu::OWeakObject * >(this)); |