Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the wrong macro usage of WITHOUT_ANSWER
authorTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Mon, 28 Oct 2013 11:20:07 +0000 (12:20 +0100)
committerTakahiro Hirofuchi <t.hirofuchi+sg@aist.go.jp>
Mon, 28 Oct 2013 11:20:07 +0000 (12:20 +0100)
src/simix/smx_host.c
src/simix/smx_smurf_private.h
src/simix/smx_vm.c

index d984677..ddbe1b4 100644 (file)
@@ -736,7 +736,6 @@ void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params)
 void SIMIX_pre_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params)
 {
   SIMIX_host_get_params(ind_vm, params);
-  SIMIX_simcall_answer(simcall);
 }
 
 void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params)
@@ -748,5 +747,4 @@ void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params)
 void SIMIX_pre_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params)
 {
   SIMIX_host_set_params(ind_vm, params);
-  SIMIX_simcall_answer(simcall);
 }
index 1cd75fe..2fcd3bc 100644 (file)
@@ -277,24 +277,24 @@ ACTION(SIMCALL_HOST_EXECUTION_CANCEL, host_execution_cancel, WITH_ANSWER, TVOID(
 ACTION(SIMCALL_HOST_EXECUTION_GET_REMAINS, host_execution_get_remains, WITH_ANSWER, TDOUBLE(result), TSPEC(execution, smx_action_t)) sep \
 ACTION(SIMCALL_HOST_EXECUTION_GET_STATE, host_execution_get_state, WITH_ANSWER, TINT(result), TSPEC(execution, smx_action_t)) sep \
 ACTION(SIMCALL_HOST_EXECUTION_SET_PRIORITY, host_execution_set_priority, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t), TDOUBLE(priority)) sep \
-ACTION(SIMCALL_HOST_EXECUTION_SET_BOUND, host_execution_set_bound, WITHOUT_ANSWER, TVOID(result), TSPEC(execution, smx_action_t), TDOUBLE(bound)) sep \
+ACTION(SIMCALL_HOST_EXECUTION_SET_BOUND, host_execution_set_bound, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t), TDOUBLE(bound)) sep \
 ACTION(SIMCALL_HOST_EXECUTION_SET_AFFINITY, host_execution_set_affinity, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t), TSPEC(ws, smx_host_t), TULONG(mask)) sep \
 ACTION(SIMCALL_HOST_EXECUTION_WAIT, host_execution_wait, WITHOUT_ANSWER, TINT(result), TSPEC(execution, smx_action_t)) sep \
