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:
parent
774922895b
commit
ad1b177550
1 changed files with 4 additions and 3 deletions
|
@ -746,12 +746,13 @@ FullO3CPU<Impl>::suspendContext(ThreadID tid)
|
||||||
deactivateThread(tid);
|
deactivateThread(tid);
|
||||||
|
|
||||||
// If this was the last thread then unschedule the tick event.
|
// If this was the last thread then unschedule the tick event.
|
||||||
if (activeThreads.size() == 0)
|
if (activeThreads.size() == 0) {
|
||||||
unscheduleTickEvent();
|
unscheduleTickEvent();
|
||||||
|
|
||||||
DPRINTF(Quiesce, "Suspending Context\n");
|
|
||||||
lastRunningCycle = curCycle();
|
lastRunningCycle = curCycle();
|
||||||
_status = Idle;
|
_status = Idle;
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINTF(Quiesce, "Suspending Context\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
|
|
Loading…
Reference in a new issue