From f76b3dd039818cc2b297fa2a11b60d9e055e6d8c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 9 Oct 2015 11:27:26 +0100 Subject: Move SolarMutex down from tools to comphelper/ to make life easier. Change-Id: I7dd21f30daa27e5de2848eb16aee9a610dd629d5 Reviewed-on: https://gerrit.libreoffice.org/19271 Tested-by: Jenkins Reviewed-by: Michael Meeks --- comphelper/source/misc/solarmutex.cxx | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'comphelper/source/misc/solarmutex.cxx') diff --git a/comphelper/source/misc/solarmutex.cxx b/comphelper/source/misc/solarmutex.cxx index 0eecac8c37a1..1d2375440804 100644 --- a/comphelper/source/misc/solarmutex.cxx +++ b/comphelper/source/misc/solarmutex.cxx @@ -18,11 +18,30 @@ */ #include - +#include #include -comphelper::SolarMutex::SolarMutex() {} +namespace comphelper { + +SolarMutex::SolarMutex() {} + +SolarMutex::~SolarMutex() {} + +namespace { + static SolarMutex* pSolarMutex = 0; +} + +void SolarMutex::setSolarMutex( SolarMutex *pMutex ) +{ + assert((pMutex && !pSolarMutex) || !pMutex); + pSolarMutex = pMutex; +} + +SolarMutex *SolarMutex::get() +{ + return pSolarMutex; +} -comphelper::SolarMutex::~SolarMutex() {} +} // namespace comphelper /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit