X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a23283368258c196be2e66730a7d691f313ef315..5c979a2a19b47295bc467cfda3c6541f60b6fe13:/src/simgrid/host.cpp diff --git a/src/simgrid/host.cpp b/src/simgrid/host.cpp index 38d3e172be..61de1034ea 100644 --- a/src/simgrid/host.cpp +++ b/src/simgrid/host.cpp @@ -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 */