summaryrefslogtreecommitdiff
path: root/src/sim/sim_events.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/sim_events.cc')
-rw-r--r--src/sim/sim_events.cc30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/sim/sim_events.cc b/src/sim/sim_events.cc
index 94bd06191..cfd08f7ac 100644
--- a/src/sim/sim_events.cc
+++ b/src/sim/sim_events.cc
@@ -55,9 +55,8 @@ using namespace std;
GlobalSimLoopExitEvent::GlobalSimLoopExitEvent(Tick when,
const std::string &_cause,
- int c, Tick r, bool serialize)
- : GlobalEvent(when, Sim_Exit_Pri,
- IsExitEvent | (serialize ? AutoSerialize : 0)),
+ int c, Tick r)
+ : GlobalEvent(when, Sim_Exit_Pri, IsExitEvent),
cause(_cause), code(c), repeat(r)
{
}
@@ -83,19 +82,16 @@ void
exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat,
bool serialize)
{
- new GlobalSimLoopExitEvent(when + simQuantum, message, exit_code, repeat,
- serialize);
-}
+ warn_if(serialize && (when != curTick() || repeat),
+ "exitSimLoop called with a delay and auto serialization. This is "
+ "currently unsupported.");
-LocalSimLoopExitEvent::LocalSimLoopExitEvent()
- : Event(Sim_Exit_Pri, IsExitEvent | AutoSerialize),
- cause(""), code(0), repeat(0)
-{
+ new GlobalSimLoopExitEvent(when + simQuantum, message, exit_code, repeat);
}
LocalSimLoopExitEvent::LocalSimLoopExitEvent(const std::string &_cause, int c,
- Tick r, bool serialize)
- : Event(Sim_Exit_Pri, IsExitEvent | (serialize ? AutoSerialize : 0)),
+ Tick r)
+ : Event(Sim_Exit_Pri, IsExitEvent),
cause(_cause), code(c), repeat(r)
{
}
@@ -119,7 +115,6 @@ LocalSimLoopExitEvent::description() const
void
LocalSimLoopExitEvent::serialize(CheckpointOut &cp) const
{
- paramOut(cp, "type", string("SimLoopExitEvent"));
Event::serialize(cp);
SERIALIZE_SCALAR(cause);
@@ -137,15 +132,6 @@ LocalSimLoopExitEvent::unserialize(CheckpointIn &cp)
UNSERIALIZE_SCALAR(repeat);
}
-Serializable *
-LocalSimLoopExitEvent::createForUnserialize(CheckpointIn &cp,
- const string &section)
-{
- return new LocalSimLoopExitEvent();
-}
-
-REGISTER_SERIALIZEABLE("LocalSimLoopExitEvent", LocalSimLoopExitEvent)
-
//
// constructor: automatically schedules at specified time
//