add in serialization of AtomicSimpleCPU _status. This is needed because right now...
authorLisa Hsu <hsul@eecs.umich.edu>
Mon, 9 Oct 2006 03:16:40 +0000 (23:16 -0400)
committerLisa Hsu <hsul@eecs.umich.edu>
Mon, 9 Oct 2006 03:16:40 +0000 (23:16 -0400)
src/cpu/simple/atomic.cc:
    add in serialization of AtomicSimpleCPU _status.  Kev says that this will break uniform serialization across CPUs since each type of CPU has its own "status" enum set.  So, the repercussions are that if you serialize in this CPU, you must first unserialize in this CPU before switching to something else you want.

--HG--
extra : convert_revision : 7000f660aecea6fef712bf81853d9a7b90d625ee

src/cpu/simple/atomic.cc

index 42b0e9783d00c5606faa347ec14ba507cdf75a95..b0356b2bfe2218acda67053361572f31fe9a0c58 100644 (file)
@@ -161,6 +161,8 @@ AtomicSimpleCPU::serialize(ostream &os)
 {
     SimObject::State so_state = SimObject::getState();
     SERIALIZE_ENUM(so_state);
+    Status _status = status();
+    SERIALIZE_ENUM(_status);
     BaseSimpleCPU::serialize(os);
     nameOut(os, csprintf("%s.tickEvent", name()));
     tickEvent.serialize(os);
@@ -171,6 +173,7 @@ AtomicSimpleCPU::unserialize(Checkpoint *cp, const string &section)
 {
     SimObject::State so_state;
     UNSERIALIZE_ENUM(so_state);
+    UNSERIALIZE_ENUM(_status);
     BaseSimpleCPU::unserialize(cp, section);
     tickEvent.unserialize(cp, csprintf("%s.tickEvent", section));
 }