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 | d60c293bbc9125eb939a08831b86a3f38920cdd4 (patch) | |
tree | 06291cb8c39407adb71d30e29008649de443e124 /src/cpu/inorder/resource.cc | |
parent | 214cc0fafce09dbee6aedafa5e1148476cc6463f (diff) | |
download | gem5-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/resource.cc')
-rw-r--r-- | src/cpu/inorder/resource.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc index 4eab89687..0d8dbb3e4 100644 --- a/src/cpu/inorder/resource.cc +++ b/src/cpu/inorder/resource.cc @@ -502,11 +502,7 @@ ResourceEvent::description() void ResourceEvent::scheduleEvent(int delay) { - InOrderCPU *cpu = resource->cpu; - Tick when = curTick + resource->ticks(delay); - - if (squashed()) - cpu->reschedule(this, when); - else if (!scheduled()) - cpu->schedule(this, when); + assert(!scheduled() || squashed()); + resource->cpu->reschedule(this, + curTick + resource->ticks(delay), true); } |