flags: Unserializing old checkpoints before the introduction
authorLisa Hsu <Lisa.Hsu@amd.com>
Wed, 9 Jun 2010 00:16:36 +0000 (17:16 -0700)
committerLisa Hsu <Lisa.Hsu@amd.com>
Wed, 9 Jun 2010 00:16:36 +0000 (17:16 -0700)
of the Initialized flag would break, set Initialized for events upon
unserialization.

src/sim/eventq.cc

index 9b08a45d8f249613c665003f1857285139580902..900a6dd4bd7ee1a0ea6ae45cf0cb65bcb5da495d 100644 (file)
@@ -238,7 +238,9 @@ Event::unserialize(Checkpoint *cp, const string &section)
     // object itself (since they aren't immediately true)
     short _flags;
     UNSERIALIZE_SCALAR(_flags);
+    assert(initialized());
     flags = _flags;
+    flags.set(Initialized);
 
     bool wasScheduled = flags.isSet(Scheduled) && !flags.isSet(Squashed);
     flags.clear(Squashed | Scheduled);