Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Explicit instanciation of Extendable<simgrid::s4u::Host>
[simgrid.git] / src / s4u / s4u_host.cpp
index 48b5176..d68e07a 100644 (file)
@@ -29,6 +29,11 @@ int ROUTING_HOST_LEVEL;
 int USER_HOST_LEVEL;
 
 namespace simgrid {
+
+namespace xbt {
+template class Extendable<simgrid::s4u::Host>;
+}
+
 namespace s4u {
 
 simgrid::xbt::signal<void(Host&)> 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<void>(SIMCALL_HOST_OFF, this);
+  simgrid::simix::kernel(std::bind(SIMIX_host_off, this, SIMIX_process_self()));
 }
 
 bool Host::is_on() {