diff options
Diffstat (limited to 'src/sim/cxx_manager.cc')
-rw-r--r-- | src/sim/cxx_manager.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/sim/cxx_manager.cc b/src/sim/cxx_manager.cc index 6d4565dbc..e0b209aa4 100644 --- a/src/sim/cxx_manager.cc +++ b/src/sim/cxx_manager.cc @@ -644,20 +644,15 @@ CxxConfigManager::startup() } unsigned int -CxxConfigManager::drain(DrainManager *drain_manager) +CxxConfigManager::drain() { - unsigned int ret = 0; - - for (auto i = objectsInOrder.begin(); i != objectsInOrder.end(); ++ i) - ret += (*i)->drain(drain_manager); - - return ret; + return DrainManager::instance().tryDrain() ? 0 : 1; } void CxxConfigManager::drainResume() { - forEachObject(&SimObject::drainResume); + DrainManager::instance().resume(); } void |