From: Alexandru Dutu Date: Sat, 7 Feb 2015 02:01:22 +0000 (-0800) Subject: cpu: Idle CPU status logic revised X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad1b17755012c928acf91c95dc1dab4eeba8ff9d;p=gem5.git cpu: Idle CPU status logic revised This patch sets the CPU status to idle when the last active thread gets suspended. --- diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 55ef04ffc..b48c66c37 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -746,12 +746,13 @@ FullO3CPU::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