Kaydet (Commit) c00d8271 authored tarafından Michael Meeks's avatar Michael Meeks

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/30024Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 0f5d4da2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment