summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/cpu.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2011-01-07 21:50:29 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2011-01-07 21:50:29 -0800
commit214cc0fafce09dbee6aedafa5e1148476cc6463f (patch)
tree250a3cdd7414ee507cc2e5389329349046d3c76f /src/cpu/inorder/cpu.hh
parentd650f4138eaa68c856d0879e39a78f66d205b017 (diff)
downloadgem5-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.hh8
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. */