Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
jedule: obey our coding standards
[simgrid.git] / src / plugins / host_energy.cpp
index 42c9f8e..a6fce05 100644 (file)
@@ -381,7 +381,7 @@ static void onCreation(simgrid::s4u::Host& host)
   host.extension_set(new HostEnergy(&host));
 }
 
-static void onActionStateChange(simgrid::surf::CpuAction* action, simgrid::kernel::resource::Action::State previous)
+static void onActionStateChange(simgrid::surf::CpuAction* action)
 {
   for (simgrid::surf::Cpu* const& cpu : action->cpus()) {
     simgrid::s4u::Host* host = cpu->get_host();
@@ -390,7 +390,7 @@ static void onActionStateChange(simgrid::surf::CpuAction* action, simgrid::kerne
       // If it's a VM, take the corresponding PM
       simgrid::s4u::VirtualMachine* vm = dynamic_cast<simgrid::s4u::VirtualMachine*>(host);
       if (vm) // If it's a VM, take the corresponding PM
-        host = vm->getPm();
+        host = vm->get_pm();
 
       // Get the host_energy extension for the relevant host
       HostEnergy* host_energy = host->extension<HostEnergy>();
@@ -462,7 +462,7 @@ void sg_host_energy_plugin_init()
   simgrid::s4u::Host::on_speed_change.connect(&onHostChange);
   simgrid::s4u::Host::on_destruction.connect(&onHostDestruction);
   simgrid::s4u::on_simulation_end.connect(&onSimulationEnd);
-  simgrid::surf::CpuAction::onStateChange.connect(&onActionStateChange);
+  simgrid::surf::CpuAction::on_state_change.connect(&onActionStateChange);
 }
 
 /** @ingroup plugin_energy