X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/51db7d63c10839584bbc13387999b310ff5f7602..71c619779ed661b50ce589403a0f4df7ab0865de:/src/surf/host_interface.cpp diff --git a/src/surf/host_interface.cpp b/src/surf/host_interface.cpp index 203bedeea4..8772f95300 100644 --- a/src/surf/host_interface.cpp +++ b/src/surf/host_interface.cpp @@ -31,7 +31,10 @@ void host_add_traces(){ namespace simgrid { namespace surf { -simgrid::xbt::Extension Host::EXTENSION_ID; +simgrid::xbt::Extension Host::EXTENSION_ID = + simgrid::Host::extension_create([](void *h) { + static_cast(h)->destroy(); + }); /********* * Model * @@ -87,15 +90,6 @@ simgrid::surf::signal Host::onCreation; simgrid::surf::signal Host::onDestruction; simgrid::surf::signal Host::onStateChange; -void Host::classInit() -{ - if (!EXTENSION_ID.valid()) { - EXTENSION_ID = simgrid::Host::extension_create([](void *h) { - static_cast(h)->destroy(); - }); - } -} - Host::Host(simgrid::surf::Model *model, const char *name, xbt_dict_t props, xbt_dynar_t storage, NetCard *netElm, Cpu *cpu) : Resource(model, name)