add in serialization of AtomicSimpleCPU _status. This is needed because right now unserializing breaks an assert since CPU status is not saved. 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.

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
This commit is contained in:
Lisa Hsu 2006-10-08 23:16:40 -04:00
parent ce6c752ede
commit d52117d1e3

View 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));
}