Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar: replace void* by unsigned char* for raw buffer
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Sat, 13 Apr 2019 15:50:40 +0000 (17:50 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sat, 13 Apr 2019 17:10:51 +0000 (19:10 +0200)
src/kernel/activity/CommImpl.cpp
src/kernel/activity/CommImpl.hpp
src/simix/libsmx.cpp
src/simix/popping_accessors.hpp
src/simix/popping_bodies.cpp
src/simix/popping_generated.cpp
src/simix/simcalls.in

index 9817117..1410e40 100644 (file)
@@ -19,7 +19,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix, "SIMIX network-related synchronization");
 
 XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t src, smx_mailbox_t mbox, double task_size,
-                                           double rate, void* src_buff, size_t src_buff_size,
+                                           double rate, unsigned char* src_buff, size_t src_buff_size,
                                            int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
                                            void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t),
                                            void* data, double timeout)
@@ -31,8 +31,8 @@ XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sr
 }
 
 XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_isend(
-    smx_simcall_t /*simcall*/, smx_actor_t src_proc, smx_mailbox_t mbox, double task_size, double rate, void* src_buff,
-    size_t src_buff_size, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
+    smx_simcall_t /*simcall*/, smx_actor_t src_proc, smx_mailbox_t mbox, double task_size, double rate,
+    unsigned char* src_buff, size_t src_buff_size, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
     void (*clean_fun)(void*), // used to free the synchro in case of problem after a detached send
     void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), // used to copy data if not default one
     void* data, bool detached)
@@ -97,7 +97,7 @@ XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_isend(
 }
 
 XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox,
-                                           void* dst_buff, size_t* dst_buff_size,
+                                           unsigned char* dst_buff, size_t* dst_buff_size,
                                            int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
                                            void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t),
                                            void* data, double timeout, double rate)
@@ -109,7 +109,7 @@ XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t re
 }
 
 XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_irecv(
-    smx_simcall_t /*simcall*/, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size,
+    smx_simcall_t /*simcall*/, smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size,
     simix_match_func_t match_fun, void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t),
     void* data, double rate)
 {
@@ -380,14 +380,14 @@ CommImpl& CommImpl::set_rate(double rate)
   return *this;
 }
 
-CommImpl& CommImpl::set_src_buff(void* buff, size_t size)
+CommImpl& CommImpl::set_src_buff(unsigned char* buff, size_t size)
 {
   src_buff_      = buff;
   src_buff_size_ = size;
   return *this;
 }
 
-CommImpl& CommImpl::set_dst_buff(void* buff, size_t* size)
+CommImpl& CommImpl::set_dst_buff(unsigned char* buff, size_t* size)
 {
   dst_buff_      = buff;
   dst_buff_size_ = size;
index 777d826..559fd9d 100644 (file)
@@ -27,8 +27,8 @@ public:
 
   CommImpl& set_type(CommImpl::Type type);
   CommImpl& set_size(double size);
-  CommImpl& set_src_buff(void* buff, size_t size);
-  CommImpl& set_dst_buff(void* buff, size_t* size);
+  CommImpl& set_src_buff(unsigned char* buff, size_t size);
+  CommImpl& set_dst_buff(unsigned char* buff, size_t* size);
   CommImpl& set_rate(double rate);
   double get_rate() { return rate_; }
 
@@ -64,11 +64,11 @@ expectations of the other side, too. See  */
   actor::ActorImplPtr dst_actor_ = nullptr;
 
   /* Data to be transfered */
-  void* src_buff_        = nullptr;
-  void* dst_buff_        = nullptr;
-  size_t src_buff_size_  = 0;
-  size_t* dst_buff_size_ = nullptr;
-  bool copied           = false; /* whether the data were already copied */
+  unsigned char* src_buff_ = nullptr;
+  unsigned char* dst_buff_ = nullptr;
+  size_t src_buff_size_    = 0;
+  size_t* dst_buff_size_   = nullptr;
+  bool copied              = false; /* whether the data were already copied */
 
   void* src_data_ = nullptr; /* User data associated to the communication */
   void* dst_data_ = nullptr;
index b44eb2d..278a3ec 100644 (file)
@@ -95,8 +95,8 @@ void simcall_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size,
     comm = nullptr;
   }
   else {
-    simcall_BODY_comm_send(sender, mbox, task_size, rate, src_buff, src_buff_size,
-                         match_fun, copy_data_fun, data, timeout);
+    simcall_BODY_comm_send(sender, mbox, task_size, rate, static_cast<unsigned char*>(src_buff), src_buff_size,
+                           match_fun, copy_data_fun, data, timeout);
   }
 }
 
