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,14 +746,15 @@ 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();
|
||||
|
||||
DPRINTF(Quiesce, "Suspending Context\n");
|
||||
lastRunningCycle = curCycle();
|
||||
_status = Idle;
|
||||
}
|
||||
|
||||
DPRINTF(Quiesce, "Suspending Context\n");
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
FullO3CPU<Impl>::haltContext(ThreadID tid)
|
||||
|
|
Loading…
Reference in a new issue