Bus: Fix drain code; old method could return 1 in atomic mode and never call de->process().

--HG--
extra : convert_revision : 35990e5eaf93f7a95a0ec72e9f92034a042def3e
This commit is contained in:
Ali Saidi 2007-09-05 17:12:41 -04:00
parent dd6a21190e
commit bf7c01d43d

View file

@ -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