diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-08 16:04:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-08 20:42:39 +0100 |
commit | 69a9b48d50d98130a65aa6c823dc6cc464fefd71 (patch) | |
tree | defcf2cef8eb60721a4bf389ca051bff4e163a12 /vcl/source/app | |
parent | ce8a8e809dedc61d8355560914f78987ee11f1e2 (diff) |
Replace SchedulerMutex with (non-recursive) std::mutex
...following up on the TODO from 84af20ef3ea72190784e9e7be820684c2558ba8c "Make
SchedulerMutex non-recursive"
Change-Id: I3be98f2dba7c7486b79ec1f166431333cc69451a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107423
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r-- | vcl/source/app/scheduler.cxx | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index 1759178e2e2f..da8511bffa55 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -207,36 +207,18 @@ next_priority: rSchedCtx.mnTimerPeriod = InfiniteTimeoutMs; } -void SchedulerMutex::acquire() -{ - if (!m_aMutex.acquire()) - std::abort(); - if (m_bIsLocked) - std::abort(); - m_bIsLocked = true; -} - -void SchedulerMutex::release() -{ - if (!m_bIsLocked) - std::abort(); - m_bIsLocked = false; - if (!m_aMutex.release()) - std::abort(); -} - void Scheduler::Lock() { ImplSVData* pSVData = ImplGetSVData(); assert( pSVData != nullptr ); - pSVData->maSchedCtx.maMutex.acquire(); + pSVData->maSchedCtx.maMutex.lock(); } void Scheduler::Unlock() { ImplSVData* pSVData = ImplGetSVData(); assert( pSVData != nullptr ); - pSVData->maSchedCtx.maMutex.release(); + pSVData->maSchedCtx.maMutex.unlock(); } /** |