[Libreoffice-commits] core.git: vcl/source
Michael Meeks
michael.meeks at collabora.com
Wed Oct 19 10:58:36 UTC 2016
vcl/source/app/scheduler.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit c00d8271ba443c4f0acf657c226eea4824597f95
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Oct 18 21:38:34 2016 +0100
vcl: assert solar mutex is held for various timer / scheduler ops.
Bringing paranoia to some source-code near you.
Change-Id: I92bc1e17480405a6388c2cbd1c7b559728539f67
Reviewed-on: https://gerrit.libreoffice.org/30024
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 4dcbc4d..4caa4d2 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -31,6 +31,8 @@ void InitSystemTimer(ImplSVData* pSVData);
void ImplSchedulerData::Invoke()
{
+ DBG_TESTSOLARMUTEX();
+
if (mbDelete || mbInScheduler )
return;
@@ -127,6 +129,9 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce)
// ImplSalStopTimer() on WNT the timer queue is restarted and never ends
return;
}
+
+ DBG_TESTSOLARMUTEX();
+
InitSystemTimer(pSVData);
if ( !nMS )
@@ -169,6 +174,8 @@ bool Scheduler::ProcessTaskScheduling( bool bTimerOnly )
{
ImplSchedulerData* pSchedulerData;
+ DBG_TESTSOLARMUTEX();
+
if ((pSchedulerData = ImplSchedulerData::GetMostImportantTask(bTimerOnly)))
{
SAL_INFO("vcl.schedule", "Invoke task " << pSchedulerData->GetDebugName());
@@ -203,6 +210,8 @@ sal_uInt64 Scheduler::CalculateMinimumTimeout( bool &bHasActiveIdles )
sal_uInt64 nTime = tools::Time::GetSystemTicks();
sal_uInt64 nMinPeriod = MaximumTimeoutMs;
+ DBG_TESTSOLARMUTEX();
+
SAL_INFO("vcl.schedule", "Calculating minimum timeout:");
pSchedulerData = pSVData->mpFirstSchedulerData;
while ( pSchedulerData )
@@ -275,6 +284,8 @@ void Scheduler::Start()
return;
}
+ DBG_TESTSOLARMUTEX();
+
// Mark timer active
mbActive = true;
More information about the Libreoffice-commits
mailing list