From 888ec455cba4174863be5ed9148aaf093a061101 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Tue, 7 Jul 2015 09:51:04 +0100 Subject: sim: Fix broken event unserialization Events expected to be unserialized using an event-specific unserializeEvent call. This call was never actually used, which meant the events relying on it never got unserialized (or scheduled after unserialization). Instead of relying on a custom call, we now use the normal serialization code again. In order to schedule the event correctly, the parrent object is expected to use the EventQueue::checkpointReschedule() call. This happens automatically for events that are serialized using the AutoSerialize mechanism. --- src/dev/etherlink.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/dev/etherlink.cc') diff --git a/src/dev/etherlink.cc b/src/dev/etherlink.cc index 27179d508..7b24fe9f7 100644 --- a/src/dev/etherlink.cc +++ b/src/dev/etherlink.cc @@ -142,9 +142,7 @@ class LinkDelayEvent : public Event void process(); void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE; - void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE {} - void unserializeEvent(CheckpointIn &cp, - EventQueue *eventq) M5_ATTR_OVERRIDE; + void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE; static Serializable *createForUnserialize(CheckpointIn &cp, const string §ion); }; @@ -260,9 +258,9 @@ LinkDelayEvent::serialize(CheckpointOut &cp) const void -LinkDelayEvent::unserializeEvent(CheckpointIn &cp, EventQueue *eventq) +LinkDelayEvent::unserialize(CheckpointIn &cp) { - Event::unserializeEvent(cp, eventq); + Event::unserialize(cp); EtherLink *parent; bool number; -- cgit v1.2.3