715d714
< drainEvent = drain_event;
720a720,724
> // A bit of a hack...set the drainEvent after all the drain()
> // calls have been made, that way if all of the stages drain
> // immediately, the signalDrained() function knows not to call
> // process on the drain event.
> drainEvent = drain_event;
723,725c727,730
< // the CPU is currently idle.
< wakeCPU();
< activityRec.activity();
---
> // the CPU was not able to immediately drain.
> if (_status != Drained) {
> wakeCPU();
> activityRec.activity();
727c732,735
< return false;
---
> return false;
> } else {
> return true;
> }
753a762
>
755c764,768
< drainEvent->process();
---
>
> if (drainEvent) {
> drainEvent->process();
> drainEvent = NULL;
> }