Deleted Added
sdiff udiff text old ( 5605:b194a80157e2 ) new ( 5695:82f3a613cc58 )
full compact
1/*
2 * Copyright (c) 2000-2005 The Regents of The University of Michigan
3 * Copyright (c) 2008 The Hewlett-Packard Development Company
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 195 unchanged lines hidden (view full) ---

204 SERIALIZE_SCALAR(_when);
205 SERIALIZE_SCALAR(_priority);
206 SERIALIZE_ENUM(_flags);
207}
208
209void
210Event::unserialize(Checkpoint *cp, const string &section)
211{
212 assert(!scheduled() && "we used to deschedule these events");
213
214 UNSERIALIZE_SCALAR(_when);
215 UNSERIALIZE_SCALAR(_priority);
216
217 // need to see if original event was in a scheduled, unsquashed
218 // state, but don't want to restore those flags in the current
219 // object itself (since they aren't immediately true)
220 UNSERIALIZE_ENUM(_flags);
221 bool wasScheduled = (_flags & Scheduled) && !(_flags & Squashed);
222 _flags &= ~(Squashed | Scheduled);
223
224 if (wasScheduled) {
225 DPRINTF(Config, "rescheduling at %d\n", _when);
226 panic("need to figure out how to unserialize scheduled events");
227 //schedule(_when);
228 }
229}
230
231void
232EventQueue::serialize(ostream &os)
233{
234 std::list<Event *> eventPtrs;
235

--- 154 unchanged lines hidden ---