summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/comphelper/solarmutex.hxx17
-rw-r--r--include/tools/solarmutex.hxx2
2 files changed, 16 insertions, 3 deletions
diff --git a/include/comphelper/solarmutex.hxx b/include/comphelper/solarmutex.hxx
index 3b66a005370c..c50eba29dcda 100644
--- a/include/comphelper/solarmutex.hxx
+++ b/include/comphelper/solarmutex.hxx
@@ -26,8 +26,15 @@
namespace comphelper {
-/** SolarMutex interface, needed for Application::GetSolarMutex().
-*/
+/**
+ * Abstract SolarMutex interface, needed for VCL's
+ * Application::GetSolarMutex().
+ *
+ * The SolarMutex is the one big recursive code lock used
+ * to protect the vast majority of the LibreOffice code-base,
+ * in particular anything that is graphical and the cores of
+ * the applications.
+ */
class COMPHELPER_DLLPUBLIC SolarMutex {
public:
virtual void acquire() = 0;
@@ -36,6 +43,12 @@ public:
virtual bool tryToAcquire() = 0;
+ /// Help components to get the SolarMutex easily.
+ static SolarMutex *get();
+
+ /// semi-private: allow VCL to push its one-big-lock down here.
+ static void setSolarMutex( SolarMutex *pMutex );
+
protected:
SolarMutex();
diff --git a/include/tools/solarmutex.hxx b/include/tools/solarmutex.hxx
index 85e465d2ec8a..60af81c1f5a6 100644
--- a/include/tools/solarmutex.hxx
+++ b/include/tools/solarmutex.hxx
@@ -24,10 +24,10 @@
namespace tools
{
+ /// Deprecated in favour of comphelper::SolarMutex
class TOOLS_DLLPUBLIC SolarMutex
{
public:
- static void SetSolarMutex( comphelper::SolarMutex* pMutex );
static bool Acquire();
static void Release();
};