diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-09-05 17:12:41 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-09-05 17:12:41 -0400 |
commit | bf7c01d43d2a9e415ed3cc6cf310e76109ce6844 (patch) | |
tree | d78f048afeadc24e6fb7d51445851a12a2a4471b /src | |
parent | dd6a21190e33f6d09ee6ff5ed045f92000c5e801 (diff) | |
download | gem5-bf7c01d43d2a9e415ed3cc6cf310e76109ce6844.tar.xz |
Bus: Fix drain code; old method could return 1 in atomic mode and never call de->process().
--HG--
extra : convert_revision : 35990e5eaf93f7a95a0ec72e9f92034a042def3e
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/bus.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc index cc3504e83..6e790e438 100644 --- a/src/mem/bus.cc +++ b/src/mem/bus.cc @@ -613,12 +613,11 @@ Bus::drain(Event * de) //We should check that we're not "doing" anything, and that noone is //waiting. We might be idle but have someone waiting if the device we //contacted for a retry didn't actually retry. - if (curTick >= tickNextIdle && retryList.size() == 0) { - return 0; - } else { + if (retryList.size() || (curTick < tickNextIdle && busIdle.scheduled())) { drainEvent = de; return 1; } + return 0; } void |