-ACTION(SIMCALL_HOST_GET_PARAMS, host_get_params, WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TSPEC(params, ws_params_t)) sep \
-ACTION(SIMCALL_HOST_SET_PARAMS, host_set_params, WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TSPEC(params, ws_params_t)) sep \
+ACTION(SIMCALL_HOST_GET_PARAMS, host_get_params, WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TSPEC(params, ws_params_t)) sep \
+ACTION(SIMCALL_HOST_SET_PARAMS, host_set_params, WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TSPEC(params, ws_params_t)) sep \
 ACTION(SIMCALL_VM_CREATE,    vm_create,    WITH_ANSWER,    TPTR(result),  TSTRING(name), TSPEC(ind_pm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_START,     vm_start,     WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_SET_STATE, vm_set_state, WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TINT(state)) sep \
+ACTION(SIMCALL_VM_START,     vm_start,     WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_SET_STATE, vm_set_state, WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TINT(state)) sep \
 ACTION(SIMCALL_VM_GET_STATE, vm_get_state, WITH_ANSWER,    TINT(result),  TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_MIGRATE,   vm_migrate,   WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TSPEC(ind_dst_pm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_MIGRATE,   vm_migrate,   WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TSPEC(ind_dst_pm, smx_host_t)) sep \
 ACTION(SIMCALL_VM_GET_PM,    vm_get_pm,    WITH_ANSWER,    TPTR(result),  TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_SET_BOUND, vm_set_bound, WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TDOUBLE(bound)) sep \
-ACTION(SIMCALL_VM_DESTROY,   vm_destroy,   WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_SUSPEND,   vm_suspend,   WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_RESUME,    vm_resume,    WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_SHUTDOWN,  vm_shutdown,  WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_SAVE,      vm_save,      WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
-ACTION(SIMCALL_VM_RESTORE,   vm_restore,   WITHOUT_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_SET_BOUND,    vm_set_bound,    WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t), TDOUBLE(bound)) sep \
+ACTION(SIMCALL_VM_DESTROY,   vm_destroy,   WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_SUSPEND,   vm_suspend,   WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_RESUME,    vm_resume,    WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_SHUTDOWN,  vm_shutdown,  WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_SAVE,      vm_save,      WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
+ACTION(SIMCALL_VM_RESTORE,   vm_restore,   WITH_ANSWER, TVOID(result), TSPEC(ind_vm, smx_host_t)) sep \
 ACTION(SIMCALL_PROCESS_CREATE, process_create, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t*), TSTRING(name), TSPEC(code, xbt_main_func_t), TPTR(data), TSTRING(hostname), TDOUBLE(kill_time), TINT(argc), TSPEC(argv, char**), TSPEC(properties, xbt_dict_t), TINT(auto_restart)) sep \
 ACTION(SIMCALL_PROCESS_KILL, process_kill, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t)) sep \
 ACTION(SIMCALL_PROCESS_KILLALL, process_killall, WITH_ANSWER, TVOID(result), TINT(reset_pid)) sep \
index f53c188..c6924ce 100644 (file)
@@ -106,7 +106,6 @@ void SIMIX_vm_start(smx_host_t ind_vm)
 void SIMIX_pre_vm_start(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_start(ind_vm);
-  SIMIX_simcall_answer(simcall);
 }
 
 /* ***** set/get state of a VM ***** */
@@ -150,7 +149,6 @@ void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm)
 void SIMIX_pre_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm)
 {
   SIMIX_vm_migrate(ind_vm, ind_dst_pm);
-  SIMIX_simcall_answer(simcall);
 }
 
 
@@ -186,7 +184,6 @@ void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound)
 void SIMIX_pre_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound)
 {
   SIMIX_vm_set_bound(ind_vm, bound);
-  SIMIX_simcall_answer(simcall);
 }
 
 
@@ -227,9 +224,6 @@ void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm)
 
   SIMIX_vm_suspend(ind_vm, simcall->issuer);
 
-  /* without this, simcall_vm_suspend() does not return to the userland. why? */
-  SIMIX_simcall_answer(simcall);
-
   XBT_DEBUG("SIMIX_pre_vm_suspend done");
 }
 
@@ -262,7 +256,6 @@ void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer)
 void SIMIX_pre_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_resume(ind_vm, simcall->issuer);
-  SIMIX_simcall_answer(simcall);
 }
 
 
@@ -296,9 +289,6 @@ void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer)
 void SIMIX_pre_vm_save(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_save(ind_vm, simcall->issuer);
-
-  /* without this, simcall_vm_suspend() does not return to the userland. why? */
-  SIMIX_simcall_answer(simcall);
 }
 
 
@@ -330,7 +320,6 @@ void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer)
 void SIMIX_pre_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_restore(ind_vm, simcall->issuer);
-  SIMIX_simcall_answer(simcall);
 }
 
 
@@ -363,7 +352,6 @@ void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer)
 void SIMIX_pre_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_shutdown(ind_vm, simcall->issuer);
-  SIMIX_simcall_answer(simcall);
 }
 
 
@@ -389,5 +377,4 @@ void SIMIX_vm_destroy(smx_host_t ind_vm)
 void SIMIX_pre_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_destroy(ind_vm);
-  SIMIX_simcall_answer(simcall);
 }