A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix copy/paste errors (found by sonar as dupplicated blocks ;)
[simgrid.git]
/
src
/
simix
/
smx_vm.cpp
diff --git
a/src/simix/smx_vm.cpp
b/src/simix/smx_vm.cpp
index
dcf61aa
..
0eb77b5
100644
(file)
--- a/
src/simix/smx_vm.cpp
+++ b/
src/simix/smx_vm.cpp
@@
-110,8
+110,7
@@
void SIMIX_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst
SIMIX_vm_migrate(vm, dst_pm);
/* Resume the VM */
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);
}
/**
}
/**
@@
-156,7
+155,7
@@
void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, sg_host_t vm)
*
* @param vm the vm host to resume (a sg_host_t)
*/
*
* @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());
{
if (SIMIX_vm_get_state(vm) != SURF_VM_STATE_SUSPENDED)
THROWF(vm_error, 0, "VM(%s) was not suspended", vm->name().c_str());
@@
-174,12
+173,6
@@
void SIMIX_vm_resume(sg_host_t vm, smx_actor_t issuer)
}
}
}
}
-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.
/**
* @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.
@@
-197,7
+190,7
@@
void SIMIX_vm_save(sg_host_t vm, smx_actor_t issuer)
XBT_DEBUG("save VM(%s), where %d processes exist", name, xbt_swag_size(sg_host_simix(vm)->process_list));
/* jump to vm_ws_save() */
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_->
resum
e();
+ static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->
sav
e();
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
@@
-211,7
+204,6
@@
void simcall_HANDLER_vm_save(smx_simcall_t simcall, sg_host_t vm)
SIMIX_vm_save(vm, simcall->issuer);
}
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.
/**
* @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.
@@
-227,7
+219,7
@@
void SIMIX_vm_restore(sg_host_t vm)
vm->name().c_str(), xbt_swag_size(sg_host_simix(vm)->process_list));
/* jump to vm_ws_restore() */
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_->res
um
e();
+ static_cast<simgrid::s4u::VirtualMachine*>(vm)->pimpl_vm_->res
tor
e();
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
smx_actor_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, sg_host_simix(vm)->process_list) {
@@
-236,12
+228,6
@@
void SIMIX_vm_restore(sg_host_t vm)
}
}
}
}
-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
/**
* @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