X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b9a15f078a62e397f321dfb570254652785cc377..90f32f7c90becc16c9d62c3e2aee19b904698b3d:/src/s4u/s4u_host.cpp diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index 9c3b420d3c..a75aea9657 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -14,14 +14,13 @@ #include "src/surf/HostImpl.hpp" #include "xbt/log.h" #include "src/msg/msg_private.h" -#include "src/simix/smx_process_private.h" +#include "src/simix/ActorImpl.hpp" #include "src/simix/smx_private.h" #include "src/surf/cpu_interface.hpp" #include "simgrid/s4u/host.hpp" #include "simgrid/s4u/storage.hpp" int MSG_HOST_LEVEL = -1; -int SIMIX_HOST_LEVEL = -1; int USER_HOST_LEVEL = -1; namespace simgrid { @@ -69,10 +68,10 @@ Host* Host::by_name_or_create(const char* name) } Host *Host::current(){ - smx_process_t smx_proc = SIMIX_process_self(); + smx_actor_t smx_proc = SIMIX_process_self(); if (smx_proc == nullptr) xbt_die("Cannot call Host::current() from the maestro context"); - return SIMIX_process_get_host(smx_proc); + return smx_proc->host; } void Host::turnOn() { @@ -133,7 +132,7 @@ void Host::setProperty(const char*key, const char *value){ xbt_swag_t Host::processes() { return simgrid::simix::kernelImmediate([&]() { - return ((smx_host_priv_t)this->extension(SIMIX_HOST_LEVEL))->process_list; + return this->extension()->process_list; }); }