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.cc | |
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.cc')
-rw-r--r-- | src/cpu/inorder/cpu.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index 5f723d0b3..bb324ce64 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -157,12 +157,12 @@ InOrderCPU::CPUEvent::description() void InOrderCPU::CPUEvent::scheduleEvent(int delay) { + Tick when = cpu->nextCycle(curTick + cpu->ticks(delay)); + if (squashed()) - mainEventQueue.reschedule(this, cpu->nextCycle(curTick + - cpu->ticks(delay))); + cpu->reschedule(this, when); else if (!scheduled()) - mainEventQueue.schedule(this, cpu->nextCycle(curTick + - cpu->ticks(delay))); + cpu->schedule(this, when); } void @@ -540,7 +540,7 @@ InOrderCPU::tick() } else { //Tick next_tick = curTick + cycles(1); //tickEvent.schedule(next_tick); - mainEventQueue.schedule(&tickEvent, nextCycle(curTick + 1)); + schedule(&tickEvent, nextCycle(curTick + 1)); DPRINTF(InOrderCPU, "Scheduled CPU for next tick @ %i.\n", nextCycle(curTick + 1)); } @@ -701,7 +701,7 @@ InOrderCPU::scheduleCpuEvent(CPUEventType c_event, Fault fault, if (delay >= 0) { DPRINTF(InOrderCPU, "Scheduling CPU Event (%s) for cycle %i, [tid:%i].\n", eventNames[c_event], curTick + delay, tid); - mainEventQueue.schedule(cpu_event, sked_tick); + schedule(cpu_event, sked_tick); } else { cpu_event->process(); cpuEventRemoveList.push(cpu_event); @@ -1403,7 +1403,7 @@ InOrderCPU::wakeCPU() numCycles += extra_cycles; - mainEventQueue.schedule(&tickEvent, nextCycle(curTick)); + schedule(&tickEvent, nextCycle(curTick)); } #if FULL_SYSTEM |