cpu: Idle CPU status logic revised

This patch sets the CPU status to idle when the last active thread gets
suspended.
This commit is contained in:
Alexandru Dutu 2015-02-06 18:01:22 -08:00
parent 774922895b
commit ad1b177550

View file

@ -746,12 +746,13 @@ FullO3CPU<Impl>::suspendContext(ThreadID tid)
deactivateThread(tid);
// If this was the last thread then unschedule the tick event.
if (activeThreads.size() == 0)
if (activeThreads.size() == 0) {
unscheduleTickEvent();
lastRunningCycle = curCycle();
_status = Idle;
}
DPRINTF(Quiesce, "Suspending Context\n");
lastRunningCycle = curCycle();
_status = Idle;
}
template <class Impl>