summaryrefslogtreecommitdiff
path: root/src/sim/sim_object.cc
diff options
context:
space:
mode:
authorAndreas Sandberg <Andreas.Sandberg@arm.com>2012-11-02 11:32:01 -0500
committerAndreas Sandberg <Andreas.Sandberg@arm.com>2012-11-02 11:32:01 -0500
commitb81a977e6ab7dbfd122cb778cfe3d40ca7451198 (patch)
tree09804c27367de8cf93623ec4644bf47abf316bf9 /src/sim/sim_object.cc
parenteb703a4b4e167e4d45f92203a1e0849f19cdba6d (diff)
downloadgem5-b81a977e6ab7dbfd122cb778cfe3d40ca7451198.tar.xz
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.
Diffstat (limited to 'src/sim/sim_object.cc')
-rw-r--r--src/sim/sim_object.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc
index 32e936ff2..345fb85cb 100644
--- a/src/sim/sim_object.cc
+++ b/src/sim/sim_object.cc
@@ -67,7 +67,6 @@ SimObject::SimObject(const Params *p)
#endif
simObjectList.push_back(this);
- state = Running;
}
void
@@ -151,17 +150,12 @@ debugObjectBreak(const char *objs)
#endif
unsigned int
-SimObject::drain(Event *drain_event)
+SimObject::drain(DrainManager *drain_manager)
{
- state = Drained;
+ setDrainState(Drained);
return 0;
}
-void
-SimObject::resume()
-{
- state = Running;
-}
SimObject *
SimObject::find(const char *name)