From 2d6470936ca06310b213117159fa0010259708cd Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Fri, 16 Nov 2012 10:27:47 -0600 Subject: sim: have a curTick per eventq This patch adds a _curTick variable to an eventq. This variable is updated whenever an event is serviced in function serviceOne(), or all events upto a particular time are processed in function serviceEvents(). This change helps when there are eventqs that do not make use of curTick for scheduling events. --- src/sim/simulate.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/sim/simulate.cc') diff --git a/src/sim/simulate.cc b/src/sim/simulate.cc index 238e68787..6962fab9f 100644 --- a/src/sim/simulate.cc +++ b/src/sim/simulate.cc @@ -33,7 +33,7 @@ #include "base/pollevent.hh" #include "base/types.hh" #include "sim/async.hh" -#include "sim/eventq.hh" +#include "sim/eventq_impl.hh" #include "sim/sim_events.hh" #include "sim/sim_exit.hh" #include "sim/simulate.hh" @@ -65,9 +65,6 @@ simulate(Tick num_cycles) assert(curTick() <= mainEventQueue.nextTick() && "event scheduled in the past"); - // forward current cycle to the time of the first event on the - // queue - curTick(mainEventQueue.nextTick()); Event *exit_event = mainEventQueue.serviceOne(); if (exit_event != NULL) { // hit some kind of exit event; return to Python -- cgit v1.2.3