Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
uniformize simcall_comm_send() and simcall_comm_recv()
[simgrid.git] / src / simix / libsmx.c
index bd862a3..25285dc 100644 (file)
@@ -950,7 +950,7 @@ smx_process_t simcall_rdv_get_receiver(smx_rdv_t rdv)
 /**
  * \ingroup simix_comm_management
  */
-void simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate,
+void simcall_comm_send(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate,
                          void *src_buff, size_t src_buff_size,
                          int (*match_fun)(void *, void *, smx_synchro_t),
                          void (*copy_data_fun)(smx_synchro_t, void*, size_t), void *data,
@@ -966,13 +966,13 @@ void simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, doubl
   if (MC_is_active() || MC_record_replay_is_active()) {
     /* the model-checker wants two separate simcalls */
     smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
-    comm = simcall_comm_isend(src, rdv, task_size, rate,
+    comm = simcall_comm_isend(sender, rdv, task_size, rate,
         src_buff, src_buff_size, match_fun, NULL, copy_data_fun, data, 0);
     simcall_comm_wait(comm, timeout);
     comm = NULL;
   }
   else {
-    simcall_BODY_comm_send(src, rdv, task_size, rate, src_buff, src_buff_size,
+    simcall_BODY_comm_send(sender, rdv, task_size, rate, src_buff, src_buff_size,
                          match_fun, copy_data_fun, data, timeout);
   }
 }
@@ -980,7 +980,7 @@ void simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, doubl
 /**
  * \ingroup simix_comm_management
  */
-smx_synchro_t simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate,
+smx_synchro_t simcall_comm_isend(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate,
                               void *src_buff, size_t src_buff_size,
                               int (*match_fun)(void *, void *, smx_synchro_t),
                               void (*clean_fun)(void *),
@@ -994,7 +994,7 @@ smx_synchro_t simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_s
 
   xbt_assert(rdv, "No rendez-vous point defined for isend");
 
-  return simcall_BODY_comm_isend(src, rdv, task_size, rate, src_buff,
+  return simcall_BODY_comm_isend(sender, rdv, task_size, rate, src_buff,
                                  src_buff_size, match_fun,
                                  clean_fun, copy_data_fun, data, detached);
 }
@@ -1002,7 +1002,7 @@ smx_synchro_t simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_s
 /**
  * \ingroup simix_comm_management
  */
-void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
+void simcall_comm_recv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
                        int (*match_fun)(void *, void *, smx_synchro_t),
                        void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                        void *data, double timeout, double rate)
@@ -1013,27 +1013,27 @@ void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
   if (MC_is_active() || MC_record_replay_is_active()) {
     /* the model-checker wants two separate simcalls */
     smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
-    comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
+    comm = simcall_comm_irecv(receiver, rdv, dst_buff, dst_buff_size,
                               match_fun, copy_data_fun, data, rate);
     simcall_comm_wait(comm, timeout);
     comm = NULL;
   }
   else {
-    simcall_BODY_comm_recv(rdv, dst_buff, dst_buff_size,
+    simcall_BODY_comm_recv(receiver, rdv, dst_buff, dst_buff_size,
                            match_fun, copy_data_fun, data, timeout, rate);
   }
 }
 /**
  * \ingroup simix_comm_management
  */
-smx_synchro_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size,
+smx_synchro_t simcall_comm_irecv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size,
                                 int (*match_fun)(void *, void *, smx_synchro_t),
                                 void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                 void *data, double rate)
 {
   xbt_assert(rdv, "No rendez-vous point defined for irecv");
 
-  return simcall_BODY_comm_irecv(rdv, dst_buff, dst_buff_size,
+  return simcall_BODY_comm_irecv(receiver, rdv, dst_buff, dst_buff_size,
                                  match_fun, copy_data_fun, data, rate);
 }