From b81a977e6ab7dbfd122cb778cfe3d40ca7451198 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 2 Nov 2012 11:32:01 -0500 Subject: sim: Move the draining interface into a separate base class This patch moves the draining interface from SimObject to a separate class that can be used by any object needing draining. However, objects not visible to the Python code (i.e., objects not deriving from SimObject) still depend on their parents informing them when to drain. This patch also gets rid of the CountedDrainEvent (which isn't really an event) and replaces it with a DrainManager. --- src/sim/system.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sim/system.hh') diff --git a/src/sim/system.hh b/src/sim/system.hh index 645ef8af2..d1b79bbf4 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -382,7 +382,9 @@ class System : public MemObject void serialize(std::ostream &os); void unserialize(Checkpoint *cp, const std::string §ion); - virtual void resume(); + + unsigned int drain(DrainManager *dm); + void drainResume(); public: Counter totalNumInsts; -- cgit v1.2.3