Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Aug 2017 19:30:04 +0000 (21:30 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 7 Aug 2017 19:30:04 +0000 (21:30 +0200)
src/surf/cpu_interface.cpp
src/surf/cpu_interface.hpp

index 955de3a..caf30b7 100644 (file)
@@ -210,6 +210,18 @@ void CpuAction::updateRemainingLazy(double now)
 
 simgrid::xbt::signal<void(simgrid::surf::CpuAction*, Action::State)> 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);
index 920f92f..fc67386 100644 (file)
@@ -168,6 +168,9 @@ static simgrid::xbt::signal<void(simgrid::surf::CpuAction*)> onShareChange;
 
   void updateRemainingLazy(double now) override;
   std::list<Cpu*> cpus();
+  
+  void suspend() override;
+  void resume() override;
 };
 
 }