Change the return value of drain. False means the object wasn't able to drain yet.
authorKevin Lim <ktlim@umich.edu>
Thu, 6 Jul 2006 17:57:21 +0000 (13:57 -0400)
committerKevin Lim <ktlim@umich.edu>
Thu, 6 Jul 2006 17:57:21 +0000 (13:57 -0400)
src/python/m5/config.py:
    Invert the return value.
src/sim/sim_object.cc:
    Invert the return value of drain.
src/sim/sim_object.hh:
    Change the return value of drain.

--HG--
extra : convert_revision : 41bb122c6f29302d8b3815d7bd6a2ea8fba64df9

src/python/m5/config.py
src/sim/sim_object.cc
src/sim/sim_object.hh

index cffe06984858afc7d916a6177e25777e2cf0253a..8291e1e1bd91b6a005ec3328887edad0aed5b727 100644 (file)
@@ -547,7 +547,7 @@ class SimObject(object):
         count = 0
         # ParamContexts don't serialize
         if isinstance(self, SimObject) and not isinstance(self, ParamContext):
-            if self._ccObject.drain(drain_event):
+            if not self._ccObject.drain(drain_event):
                 count = 1
         if recursive:
             for child in self._children.itervalues():
index 655bdcf4ec5f7cd39ea1f014ec0412556f6e5886..a0278dba0f5af5a19ea67c3dd44489982b2a93e0 100644 (file)
@@ -277,7 +277,7 @@ SimObject::drain(Event *drain_event)
               "in timing mode!");
     }
     state = DrainedAtomic;
-    return false;
+    return true;
 }
 
 void
index 4833192d69a80beb2ba17360847c4f5d87ed8059..7ecc0095884479923ee57177de54a9ec25bc53f8 100644 (file)
@@ -116,7 +116,7 @@ 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.
+    // Drain returns false if the SimObject cannot drain immediately.
     virtual bool drain(Event *drain_event);
     virtual void resume();
     virtual void setMemoryMode(State new_mode);