X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a09e4f2f232865acb757ba2eea1d7ac0aab30245..96b18f4b65694f66c8aea2d702b6f087fdcf9cb7:/src/simix/smx_vm.cpp diff --git a/src/simix/smx_vm.cpp b/src/simix/smx_vm.cpp index c6c9709a50..6c99ae8ded 100644 --- a/src/simix/smx_vm.cpp +++ b/src/simix/smx_vm.cpp @@ -114,7 +114,7 @@ void SIMIX_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst /* Resume the VM */ smx_actor_t self = SIMIX_process_self(); - SIMIX_vm_resume(vm, self->simcall.issuer); + SIMIX_vm_resume(vm, self); } /** @@ -298,11 +298,12 @@ void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, sg_host_t vm) SIMIX_vm_shutdown(vm, simcall->issuer); } -/** - * @brief Function to destroy a SIMIX VM host. - * - * @param vm the vm host to destroy (a sg_host_t) - */ +extern xbt_dict_t host_list; // FIXME:killme don't dupplicate the content of s4u::Host this way + /** + * @brief Function to destroy a SIMIX VM host. + * + * @param vm the vm host to destroy (a sg_host_t) + */ void SIMIX_vm_destroy(sg_host_t vm) { /* this code basically performs a similar thing like SIMIX_host_destroy() */ @@ -319,4 +320,7 @@ void SIMIX_vm_destroy(sg_host_t vm) /* Don't free these things twice: they are the ones of my physical host */ vm->pimpl_cpu = nullptr; vm->pimpl_netcard = nullptr; + + if (xbt_dict_get_or_null(host_list, vm->name().c_str())) + xbt_dict_remove(host_list, vm->name().c_str()); }