Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename all SIMIX_pre_* to simcall_HANDLER_*
[simgrid.git] / src / simix / smx_process.c
index ddc9642..30ff57c 100644 (file)
@@ -38,7 +38,7 @@ int SIMIX_process_has_pending_comms(smx_process_t process) {
   return xbt_fifo_size(process->comms) > 0;
 }
 
-void SIMIX_pre_process_cleanup(smx_simcall_t simcall, smx_process_t process) {
+void simcall_HANDLER_process_cleanup(smx_simcall_t simcall, smx_process_t process) {
   SIMIX_process_cleanup(process);
 }
 /**
@@ -189,7 +189,7 @@ smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args) {
 }
 
 
-void SIMIX_pre_process_create(smx_simcall_t simcall,
+void simcall_HANDLER_process_create(smx_simcall_t simcall,
                          smx_process_t *process,
                           const char *name,
                           xbt_main_func_t code,
@@ -313,7 +313,7 @@ void SIMIX_process_runall(void)
   xbt_dynar_reset(simix_global->process_to_run);
 }
 
-void SIMIX_pre_process_kill(smx_simcall_t simcall, smx_process_t process) {
+void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process) {
   SIMIX_process_kill(process, simcall->issuer);
 }
 /**
@@ -426,7 +426,7 @@ void SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, int value, con
     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, process);
 }
 
-void SIMIX_pre_process_killall(smx_simcall_t simcall, int reset_pid) {
+void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid) {
   SIMIX_process_killall(simcall->issuer, reset_pid);
 }
 /**
@@ -451,7 +451,7 @@ void SIMIX_process_killall(smx_process_t issuer, int reset_pid)
   SIMIX_process_empty_trash();
 }
 
-void SIMIX_pre_process_change_host(smx_simcall_t simcall, smx_process_t process,
+void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process,
                                   smx_host_t dest)
 {
   process->new_host = dest;
@@ -466,7 +466,7 @@ void SIMIX_process_change_host(smx_process_t process,
 }
 
 
-void SIMIX_pre_process_suspend(smx_simcall_t simcall, smx_process_t process)
+void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process)
 {
   smx_action_t action_suspend =
       SIMIX_process_suspend(process, simcall->issuer);
@@ -532,7 +532,7 @@ smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
   }
 }
 
-void SIMIX_pre_process_resume(smx_simcall_t simcall, smx_process_t process){
+void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process){
   SIMIX_process_resume(process, simcall->issuer);
 }
 
@@ -588,7 +588,7 @@ int SIMIX_process_get_maxpid(void) {
   return simix_process_maxpid;
 }
 
-int SIMIX_pre_process_count(smx_simcall_t simcall){
+int simcall_HANDLER_process_count(smx_simcall_t simcall){
   return SIMIX_process_count();
 }
 int SIMIX_process_count(void)
@@ -596,7 +596,7 @@ int SIMIX_process_count(void)
   return xbt_swag_size(simix_global->process_list);
 }
 
-int SIMIX_pre_process_get_PID(smx_simcall_t simcall, smx_process_t self){
+int simcall_HANDLER_process_get_PID(smx_simcall_t simcall, smx_process_t self){
    return SIMIX_process_get_PID(self);
 }
 
@@ -607,7 +607,7 @@ int SIMIX_process_get_PID(smx_process_t self){
     return self->pid;
 }
 
-int SIMIX_pre_process_get_PPID(smx_simcall_t simcall, smx_process_t self){
+int simcall_HANDLER_process_get_PPID(smx_simcall_t simcall, smx_process_t self){
   return SIMIX_process_get_PPID(self);
 }
 
@@ -618,7 +618,7 @@ int SIMIX_process_get_PPID(smx_process_t self){
     return self->ppid;
 }
 
-void* SIMIX_pre_process_self_get_data(smx_simcall_t simcall, smx_process_t self){
+void* simcall_HANDLER_process_self_get_data(smx_simcall_t simcall, smx_process_t self){
   return SIMIX_process_self_get_data(self);
 }
 
@@ -632,7 +632,7 @@ void* SIMIX_process_self_get_data(smx_process_t self)
   return SIMIX_process_get_data(self);
 }
 
-void SIMIX_pre_process_set_data(smx_simcall_t simcall, smx_process_t process,
+void simcall_HANDLER_process_set_data(smx_simcall_t simcall, smx_process_t process,
                                 void *data){
   SIMIX_process_set_data(process, data);
 }
@@ -643,7 +643,7 @@ void SIMIX_process_self_set_data(smx_process_t self, void *data)
   SIMIX_process_set_data(self, data);
 }
 
-void* SIMIX_pre_process_get_data(smx_simcall_t simcall, smx_process_t process){
+void* simcall_HANDLER_process_get_data(smx_simcall_t simcall, smx_process_t process){
   return SIMIX_process_get_data(process);
 }
 void* SIMIX_process_get_data(smx_process_t process)
@@ -656,7 +656,7 @@ void SIMIX_process_set_data(smx_process_t process, void *data)
   process->data = data;
 }
 
-smx_host_t SIMIX_pre_process_get_host(smx_simcall_t simcall, smx_process_t process){
+smx_host_t simcall_HANDLER_process_get_host(smx_simcall_t simcall, smx_process_t process){
   return SIMIX_process_get_host(process);
 }
 smx_host_t SIMIX_process_get_host(smx_process_t process)
@@ -675,7 +675,7 @@ const char* SIMIX_process_self_get_name(void) {
   return SIMIX_process_get_name(process);
 }
 
-const char* SIMIX_pre_process_get_name(smx_simcall_t simcall, smx_process_t process) {
+const char* simcall_HANDLER_process_get_name(smx_simcall_t simcall, smx_process_t process) {
   return SIMIX_process_get_name(process);
 }
 const char* SIMIX_process_get_name(smx_process_t process)
@@ -695,7 +695,7 @@ smx_process_t SIMIX_process_get_by_name(const char* name)
   return NULL;
 }
 
-int SIMIX_pre_process_is_suspended(smx_simcall_t simcall, smx_process_t process){
+int simcall_HANDLER_process_is_suspended(smx_simcall_t simcall, smx_process_t process){
   return SIMIX_process_is_suspended(process);
 }
 int SIMIX_process_is_suspended(smx_process_t process)
@@ -703,7 +703,7 @@ int SIMIX_process_is_suspended(smx_process_t process)
   return process->suspended;
 }
 
-xbt_dict_t SIMIX_pre_process_get_properties(smx_simcall_t simcall, smx_process_t process){
+xbt_dict_t simcall_HANDLER_process_get_properties(smx_simcall_t simcall, smx_process_t process){
   return SIMIX_process_get_properties(process);
 }
 xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
@@ -711,7 +711,7 @@ xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
   return process->properties;
 }
 
-void SIMIX_pre_process_join(smx_simcall_t simcall, smx_process_t process, double timeout)
+void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout)
 {
   smx_action_t action = SIMIX_process_join(simcall->issuer, process, timeout);
   xbt_fifo_push(action->simcalls, simcall);
@@ -729,7 +729,7 @@ static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_actio
       if (simcall->issuer->suspended) {
         XBT_DEBUG("Wait! This process is suspended and can't wake up now.");
         simcall->issuer->suspended = 0;
-        SIMIX_pre_process_suspend(simcall, simcall->issuer);
+        simcall_HANDLER_process_suspend(simcall, simcall->issuer);
       } else {
         SIMIX_simcall_answer(simcall);
       }
@@ -749,7 +749,7 @@ smx_action_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, dou
   return res;
 }
 
-void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration)
+void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration)
 {
   if (MC_is_active()) {
     MC_process_clock_add(simcall->issuer, duration);
@@ -821,7 +821,7 @@ void SIMIX_post_process_sleep(smx_action_t action)
     if (simcall->issuer->suspended) {
       XBT_DEBUG("Wait! This process is suspended and can't wake up now.");
       simcall->issuer->suspended = 0;
-      SIMIX_pre_process_suspend(simcall, simcall->issuer);
+      simcall_HANDLER_process_suspend(simcall, simcall->issuer);
     } else {
       SIMIX_simcall_answer(simcall);
     }
@@ -963,7 +963,7 @@ void SIMIX_process_on_exit_runall(smx_process_t process) {
   }
 }
 
-void SIMIX_pre_process_on_exit(smx_simcall_t simcall, smx_process_t process,
+void simcall_HANDLER_process_on_exit(smx_simcall_t simcall, smx_process_t process,
                               int_f_pvoid_pvoid_t fun, void *data) {
   SIMIX_process_on_exit(process, fun, data);
 }
@@ -980,7 +980,7 @@ void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void
   xbt_dynar_push_as(process->on_exit,s_smx_process_exit_fun_t,exit_fun);
 }
 
-void SIMIX_pre_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
+void simcall_HANDLER_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
                                        int auto_restart) {
   SIMIX_process_auto_restart_set(process, auto_restart);
 }
@@ -993,7 +993,7 @@ void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart) {
   process->auto_restart = auto_restart;
 }
 
-smx_process_t SIMIX_pre_process_restart(smx_simcall_t simcall, smx_process_t process) {
+smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process) {
   return SIMIX_process_restart(process, simcall->issuer);
 }
 /**