summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-10-09 11:27:26 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-10-09 14:51:44 +0000
commitf76b3dd039818cc2b297fa2a11b60d9e055e6d8c (patch)
treee46d4174cd7f66edeb962031e59259b820eaa344 /comphelper
parent3e23ee076ae6b46af617c0692998b22459a43dde (diff)
Move SolarMutex down from tools to comphelper/ to make life easier.
Change-Id: I7dd21f30daa27e5de2848eb16aee9a610dd629d5 Reviewed-on: https://gerrit.libreoffice.org/19271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/solarmutex.cxx25
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: */