From: Gabe Black Date: Thu, 23 Aug 2018 06:51:16 +0000 (-0700) Subject: systemc: Use the eq pointer directly less often in the scheduler. X-Git-Tag: v19.0.0.0~1731 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=33341f42eb12d17dc2b9e4ed65dd9351a3947e27;p=gem5.git systemc: Use the eq pointer directly less often in the scheduler. This takes advantage of the utility functions that exist a little better, and also avoids accidentally asymetrically using eventsToSchedule and eq->(de)schedule. Change-Id: I1eb1c228d47684cccb9deaf6f3409b77cfbad4cd Reviewed-on: https://gem5-review.googlesource.com/12260 Reviewed-by: Gabe Black Maintainer: Gabe Black --- diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc index 58c79562f..2dc3aa74c 100644 --- a/src/systemc/core/scheduler.cc +++ b/src/systemc/core/scheduler.cc @@ -70,21 +70,21 @@ Scheduler::clear() TimeSlot *&ts = tsp.second; for (auto &e: ts->events) e->deschedule(); - eq->deschedule(ts); + deschedule(ts); } timeSlots.clear(); // gem5 events. if (readyEvent.scheduled()) - eq->deschedule(&readyEvent); + deschedule(&readyEvent); if (pauseEvent.scheduled()) - eq->deschedule(&pauseEvent); + deschedule(&pauseEvent); if (stopEvent.scheduled()) - eq->deschedule(&stopEvent); + deschedule(&stopEvent); if (starvationEvent.scheduled()) - eq->deschedule(&starvationEvent); + deschedule(&starvationEvent); if (maxTickEvent.scheduled()) - eq->deschedule(&maxTickEvent); + deschedule(&maxTickEvent); Process *p; while ((p = toFinalize.getNext())) @@ -312,13 +312,13 @@ Scheduler::start(Tick max_tick, bool run_to_time) Fiber::primaryFiber()->run(); if (pauseEvent.scheduled()) - eq->deschedule(&pauseEvent); + deschedule(&pauseEvent); if (stopEvent.scheduled()) - eq->deschedule(&stopEvent); + deschedule(&stopEvent); if (maxTickEvent.scheduled()) - eq->deschedule(&maxTickEvent); + deschedule(&maxTickEvent); if (starvationEvent.scheduled()) - eq->deschedule(&starvationEvent); + deschedule(&starvationEvent); } void @@ -334,7 +334,7 @@ Scheduler::schedulePause() if (pauseEvent.scheduled()) return; - eq->schedule(&pauseEvent, eq->getCurTick()); + schedule(&pauseEvent); } void @@ -348,7 +348,7 @@ Scheduler::scheduleStop(bool finish_delta) // pending activity. clear(); } - eq->schedule(&stopEvent, eq->getCurTick()); + schedule(&stopEvent); } Scheduler scheduler;