From ee47dfa4747474bceb266df5ea1638a2e3161c1c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 14 May 2013 14:24:35 +0200 Subject: [PATCH] LockHelper::getGlobalLock is never called with an argument Change-Id: I90b431345d791c887f9047258a6f439bcf222784 --- framework/inc/threadhelp/lockhelper.hxx | 5 ++++- framework/source/fwi/threadhelp/lockhelper.cxx | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/framework/inc/threadhelp/lockhelper.hxx b/framework/inc/threadhelp/lockhelper.hxx index 277609a6c930..72f2d2271ae0 100644 --- a/framework/inc/threadhelp/lockhelper.hxx +++ b/framework/inc/threadhelp/lockhelper.hxx @@ -89,7 +89,10 @@ class FWI_DLLPUBLIC LockHelper : public IMutex //------------------------------------------------------------------------------------------------------------- // something else //------------------------------------------------------------------------------------------------------------- - static LockHelper& getGlobalLock ( comphelper::SolarMutex* pSolarMutex = NULL ); + static LockHelper& getGlobalLock(); + //TODO: this presumable should return the SolarMutex, though it + // actually returns some independent mutex + ::osl::Mutex& getShareableOslMutex( ); //------------------------------------------------------------------------------------------------------------- diff --git a/framework/source/fwi/threadhelp/lockhelper.cxx b/framework/source/fwi/threadhelp/lockhelper.cxx index 8e2c7dd61112..14f3bfee9d3c 100644 --- a/framework/source/fwi/threadhelp/lockhelper.cxx +++ b/framework/source/fwi/threadhelp/lockhelper.cxx @@ -257,7 +257,7 @@ void LockHelper::downgradeWriteAccess() @onerror No error should occure. *//*-*************************************************************************************************************/ -LockHelper& LockHelper::getGlobalLock( comphelper::SolarMutex* pSolarMutex ) +LockHelper& LockHelper::getGlobalLock() { // Initialize static "member" only for one time! // Algorithm: @@ -274,7 +274,7 @@ LockHelper& LockHelper::getGlobalLock( comphelper::SolarMutex* pSolarMutex ) ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); if( pLock == NULL ) { - static LockHelper aLock( pSolarMutex ); + static LockHelper aLock; pLock = &aLock; } }