From: Frederic Suter Date: Mon, 7 Aug 2017 19:30:04 +0000 (+0200) Subject: Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid X-Git-Tag: v3_17~232 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/055cc7ebc4ef9ad41d6b9fd84ee8bc8616f19a7a?hp=924261f15221f6725f1ec90542479c032c55b06b Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid --- diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 955de3a1bc..caf30b7b20 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -210,6 +210,18 @@ void CpuAction::updateRemainingLazy(double now) simgrid::xbt::signal CpuAction::onStateChange; +void CpuAction::suspend(){ + Action::State previous = getState(); + onStateChange(this, previous); + Action::suspend(); +} + +void CpuAction::resume(){ + Action::State previous = getState(); + onStateChange(this, previous); + Action::resume(); +} + void CpuAction::setState(Action::State state){ Action::State previous = getState(); Action::setState(state); diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 920f92f6f0..fc67386f29 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -168,6 +168,9 @@ static simgrid::xbt::signal onShareChange; void updateRemainingLazy(double now) override; std::list cpus(); + + void suspend() override; + void resume() override; }; }