diff options
author | Alexandru Dutu <alexandru.dutu@amd.com> | 2015-02-06 18:01:22 -0800 |
---|---|---|
committer | Alexandru Dutu <alexandru.dutu@amd.com> | 2015-02-06 18:01:22 -0800 |
commit | ad1b17755012c928acf91c95dc1dab4eeba8ff9d (patch) | |
tree | f5ce7d31310fc899bb5ddc8b454b9c25c8752d89 | |
parent | 774922895bc622639d28cf2d0d56dc63fc4eddf5 (diff) | |
download | gem5-ad1b17755012c928acf91c95dc1dab4eeba8ff9d.tar.xz |
cpu: Idle CPU status logic revised
This patch sets the CPU status to idle when the last active thread gets
suspended.
-rw-r--r-- | src/cpu/o3/cpu.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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<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> |