sim: clean up CountedDrainEvent slightly.
authorSteve Reinhardt <steve.reinhardt@amd.com>
Sat, 8 Jan 2011 05:50:29 +0000 (21:50 -0800)
committerSteve Reinhardt <steve.reinhardt@amd.com>
Sat, 8 Jan 2011 05:50:29 +0000 (21:50 -0800)
There's no reason for it to derive from SimLoopExitEvent.
This whole drain thing needs to be redone eventually,
but this is a stopgap to make later changes to
SimLoopExitEvent feasible.

src/sim/sim_events.cc
src/sim/sim_events.hh

index d53fca3c3969dc84fffd9c6fbbce08881ae0a5b6..6d743cac6b7ba6eeed7e5822eb4d0cc992e5199c 100644 (file)
@@ -85,14 +85,14 @@ exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat)
 }
 
 CountedDrainEvent::CountedDrainEvent()
-    : SimLoopExitEvent("Finished drain", 0), count(0)
+    : count(0)
 { }
 
 void
 CountedDrainEvent::process()
 {
     if (--count == 0)
-        exitSimLoop(cause, code);
+        exitSimLoop("Finished drain", 0);
 }
 
 //
index 17e2cc20297115cfb96373086f612187d36e2a76..6ea361a05278007ca80efba51639f0590ee6b64a 100644 (file)
@@ -55,7 +55,7 @@ class SimLoopExitEvent : public Event
     virtual const char *description() const;
 };
 
-class CountedDrainEvent : public SimLoopExitEvent
+class CountedDrainEvent : public Event
 {
   private:
     // Count of how many objects have not yet drained