summaryrefslogtreecommitdiff
path: root/include/comphelper/solarmutex.hxx
AgeCommit message (Collapse)Author
2022-07-04tdf#137544 reduce cost of SolarMutex checkingNoel Grandin
the std::thread::id facilities are cheaper than the sal versions Change-Id: I5ccb7e54f3a1e4d715338faa1e9c0aae9449e46d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136800 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-26SolarMutex::m_nThreadId is read without SolarMutex::m_aMutex lockedStephan Bergmann
...so better make it std::atomic<> (and it also can be private). And in SolarMutex::doRelease, make sure that m_nCount is only read with m_aMutex locked. Change-Id: Iee0c1465e60e07ccd8955010a3dbc15a99dbe807 Reviewed-on: https://gerrit.libreoffice.org/71260 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-08tdf#42949 Fix IWYU warnings in include/comphelper/[m-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I04c5ba277d5b3398c07de6ae66713d977636088d Reviewed-on: https://gerrit.libreoffice.org/61347 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-18Move yield mutex handling into SalInstanceJan-Marek Glogowski
After the refectoring in commit 4c93de2c921b ("merge GenericSolarMutex and SolarMutex"), there is no more need to prevent instantiation of comphelper::SolarMutex objects. Since every VCL backend implements the yield mutex management in the same way, we can move the general implementation into the SalInstance. While at it use std::unique_ptr for the yield mutex on Mac and Windows platforms. Change-Id: Ibe0610bd92b4623152ee14e7a35b52465d403720 Reviewed-on: https://gerrit.libreoffice.org/60570 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-06-21merge GenericSolarMutex and SolarMutexNoel Grandin
Since nothing else is implementing the SolarMutex abstract class. Change-Id: I2a41254af3e9c7534033cdd0bece9dd8e0258b9d Reviewed-on: https://gerrit.libreoffice.org/56153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19it's spelled "facade"Michael Stahl
Change-Id: I5533a870f44bd12206e3627fe0469f37f4e02436
2017-09-19Fix typosAndrea Gelmini
Change-Id: I59c6ca2af7a3aab55da6a29afa02dcd611492a59 Reviewed-on: https://gerrit.libreoffice.org/42452 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-19Unify SolarMutex implementationsJan-Marek Glogowski
All backends implement the SolarMutex in mostly the same way. So this consolidates this code into a GenericSolarMutex. We still need the abstract SolarMutex class for the fake AKA fascade implementation in dbaccess. The patch also replaces various places of direct mutex usage with either SolarMutexGuard or SolarMutexReleaser objects. Change-Id: Ia0146dd6c51a3b9a513cc6af34a66def58aad831 Reviewed-on: https://gerrit.libreoffice.org/42325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2015-10-12Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-09Move SolarMutex down from tools to comphelper/ to make life easier.Michael Meeks
Change-Id: I7dd21f30daa27e5de2848eb16aee9a610dd629d5 Reviewed-on: https://gerrit.libreoffice.org/19271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-02-16boost->stdCaolán McNamara
Change-Id: I44b208a2c5c5bf73ac025462c9f7bd499ed0a49b
2013-11-09fdo#65108 inter-module includes <>Norbert Thiebaud
Change-Id: Iac3debc892d420ab50c1b38446334d30488648dc
2013-05-14SolarMutex does not belong into the URE interfaceStephan Bergmann
...so move it from osl/mutex.hxx to its own comphelper/solarmutex.hxx. It looks like a newbie mistake that 59e7685d8d812ee8773f57475cbe3aa2a0bdfc81 "Create an abstract interface to be used to implement a SolarMutex" put it here in the first place. I do not consider this an incompatible change really, as no external URE client code should have used SolarMutex anyway. (Also included some clean up, like removing unused {Clearable,Resettable}SolarGuard, and spelling out SolarGuard in the few places it is used.) Change-Id: I121ffb5b7cefbc19e88b5405e5a85ffc895be852