From: Lisa Hsu Date: Mon, 23 Oct 2006 22:43:56 +0000 (-0400) Subject: make this parallel to the other cpu types so that resume works correctly. X-Git-Tag: m5_2.0_beta2~71^2~5^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a2387f38c6887f688144a18e0d7ff50e80bd04c;p=gem5.git make this parallel to the other cpu types so that resume works correctly. --HG-- extra : convert_revision : 3c165af27ea0e6c7f2a17819c1717d8900f54cc1 --- diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index fe421ae6c..87ecafd69 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -182,11 +182,14 @@ AtomicSimpleCPU::unserialize(Checkpoint *cp, const string §ion) void AtomicSimpleCPU::resume() { - changeState(SimObject::Running); - if (thread->status() == ThreadContext::Active) { + if (_status != SwitchedOut && _status != Idle) { assert(system->getMemoryMode() == System::Atomic); - if (!tickEvent.scheduled()) - tickEvent.schedule(curTick); + + changeState(SimObject::Running); + if (thread->status() == ThreadContext::Active) { + if (!tickEvent.scheduled()) + tickEvent.schedule(curTick); + } } }