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());
}
}
-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.
XBT_DEBUG("save VM(%s), where %d processes exist", name, xbt_swag_size(sg_host_simix(vm)->process_list));
/* jump to vm_ws_save() */
- static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->resume();
+ static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->save();
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
SIMIX_vm_save(vm, simcall->issuer);
}
-
/**
* @brief Function to restore a SIMIX VM host. This function restart the execution of the
* VM. All the processes on this VM will run again.
vm->name().c_str(), xbt_swag_size(sg_host_simix(vm)->process_list));
/* jump to vm_ws_restore() */
- static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->resume();
+ static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->restore();
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
}
}
-void simcall_HANDLER_vm_restore(smx_simcall_t simcall, sg_host_t vm)
-{
- SIMIX_vm_restore(vm);
-}
-
-
/**
* @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