X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e03ba5e826a3b2422d4bb300fe3949bed0f71712..e98908d4e3ea9f355370a4f0a9db15b9593b7eb1:/src/s4u/s4u_host.cpp diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index 84563701b3..527dc2965e 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -5,8 +5,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "xbt/log.h" -#include "msg/msg_private.h" -#include "simix/smx_process_private.h" +#include "src/msg/msg_private.h" +#include "src/simix/smx_process_private.h" #include "simgrid/s4u/host.hpp" #include "simgrid/s4u/storage.hpp" @@ -17,7 +17,8 @@ namespace s4u { boost::unordered_map *Host::hosts = new boost::unordered_map(); -Host::Host(const char*name) { +Host::Host(const char*name) +{ p_inferior = sg_host_by_name(name); if (p_inferior==NULL) xbt_die("No such host: %s",name); //FIXME: raise an exception @@ -44,28 +45,28 @@ Host *Host::current(){ if (smx_proc == NULL) xbt_die("Cannot call Host::current() from the maestro context"); - return Host::byName(SIMIX_host_get_name(SIMIX_process_get_host(smx_proc))); + return Host::byName(sg_host_get_name(SIMIX_process_get_host(smx_proc))); } const char* Host::name() { - return sg_host_name(p_inferior); + return sg_host_get_name(p_inferior); } void Host::turnOn() { - simcall_host_on(p_inferior); + p_inferior->on(); } void Host::turnOff() { - simcall_host_off(p_inferior); + p_inferior->off(); } bool Host::isOn() { - return simcall_host_get_state(p_inferior); + return sg_host_get_state(p_inferior); } boost::unordered_map &Host::mountedStorages() { if (mounts == NULL) { mounts = new boost::unordered_map (); - xbt_dict_t dict = simcall_host_get_mounted_storage_list(p_inferior); + xbt_dict_t dict = p_inferior->getMountedStorageList(); xbt_dict_cursor_t cursor; char *mountname;