changeset f98fe16f50ee in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=f98fe16f50ee
description:
flags: add comment to avoid future deletions since code appears
redundant.
diffstat:
src/sim/eventq.cc | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r 97c34fea328a -r f98fe16f50ee src/sim/eventq.cc
--- a/src/sim/eventq.cc Tue Jun 08 17:16:36 2010 -0700
+++ b/src/sim/eventq.cc Wed Jun 09 10:47:37 2010 -0700
@@ -233,15 +233,22 @@
UNSERIALIZE_SCALAR(_when);
UNSERIALIZE_SCALAR(_priority);
- // need to see if original event was in a scheduled, unsquashed
- // state, but don't want to restore those flags in the current
- // object itself (since they aren't immediately true)
short _flags;
UNSERIALIZE_SCALAR(_flags);
+
+ // Old checkpoints had no concept of the Initialized flag
+ // so restoring from old checkpoints always fail.
+ // Events are initialized on construction but original code
+ // "flags = _flags" would just overwrite the initialization.
+ // So, read in the checkpoint flags, but then set the Initialized
+ // flag on top of it in order to avoid failures.
assert(initialized());
flags = _flags;
flags.set(Initialized);
+ // need to see if original event was in a scheduled, unsquashed
+ // state, but don't want to restore those flags in the current
+ // object itself (since they aren't immediately true)
bool wasScheduled = flags.isSet(Scheduled) && !flags.isSet(Squashed);
flags.clear(Squashed | Scheduled);
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev