Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dead code
[simgrid.git] / src / simgrid / host.cpp
index 38d3e17..61de103 100644 (file)
@@ -154,7 +154,7 @@ double sg_host_get_consumed_energy(sg_host_t host) {
  *  See also @ref SURF_plugin_energy.
  */
 int sg_host_get_nb_pstates(sg_host_t host) {
-       return surf_host_get_nb_pstates(host);
+  return host->p_cpu->getNbPStates();
 }
 
 /** @brief Gets the pstate at which that host currently runs.
@@ -162,7 +162,7 @@ int sg_host_get_nb_pstates(sg_host_t host) {
  *  See also @ref SURF_plugin_energy.
  */
 int sg_host_get_pstate(sg_host_t host) {
-       return surf_host_get_pstate(host);
+       return host->p_cpu->getPState();
 }
 
 namespace simgrid {
@@ -251,8 +251,9 @@ Host* Host::by_name_or_create(const char* name)
 /** Set the pstate at which the host should run */
 void Host::setPstate(int pstate_index)
 {
-  simgrid::simix::kernel(
-    std::bind(SIMIX_host_set_pstate, this, pstate_index));
+  simgrid::simix::kernel(std::bind(
+      &simgrid::surf::Cpu::setPState, p_cpu, pstate_index
+  ));
 }
 
 /** Get the amount of watt dissipated at the given pstate when the host is idling */