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 --- include/comphelper/solarmutex.hxx | 17 +++++++++++++++-- include/tools/solarmutex.hxx | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'include') 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(); }; -- cgit v1.2.3