diff options
author | Gabe Black <gabeblack@google.com> | 2018-08-22 23:51:16 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-09-26 00:00:30 +0000 |
commit | 33341f42eb12d17dc2b9e4ed65dd9351a3947e27 (patch) | |
tree | cd649a95fa6cc36a2ec60d07af1fd9808c0d5c50 /src/systemc/core/scheduler.cc | |
parent | dd8b71b413fb511477358b65c7668e6e2574257e (diff) | |
download | gem5-33341f42eb12d17dc2b9e4ed65dd9351a3947e27.tar.xz |
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 <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/scheduler.cc')
-rw-r--r-- | src/systemc/core/scheduler.cc | 24 |
1 files changed, 12 insertions, 12 deletions
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; |