Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename sg::k::actor::simcall ::actor::simcall_answered
[simgrid.git] / src / plugins / host_energy.cpp
index 4fbb275..ef191bf 100644 (file)
@@ -333,7 +333,7 @@ double HostEnergy::get_current_watts_value(double cpu_load) const
 double HostEnergy::get_consumed_energy()
 {
   if (last_updated_ < simgrid::s4u::Engine::get_clock()) // We need to simcall this as it modifies the environment
-    simgrid::kernel::actor::simcall(std::bind(&HostEnergy::update, this));
+    simgrid::kernel::actor::simcall_answered(std::bind(&HostEnergy::update, this));
 
   return total_energy_;
 }
@@ -509,7 +509,7 @@ void sg_host_energy_plugin_init()
  */
 void sg_host_energy_update_all()
 {
-  simgrid::kernel::actor::simcall([]() {
+  simgrid::kernel::actor::simcall_answered([]() {
     std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::get_instance()->get_all_hosts();
     for (auto const& host : list)
       if (dynamic_cast<simgrid::s4u::VirtualMachine*>(host) == nullptr) { // Ignore virtual machines