diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2012-11-16 10:27:47 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2012-11-16 10:27:47 -0600 |
commit | 2d6470936ca06310b213117159fa0010259708cd (patch) | |
tree | 24fc62d3c1b27711fecadffacc722bbae45c3df9 /src/sim/core.hh | |
parent | 2680c827bee835175d780b82b93590e2b3467591 (diff) | |
download | gem5-2d6470936ca06310b213117159fa0010259708cd.tar.xz |
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.
Diffstat (limited to 'src/sim/core.hh')
-rw-r--r-- | src/sim/core.hh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sim/core.hh b/src/sim/core.hh index 4f842ab48..b5a082bcb 100644 --- a/src/sim/core.hh +++ b/src/sim/core.hh @@ -39,12 +39,10 @@ #include <string> #include "base/types.hh" +#include "sim/eventq.hh" /// The universal simulation clock. -extern Tick _curTick; - -inline Tick curTick() { return _curTick; } -inline void curTick(Tick newVal) { _curTick = newVal; } +inline Tick curTick() { return mainEventQueue.getCurTick(); } const Tick retryTime = 1000; |