summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-08 16:04:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-08 20:42:39 +0100
commit69a9b48d50d98130a65aa6c823dc6cc464fefd71 (patch)
treedefcf2cef8eb60721a4bf389ca051bff4e163a12 /vcl/inc
parentce8a8e809dedc61d8355560914f78987ee11f1e2 (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/inc')
-rw-r--r--vcl/inc/schedulerimpl.hxx17
-rw-r--r--vcl/inc/svdata.hxx4
2 files changed, 3 insertions, 18 deletions
diff --git a/vcl/inc/schedulerimpl.hxx b/vcl/inc/schedulerimpl.hxx
index 26a9c47de11f..f6d5dda708bd 100644
--- a/vcl/inc/schedulerimpl.hxx
+++ b/vcl/inc/schedulerimpl.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_VCL_INC_SCHEDULERIMPL_HXX
#include "salwtype.hxx"
-#include <osl/mutex.hxx>
#include <vcl/scheduler.hxx>
class Task;
@@ -38,22 +37,6 @@ struct ImplSchedulerData final
const char *GetDebugName() const;
};
-class SchedulerMutex final
-{
- // this simulates a non-recursive mutex
- bool m_bIsLocked;
- osl::Mutex m_aMutex;
-
-public:
- SchedulerMutex()
- : m_bIsLocked(false)
- {
- }
-
- void acquire();
- void release();
-};
-
class SchedulerGuard final
{
public:
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index e7a423234043..564c28bdc9b0 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -38,6 +38,7 @@
#include "salwtype.hxx"
#include "displayconnectiondispatch.hxx"
+#include <mutex>
#include <vector>
#include <unordered_map>
#include <boost/functional/hash.hpp>
@@ -369,7 +370,8 @@ struct ImplSchedulerContext
SalTimer* mpSalTimer = nullptr; ///< interface to sal event loop / system timer
sal_uInt64 mnTimerStart = 0; ///< start time of the timer
sal_uInt64 mnTimerPeriod = SAL_MAX_UINT64; ///< current timer period
- SchedulerMutex maMutex; ///< lock counting mutex for scheduler locking
+ std::mutex maMutex; ///< the "scheduler mutex" (see
+ ///< vcl/README.scheduler)
bool mbActive = true; ///< is the scheduler active?
};