diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2011-01-07 21:50:29 -0800 |
commit | 214cc0fafce09dbee6aedafa5e1148476cc6463f (patch) | |
tree | 250a3cdd7414ee507cc2e5389329349046d3c76f /src/cpu/inorder/cpu.hh | |
parent | d650f4138eaa68c856d0879e39a78f66d205b017 (diff) | |
download | gem5-214cc0fafce09dbee6aedafa5e1148476cc6463f.tar.xz |
inorder: get rid of references to mainEventQueue.
Events need to be scheduled on the queue assigned
to the SimObject, not on the global queue (which
should be going away).
Also cleaned up a number of redundant expressions
that made the code unnecessarily verbose.
Diffstat (limited to 'src/cpu/inorder/cpu.hh')
-rw-r--r-- | src/cpu/inorder/cpu.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index 3b2041cfa..42bae0d31 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -156,12 +156,12 @@ class InOrderCPU : public BaseCPU /** Schedule tick event, regardless of its current state. */ void scheduleTickEvent(int delay) { + Tick when = nextCycle(curTick + ticks(delay)); + if (tickEvent.squashed()) - mainEventQueue.reschedule(&tickEvent, - nextCycle(curTick + ticks(delay))); + reschedule(&tickEvent, when); else if (!tickEvent.scheduled()) - mainEventQueue.schedule(&tickEvent, - nextCycle(curTick + ticks(delay))); + schedule(&tickEvent, when); } /** Unschedule tick event, regardless of its current state. */ |