diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-21 11:53:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-21 15:47:17 +0100 |
commit | efd95650cba2460bc153de00f8eb27785ad0e18a (patch) | |
tree | b64a52cf2dda2825d027eb79a2776a3edc52f516 /framework/source | |
parent | c3b968a2f1e8e824ace86c37d0e500440374bd09 (diff) |
osl::Mutex->std::mutex in framework::ConfigAccess
Change-Id: I44d41db2498ea39fca309785278c1fe50d7ae8b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125617
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/fwi/jobs/configaccess.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/framework/source/fwi/jobs/configaccess.cxx b/framework/source/fwi/jobs/configaccess.cxx index d3ce0e5f70a1..27f2c3dd9572 100644 --- a/framework/source/fwi/jobs/configaccess.cxx +++ b/framework/source/fwi/jobs/configaccess.cxx @@ -67,7 +67,7 @@ ConfigAccess::~ConfigAccess() */ ConfigAccess::EOpenMode ConfigAccess::getMode() const { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); return m_eMode; } @@ -87,7 +87,7 @@ ConfigAccess::EOpenMode ConfigAccess::getMode() const */ void ConfigAccess::open( /*IN*/ EOpenMode eMode ) { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); // check if configuration is already open in the right mode. // By the way: Don't allow closing by using this method! @@ -99,7 +99,7 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode ) // can be called without checks! It does the checks by itself ... // e.g. for already closed or not opened configuration. // Flushing of all made changes will be done here too. - close(); + closeImpl(); // create the configuration provider, which provides sub access points css::uno::Reference< css::lang::XMultiServiceFactory > xConfigProvider = css::configuration::theDefaultProvider::get(m_xContext); @@ -135,7 +135,12 @@ void ConfigAccess::open( /*IN*/ EOpenMode eMode ) */ void ConfigAccess::close() { - osl::MutexGuard g(m_mutex); + std::unique_lock g(m_mutex); + closeImpl(); +} + +void ConfigAccess::closeImpl() +{ // check already closed configuration if (m_xConfig.is()) { |