X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fbb7ac75c324bca94e2033d95f5420ca2aa5708e..f2e9bf81aebf9a0d39563c3f955fc24e9270d74f:/src/s4u/s4u_host.cpp diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index 48b517621a..d68e07a7b3 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -29,6 +29,11 @@ int ROUTING_HOST_LEVEL; int USER_HOST_LEVEL; namespace simgrid { + +namespace xbt { +template class Extendable; +} + namespace s4u { simgrid::xbt::signal Host::onCreation; @@ -41,8 +46,8 @@ Host::Host(const char* name) } Host::~Host() { - if (mounts != NULL) - delete mounts; + delete pimpl_cpu; + delete mounts; } Host *Host::by_name(std::string name) { @@ -65,7 +70,7 @@ void Host::turn_on() { } void Host::turn_off() { - simgrid::simix::simcall(SIMCALL_HOST_OFF, this); + simgrid::simix::kernel(std::bind(SIMIX_host_off, this, SIMIX_process_self())); } bool Host::is_on() {