sim,cpu: make exit_group halt all threads in a group
[gem5.git] / src / sim / sim_events.hh
index 5be2609fd02449b5bdbd328dcc11abcbf22b5dde..6343071dc53b1d387d129932d0efcdc1baa627a2 100644 (file)
@@ -63,10 +63,10 @@ class GlobalSimLoopExitEvent : public GlobalEvent
     // non-scheduling version for createForUnserialize()
     GlobalSimLoopExitEvent();
     GlobalSimLoopExitEvent(Tick when, const std::string &_cause, int c,
-                           Tick repeat = 0, bool serialize = false);
+                           Tick repeat = 0);
 
     const std::string getCause() const { return cause; }
-    const int getCode() const { return code; }
+    int getCode() const { return code; }
 
     void process();     // process event
 
@@ -83,40 +83,21 @@ class LocalSimLoopExitEvent : public Event
 
   public:
     LocalSimLoopExitEvent();
-    LocalSimLoopExitEvent(const std::string &_cause, int c, Tick repeat = 0,
-                          bool serialize = false);
+    LocalSimLoopExitEvent(const std::string &_cause, int c, Tick repeat = 0);
 
     const std::string getCause() const { return cause; }
-    const int getCode() const { return code; }
+    int getCode() const { return code; }
 
-    void process();     // process event
+    void process() override;     // process event
 
-    virtual const char *description() const;
+    const char *description() const override;
 
-    virtual void serialize(std::ostream &os);
-    virtual void unserialize(Checkpoint *cp, const std::string &section);
-    virtual void unserialize(Checkpoint *cp, const std::string &section,
-                             EventQueue *eventq);
-    static Serializable *createForUnserialize(Checkpoint *cp,
+    void serialize(CheckpointOut &cp) const override;
+    void unserialize(CheckpointIn &cp) override;
+    static Serializable *createForUnserialize(CheckpointIn &cp,
                                               const std::string &section);
 };
 
-class CountedDrainEvent : public Event
-{
-  private:
-    // Count of how many objects have not yet drained
-    int count;
-
-  public:
-    CountedDrainEvent();
-
-    void process();
-
-    void setCount(int _count) { count = _count; }
-
-    const int getCount() const { return count; }
-};
-
 //
 // Event class to terminate simulation after 'n' related events have
 // occurred using a shared counter: used to terminate when *all*
@@ -131,9 +112,9 @@ class CountedExitEvent : public Event
   public:
     CountedExitEvent(const std::string &_cause, int &_downCounter);
 
-    void process();     // process event
+    void process() override;     // process event
 
-    virtual const char *description() const;
+    const char *description() const override;
 };