cpu: Fix drain issues in the Minor CPU

The drain refactor patches introduced a couple of bugs in the way
Minor handles draining. This patch fixes an incorrect assert and a
case of infinite recursion when the CPU signals drain done.
This commit is contained in:
Andreas Sandberg 2015-07-30 10:15:50 +01:00
parent d8f732273e
commit 473a0dcc63

View file

@ -213,14 +213,12 @@ void
MinorCPU::signalDrainDone()
{
DPRINTF(Drain, "MinorCPU drain done\n");
signalDrainDone();
Drainable::signalDrainDone();
}
void
MinorCPU::drainResume()
{
assert(drainState() == DrainState::Drained);
if (switchedOut()) {
DPRINTF(Drain, "drainResume while switched out. Ignoring\n");
return;