X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/efacb3792fdfe6bc849af2ce1a2e426c092601fb..f06cff482686f7949ed7ea981cbceac138ce15c1:/src/simix/smx_vm.cpp diff --git a/src/simix/smx_vm.cpp b/src/simix/smx_vm.cpp index 0a4f5a5e36..faecc817c4 100644 --- a/src/simix/smx_vm.cpp +++ b/src/simix/smx_vm.cpp @@ -63,21 +63,21 @@ static int __can_be_started(sg_host_t vm) return 1; } -void SIMIX_vm_start(sg_host_t ind_vm) +void SIMIX_vm_start(sg_host_t vm) { - if (__can_be_started(ind_vm)) + if (__can_be_started(vm)) static_cast( - ind_vm->extension() + vm->extension() )->setState(SURF_VM_STATE_RUNNING); else - THROWF(vm_error, 0, "The VM %s cannot be started", sg_host_get_name(ind_vm)); + THROWF(vm_error, 0, "The VM %s cannot be started", vm->name().c_str()); } -e_surf_vm_state_t SIMIX_vm_get_state(sg_host_t ind_vm) +e_surf_vm_state_t SIMIX_vm_get_state(sg_host_t vm) { return static_cast( - ind_vm->extension() + vm->extension() )->getState(); } @@ -86,13 +86,13 @@ e_surf_vm_state_t SIMIX_vm_get_state(sg_host_t ind_vm) * * @param host the vm host to migrate (a sg_host_t) */ -void SIMIX_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) +void SIMIX_vm_migrate(sg_host_t vm, sg_host_t dst_pm) { /* precopy migration makes the VM temporally paused */ - xbt_assert(SIMIX_vm_get_state(ind_vm) == SURF_VM_STATE_SUSPENDED); + xbt_assert(SIMIX_vm_get_state(vm) == SURF_VM_STATE_SUSPENDED); /* jump to vm_ws_xigrate(). this will update the vm location. */ - surf_vm_migrate(ind_vm, ind_dst_pm); + surf_vm_migrate(vm, dst_pm); } /** @@ -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); } /**