summaryrefslogtreecommitdiff
path: root/src/cpu/simple
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2006-10-23 18:46:05 -0400
committerLisa Hsu <hsul@eecs.umich.edu>2006-10-23 18:46:05 -0400
commit764f27a0c9a6ba6008f60757769b52f5eee46ec1 (patch)
tree9e9309da58a0a403a673d353a354308b49a3a7ea /src/cpu/simple
parentef8b7713ca1b6120ae4e851877f2a9ce71296219 (diff)
parent4da3938ed99e3691cfb16c275eea659cbaaa6c30 (diff)
downloadgem5-764f27a0c9a6ba6008f60757769b52f5eee46ec1.tar.xz
Merge zizzer:/bk/newmem
into zed.eecs.umich.edu:/z/hsul/work/m5/newmem --HG-- extra : convert_revision : bb58679e101570d50c040519fb08ffbabfee7416
Diffstat (limited to 'src/cpu/simple')
-rw-r--r--src/cpu/simple/atomic.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index 25c478ae9..edba55b0d 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -183,11 +183,14 @@ AtomicSimpleCPU::unserialize(Checkpoint *cp, const string &section)
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);
+ }
}
}