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
commitd60c293bbc9125eb939a08831b86a3f38920cdd4 (patch)
tree06291cb8c39407adb71d30e29008649de443e124 /src/cpu/inorder/cpu.hh
parent214cc0fafce09dbee6aedafa5e1148476cc6463f (diff)
downloadgem5-d60c293bbc9125eb939a08831b86a3f38920cdd4.tar.xz
inorder: replace schedEvent() code with reschedule().
There were several copies of similar functions that looked like they all replicated reschedule(), so I replaced them with direct calls. Keeping this separate from the previous cset since there may be some subtle functional differences if the code ever reschedules an event that is scheduled but not squashed (though none were detected in the regressions).
Diffstat (limited to 'src/cpu/inorder/cpu.hh')
-rw-r--r--src/cpu/inorder/cpu.hh8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh
index 42bae0d31..38978dbd7 100644
--- a/src/cpu/inorder/cpu.hh
+++ b/src/cpu/inorder/cpu.hh
@@ -156,12 +156,8 @@ 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())
- reschedule(&tickEvent, when);
- else if (!tickEvent.scheduled())
- schedule(&tickEvent, when);
+ assert(!tickEvent.scheduled() || tickEvent.squashed());
+ reschedule(&tickEvent, nextCycle(curTick + ticks(delay)), true);
}
/** Unschedule tick event, regardless of its current state. */