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
add debug code
[simgrid.git]
/
src
/
simix
/
smx_vm.c
diff --git
a/src/simix/smx_vm.c
b/src/simix/smx_vm.c
index
6c566a6
..
d4eeea8
100644
(file)
--- a/
src/simix/smx_vm.c
+++ b/
src/simix/smx_vm.c
@@
-80,7
+80,7
@@
void SIMIX_vm_start(smx_host_t ind_vm)
{
//TODO only start the VM if you can
if (__can_be_started(ind_vm))
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_running
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_RUNNING
);
else
THROWF(vm_error, 0, "The VM %s cannot be started", SIMIX_host_get_name(ind_vm));
}
@@
-96,7
+96,7
@@
void SIMIX_vm_set_state(smx_host_t ind_vm, int state)
surf_vm_workstation_model->extension.vm_workstation.set_state(ind_vm, state);
}
-void SIMIX_pre_vm_set_state(smx_host_t ind_vm, int state)
+void SIMIX_pre_vm_set_state(smx_
simcall_t simcall, smx_
host_t ind_vm, int state)
{
SIMIX_vm_set_state(ind_vm, state);
}
@@
-106,7
+106,7
@@
int SIMIX_vm_get_state(smx_host_t ind_vm)
return surf_vm_workstation_model->extension.vm_workstation.get_state(ind_vm);
}
-int SIMIX_pre_vm_get_state(smx_host_t ind_vm)
+int SIMIX_pre_vm_get_state(smx_
simcall_t simcall, smx_
host_t ind_vm)
{
return SIMIX_vm_get_state(ind_vm);
}
@@
-122,12
+122,12
@@
void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm)
/* TODO: check state */
/* TODO: Using the variable of the MSG layer is not clean. */
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_migrating
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_MIGRATING
);
/* jump to vm_ws_migrate(). this will update the vm location. */
surf_vm_workstation_model->extension.vm_workstation.migrate(ind_vm, ind_dst_pm);
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_running
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_RUNNING
);
}
void SIMIX_pre_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm){
@@
-162,7
+162,7
@@
void SIMIX_vm_suspend(smx_host_t ind_vm)
{
/* TODO: check state */
- XBT_DEBUG("%
lu
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
+ XBT_DEBUG("%
d
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
@@
-172,7
+172,7
@@
void SIMIX_vm_suspend(smx_host_t ind_vm)
}
/* TODO: Using the variable of the MSG layer is not clean. */
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_suspended
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_SUSPENDED
);
}
void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm){
@@
-190,7
+190,7
@@
void SIMIX_vm_resume(smx_host_t ind_vm)
{
/* TODO: check state */
- XBT_DEBUG("%
lu
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
+ XBT_DEBUG("%
d
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
@@
-200,7
+200,7
@@
void SIMIX_vm_resume(smx_host_t ind_vm)
}
/* TODO: Using the variable of the MSG layer is not clean. */
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_running
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_RUNNING
);
}
void SIMIX_pre_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm){
@@
-219,7
+219,7
@@
void SIMIX_vm_save(smx_host_t ind_vm)
{
/* TODO: check state */
- XBT_DEBUG("%
lu
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
+ XBT_DEBUG("%
d
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
/* TODO: do something at the surf level */
@@
-231,7
+231,7
@@
void SIMIX_vm_save(smx_host_t ind_vm)
}
/* TODO: Using the variable of the MSG layer is not clean. */
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_saved
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_SAVED
);
}
void SIMIX_pre_vm_save(smx_simcall_t simcall, smx_host_t ind_vm){
@@
-249,7
+249,7
@@
void SIMIX_vm_restore(smx_host_t ind_vm)
{
/* TODO: check state */
- XBT_DEBUG("%
lu
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
+ XBT_DEBUG("%
d
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
/* TODO: do something at the surf level */
@@
-261,7
+261,7
@@
void SIMIX_vm_restore(smx_host_t ind_vm)
}
/* TODO: Using the variable of the MSG layer is not clean. */
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_running
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_RUNNING
);
}
void SIMIX_pre_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm){
@@
-280,7
+280,7
@@
void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer)
{
/* TODO: check state */
- XBT_DEBUG("%
lu
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
+ XBT_DEBUG("%
d
processes in the VM", xbt_swag_size(SIMIX_host_priv(ind_vm)->process_list));
smx_process_t smx_process, smx_process_safe;
xbt_swag_foreach_safe(smx_process, smx_process_safe, SIMIX_host_priv(ind_vm)->process_list) {
@@
-290,7
+290,7
@@
void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer)
}
/* TODO: Using the variable of the MSG layer is not clean. */
- SIMIX_vm_set_state(ind_vm,
msg_vm_state_created
);
+ SIMIX_vm_set_state(ind_vm,
SURF_VM_STATE_CREATED
);
}
void SIMIX_pre_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm){