changeset 94901e131a7f in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=94901e131a7f
description:
        cpu: Idle CPU status logic revised

        This patch sets the CPU status to idle when the last active thread gets
        suspended.

diffstat:

 src/cpu/o3/cpu.cc |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 3d17366c0423 -r 94901e131a7f src/cpu/o3/cpu.cc
--- a/src/cpu/o3/cpu.cc Thu Feb 05 16:45:12 2015 -0800
+++ b/src/cpu/o3/cpu.cc Fri Feb 06 18:01:22 2015 -0800
@@ -746,12 +746,13 @@
     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>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to