X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/efacb3792fdfe6bc849af2ce1a2e426c092601fb..42c705df3a3f4ccbd742c08d64487b736d7e1c34:/src/simix/libsmx.cpp diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 91447fe93c..2fa37b7215 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -193,10 +193,9 @@ e_smx_state_t simcall_execution_wait(smx_activity_t execution) */ sg_host_t simcall_vm_create(const char *name, sg_host_t phys_host) { - return simgrid::simix::kernelImmediate([&] { - surf_vm_model->createVM(name, phys_host); - sg_host_t host = sg_host_by_name(name); - SIMIX_host_create(host); + return simgrid::simix::kernelImmediate([&name, &phys_host] { + sg_host_t host = surf_vm_model->createVM(name, phys_host); + host->extension_set(new simgrid::simix::Host()); return host; });