diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-07-19 17:59:04 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-07-19 17:59:04 -0400 |
commit | 15e5ce96c76a20b9b27e5f7d7ed29e962422ad1a (patch) | |
tree | 610a888b2de5d25c166f65819d8ad3058d13723c /src/sim/sim_object.hh | |
parent | b36796914af8bfc6729cc8a519e57572460e43e8 (diff) | |
parent | 6175f712b3216f3e5387b07d9c41c1931c09acd9 (diff) | |
download | gem5-15e5ce96c76a20b9b27e5f7d7ed29e962422ad1a.tar.xz |
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem.head
--HG--
extra : convert_revision : 8c747208d72ffbb0160a2ad4a75383420debdf83
Diffstat (limited to 'src/sim/sim_object.hh')
-rw-r--r-- | src/sim/sim_object.hh | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh index e0b21782f..38f2bdd23 100644 --- a/src/sim/sim_object.hh +++ b/src/sim/sim_object.hh @@ -60,16 +60,15 @@ class SimObject : public Serializable, protected StartupCallback }; enum State { - Atomic, - Timing, - Quiescing, - QuiescedAtomic, - QuiescedTiming + Running, + Draining, + Drained }; + private: + State state; protected: Params *_params; - State state; void changeState(State new_state) { state = new_state; } @@ -116,8 +115,10 @@ class SimObject : public Serializable, protected StartupCallback // Methods to drain objects in order to take checkpoints // Or switch from timing -> atomic memory model - // Quiesce returns true if the SimObject cannot quiesce immediately. - virtual bool quiesce(Event *quiesce_event); + // Drain returns 0 if the simobject can drain immediately or + // the number of times the drain_event's process function will be called + // before the object will be done draining. Normally this should be 1 + virtual unsigned int drain(Event *drain_event); virtual void resume(); virtual void setMemoryMode(State new_mode); virtual void switchOut(); |