SIMIX_vm_migrate(vm, dst_pm);
/* Resume the VM */
- smx_actor_t self = SIMIX_process_self();
- SIMIX_vm_resume(vm, self);
+ SIMIX_vm_resume(vm);
}
/**
*
* @param vm the vm host to resume (a sg_host_t)
*/
-void SIMIX_vm_resume(sg_host_t vm, smx_actor_t issuer)
+void SIMIX_vm_resume(sg_host_t vm)
{
if (SIMIX_vm_get_state(vm) != SURF_VM_STATE_SUSPENDED)
THROWF(vm_error, 0, "VM(%s) was not suspended", vm->name().c_str());
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
XBT_DEBUG("resume %s", smx_process->name.c_str());
- SIMIX_process_resume(smx_process, issuer);
+ SIMIX_process_resume(smx_process);
}
}
-void simcall_HANDLER_vm_resume(smx_simcall_t simcall, sg_host_t vm)
-{
- SIMIX_vm_resume(vm, simcall->issuer);
-}
-
-
/**
* @brief Function to save a SIMIX VM host.
* This function is the same as vm_suspend, but the state of the VM is saved to the disk, and not preserved on memory.
*
* @param vm the vm host to restore (a sg_host_t)
*/
-void SIMIX_vm_restore(sg_host_t vm, smx_actor_t issuer)
+void SIMIX_vm_restore(sg_host_t vm)
{
if (SIMIX_vm_get_state(vm) != SURF_VM_STATE_SAVED)
THROWF(vm_error, 0, "VM(%s) was not saved", vm->name().c_str());
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
XBT_DEBUG("resume %s", smx_process->name.c_str());
- SIMIX_process_resume(smx_process, issuer);
+ SIMIX_process_resume(smx_process);
}
}
-void simcall_HANDLER_vm_restore(smx_simcall_t simcall, sg_host_t vm)
-{
- SIMIX_vm_restore(vm, simcall->issuer);
-}
-
-
/**
* @brief Function to shutdown a SIMIX VM host. This function powers off the
* VM. All the processes on this VM will be killed. But, the state of the VM is