diff options
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/solarmutex.cxx | 25 |
1 files changed, 22 insertions, 3 deletions
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 <sal/config.h> - +#include <assert.h> #include <comphelper/solarmutex.hxx> -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: */ |