@@ -116,9 +116,8 @@ smx_activity_t simcall_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double
 
   xbt_assert(mbox, "No rendez-vous point defined for isend");
 
-  return simcall_BODY_comm_isend(sender, mbox, task_size, rate, src_buff,
-                                 src_buff_size, match_fun,
-                                 clean_fun, copy_data_fun, data, detached);
+  return simcall_BODY_comm_isend(sender, mbox, task_size, rate, static_cast<unsigned char*>(src_buff), src_buff_size,
+                                 match_fun, clean_fun, copy_data_fun, data, detached);
 }
 
 /**
@@ -141,8 +140,8 @@ void simcall_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff,
     comm = nullptr;
   }
   else {
-    simcall_BODY_comm_recv(receiver, mbox, dst_buff, dst_buff_size,
-                           match_fun, copy_data_fun, data, timeout, rate);
+    simcall_BODY_comm_recv(receiver, mbox, static_cast<unsigned char*>(dst_buff), dst_buff_size, match_fun,
+                           copy_data_fun, data, timeout, rate);
   }
 }
 /**
@@ -155,8 +154,8 @@ smx_activity_t simcall_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void
 {
   xbt_assert(mbox, "No rendez-vous point defined for irecv");
 
-  return simcall_BODY_comm_irecv(receiver, mbox, dst_buff, dst_buff_size,
-                                 match_fun, copy_data_fun, data, rate);
+  return simcall_BODY_comm_irecv(receiver, mbox, static_cast<unsigned char*>(dst_buff), dst_buff_size, match_fun,
+                                 copy_data_fun, data, rate);
 }
 
 /**
index 5ce7bc8..98a6521 100644 (file)
@@ -188,17 +188,17 @@ static inline void simcall_comm_send__set__rate(smx_simcall_t simcall, double ar
 {
   simgrid::simix::marshal<double>(simcall->args[3], arg);
 }
-static inline void* simcall_comm_send__get__src_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_send__get__src_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal<void*>(simcall->args[4]);
+  return simgrid::simix::unmarshal<unsigned char*>(simcall->args[4]);
 }
-static inline void* simcall_comm_send__getraw__src_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_send__getraw__src_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal_raw<void*>(simcall->args[4]);
+  return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[4]);
 }
-static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, void* arg)
+static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, unsigned char* arg)
 {
-  simgrid::simix::marshal<void*>(simcall->args[4], arg);
+  simgrid::simix::marshal<unsigned char*>(simcall->args[4], arg);
 }
 static inline size_t simcall_comm_send__get__src_buff_size(smx_simcall_t simcall)
 {
@@ -309,17 +309,17 @@ static inline void simcall_comm_isend__set__rate(smx_simcall_t simcall, double a
 {
   simgrid::simix::marshal<double>(simcall->args[3], arg);
 }
-static inline void* simcall_comm_isend__get__src_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_isend__get__src_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal<void*>(simcall->args[4]);
+  return simgrid::simix::unmarshal<unsigned char*>(simcall->args[4]);
 }
-static inline void* simcall_comm_isend__getraw__src_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_isend__getraw__src_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal_raw<void*>(simcall->args[4]);
+  return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[4]);
 }
-static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, void* arg)
+static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, unsigned char* arg)
 {
-  simgrid::simix::marshal<void*>(simcall->args[4], arg);
+  simgrid::simix::marshal<unsigned char*>(simcall->args[4], arg);
 }
 static inline size_t simcall_comm_isend__get__src_buff_size(smx_simcall_t simcall)
 {
@@ -430,17 +430,17 @@ static inline void simcall_comm_recv__set__mbox(smx_simcall_t simcall, smx_mailb
 {
   simgrid::simix::marshal<smx_mailbox_t>(simcall->args[1], arg);
 }
-static inline void* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal<void*>(simcall->args[2]);
+  return simgrid::simix::unmarshal<unsigned char*>(simcall->args[2]);
 }
-static inline void* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal_raw<void*>(simcall->args[2]);
+  return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[2]);
 }
-static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, void* arg)
+static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg)
 {
-  simgrid::simix::marshal<void*>(simcall->args[2], arg);
+  simgrid::simix::marshal<unsigned char*>(simcall->args[2], arg);
 }
 static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall)
 {
@@ -539,17 +539,17 @@ static inline void simcall_comm_irecv__set__mbox(smx_simcall_t simcall, smx_mail
 {
   simgrid::simix::marshal<smx_mailbox_t>(simcall->args[1], arg);
 }
-static inline void* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal<void*>(simcall->args[2]);
+  return simgrid::simix::unmarshal<unsigned char*>(simcall->args[2]);
 }
-static inline void* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall)
+static inline unsigned char* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall)
 {
-  return simgrid::simix::unmarshal_raw<void*>(simcall->args[2]);
+  return simgrid::simix::unmarshal_raw<unsigned char*>(simcall->args[2]);
 }
-static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, void* arg)
+static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg)
 {
-  simgrid::simix::marshal<void*>(simcall->args[2], arg);
+  simgrid::simix::marshal<unsigned char*>(simcall->args[2], arg);
 }
 static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall)
 {
@@ -1030,10 +1030,23 @@ XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t
 XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
 XBT_PRIVATE void simcall_HANDLER_execution_wait(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* execution);
 XBT_PRIVATE void simcall_HANDLER_execution_test(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* execution);
-XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
-XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached);
-XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate);
-XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
+XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox,
+                                           double task_size, double rate, unsigned char* src_buff, size_t src_buff_size,
+                                           simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun,
+                                           void* data, double timeout);
+XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
+simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate,
+                           unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun,
+                           simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data,
+                           bool detached);
+XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox,
+                                           unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun,
+                                           simix_copy_data_func_t copy_data_fun, void* data, double timeout,
+                                           double rate);
+XBT_PRIVATE boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
+simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff,
+                           size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun,
+                           void* data, double rate);
 XBT_PRIVATE void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout);
 XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm, double timeout);
 XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm);
index 8888f2a..348a3e2 100644 (file)
@@ -74,32 +74,50 @@ inline static bool simcall_BODY_execution_test(simgrid::kernel::activity::ExecIm
   return simcall<bool, simgrid::kernel::activity::ExecImpl*>(SIMCALL_EXECUTION_TEST, execution);
 }
 
-inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout)
+inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate,
+                                          unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun,
+                                          simix_copy_data_func_t copy_data_fun, void* data, double timeout)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     simcall_HANDLER_comm_send(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
-  return simcall<void, smx_actor_t, smx_mailbox_t, double, double, void*, size_t, simix_match_func_t, simix_copy_data_func_t, void*, double>(SIMCALL_COMM_SEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
+  return simcall<void, smx_actor_t, smx_mailbox_t, double, double, unsigned char*, size_t, simix_match_func_t,
+                 simix_copy_data_func_t, void*, double>(SIMCALL_COMM_SEND, sender, mbox, task_size, rate, src_buff,
+                                                        src_buff_size, match_fun, copy_data_fun, data, timeout);
 }
 
-inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached)
+inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
+simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff,
+                        size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun,
+                        simix_copy_data_func_t copy_data_fun, void* data, bool detached)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     simcall_HANDLER_comm_isend(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
-  return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t, double, double, void*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*, bool>(SIMCALL_COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
+  return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t, double,
+                 double, unsigned char*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*,
+                 bool>(SIMCALL_COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun,
+                       copy_data_fun, data, detached);
 }
 
-inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate)
+inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff,
+                                          size_t* dst_buff_size, simix_match_func_t match_fun,
+                                          simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     simcall_HANDLER_comm_recv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
-  return simcall<void, smx_actor_t, smx_mailbox_t, void*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double, double>(SIMCALL_COMM_RECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
+  return simcall<void, smx_actor_t, smx_mailbox_t, unsigned char*, size_t*, simix_match_func_t, simix_copy_data_func_t,
+                 void*, double, double>(SIMCALL_COMM_RECV, receiver, mbox, dst_buff, dst_buff_size, match_fun,
+                                        copy_data_fun, data, timeout, rate);
 }
 
-inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> simcall_BODY_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate)
+inline static boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>
+simcall_BODY_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size,
+                        simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     simcall_HANDLER_comm_irecv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
-  return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t, void*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double>(SIMCALL_COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
+  return simcall<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>, smx_actor_t, smx_mailbox_t,
+                 unsigned char*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double>(
+      SIMCALL_COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
 }
 
 inline static int simcall_BODY_comm_waitany(simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout)
index 71542d4..2d55ceb 100644 (file)
@@ -84,20 +84,53 @@ case SIMCALL_EXECUTION_TEST:
   break;
 
 case SIMCALL_COMM_SEND:
-  simcall_HANDLER_comm_send(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3]), simgrid::simix::unmarshal<void*>(simcall->args[4]), simgrid::simix::unmarshal<size_t>(simcall->args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[7]), simgrid::simix::unmarshal<void*>(simcall->args[8]), simgrid::simix::unmarshal<double>(simcall->args[9]));
+  simcall_HANDLER_comm_send(
+      simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]),
+      simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]),
+      simgrid::simix::unmarshal<double>(simcall->args[3]), simgrid::simix::unmarshal<unsigned char*>(simcall->args[4]),
+      simgrid::simix::unmarshal<size_t>(simcall->args[5]),
+      simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]),
+      simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[7]),
+      simgrid::simix::unmarshal<void*>(simcall->args[8]), simgrid::simix::unmarshal<double>(simcall->args[9]));
   break;
 
 case SIMCALL_COMM_ISEND:
-  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, simcall_HANDLER_comm_isend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]), simgrid::simix::unmarshal<double>(simcall->args[3]), simgrid::simix::unmarshal<void*>(simcall->args[4]), simgrid::simix::unmarshal<size_t>(simcall->args[5]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]), simgrid::simix::unmarshal<simix_clean_func_t>(simcall->args[7]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[8]), simgrid::simix::unmarshal<void*>(simcall->args[9]), simgrid::simix::unmarshal<bool>(simcall->args[10])));
+  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
+      simcall->result, simcall_HANDLER_comm_isend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]),
+                                                  simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]),
+                                                  simgrid::simix::unmarshal<double>(simcall->args[2]),
+                                                  simgrid::simix::unmarshal<double>(simcall->args[3]),
+                                                  simgrid::simix::unmarshal<unsigned char*>(simcall->args[4]),
+                                                  simgrid::simix::unmarshal<size_t>(simcall->args[5]),
+                                                  simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[6]),
+                                                  simgrid::simix::unmarshal<simix_clean_func_t>(simcall->args[7]),
+                                                  simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[8]),
+                                                  simgrid::simix::unmarshal<void*>(simcall->args[9]),
+                                                  simgrid::simix::unmarshal<bool>(simcall->args[10])));
   SIMIX_simcall_answer(simcall);
   break;
 
 case SIMCALL_COMM_RECV:
-  simcall_HANDLER_comm_recv(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<void*>(simcall->args[2]), simgrid::simix::unmarshal<size_t*>(simcall->args[3]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]), simgrid::simix::unmarshal<void*>(simcall->args[6]), simgrid::simix::unmarshal<double>(simcall->args[7]), simgrid::simix::unmarshal<double>(simcall->args[8]));
+  simcall_HANDLER_comm_recv(
+      simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]),
+      simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]),
+      simgrid::simix::unmarshal<unsigned char*>(simcall->args[2]), simgrid::simix::unmarshal<size_t*>(simcall->args[3]),
+      simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]),
+      simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]),
+      simgrid::simix::unmarshal<void*>(simcall->args[6]), simgrid::simix::unmarshal<double>(simcall->args[7]),
+      simgrid::simix::unmarshal<double>(simcall->args[8]));
   break;
 
 case SIMCALL_COMM_IRECV:
-  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]), simgrid::simix::unmarshal<void*>(simcall->args[2]), simgrid::simix::unmarshal<size_t*>(simcall->args[3]), simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]), simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]), simgrid::simix::unmarshal<void*>(simcall->args[6]), simgrid::simix::unmarshal<double>(simcall->args[7])));
+  simgrid::simix::marshal<boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl>>(
+      simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]),
+                                                  simgrid::simix::unmarshal<smx_mailbox_t>(simcall->args[1]),
+                                                  simgrid::simix::unmarshal<unsigned char*>(simcall->args[2]),
+                                                  simgrid::simix::unmarshal<size_t*>(simcall->args[3]),
+                                                  simgrid::simix::unmarshal<simix_match_func_t>(simcall->args[4]),
+                                                  simgrid::simix::unmarshal<simix_copy_data_func_t>(simcall->args[5]),
+                                                  simgrid::simix::unmarshal<void*>(simcall->args[6]),
+                                                  simgrid::simix::unmarshal<double>(simcall->args[7])));
   SIMIX_simcall_answer(simcall);
   break;
 
index b450dfe..10d0ee0 100644 (file)
@@ -42,10 +42,10 @@ int  process_sleep(double duration) [[block]];
 int           execution_wait(simgrid::kernel::activity::ExecImpl* execution) [[block]];
 bool          execution_test(simgrid::kernel::activity::ExecImpl* execution) [[block]];
 
-void           comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) [[block]];
-boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached);
-void           comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) [[block]];
-boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
+void           comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) [[block]];
+boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, bool detached);
+void           comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) [[block]];
+boost::intrusive_ptr<simgrid::kernel::activity::ActivityImpl> comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
 int            comm_waitany(simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout) [[block]];
 void           comm_wait(simgrid::kernel::activity::CommImpl* comm, double timeout) [[block]];
 bool           comm_test(simgrid::kernel::activity::CommImpl* comm) [[block]];