Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics: improve indentation.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 2 Jul 2019 13:47:05 +0000 (15:47 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 2 Jul 2019 14:12:21 +0000 (16:12 +0200)
src/simix/popping_accessors.hpp
src/simix/popping_bodies.cpp
src/simix/popping_generated.cpp
src/simix/simcalls.py

index ac60891..d175c0d 100644 (file)
@@ -123,8 +123,7 @@ static inline simgrid::kernel::activity::ExecImpl** simcall_execution_waitany_fo
 {
   return simgrid::simix::unmarshal_raw<simgrid::kernel::activity::ExecImpl**>(simcall->args[0]);
 }
-static inline void simcall_execution_waitany_for__set__execs(smx_simcall_t simcall,
-                                                             simgrid::kernel::activity::ExecImpl** arg)
+static inline void simcall_execution_waitany_for__set__execs(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl** arg)
 {
   simgrid::simix::marshal<simgrid::kernel::activity::ExecImpl**>(simcall->args[0], arg);
 }
@@ -1079,27 +1078,12 @@ XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_acto
 XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout);
 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_waitany_for(smx_simcall_t simcall,
-                                                       simgrid::kernel::activity::ExecImpl** execs, size_t count,
-                                                       double timeout);
+XBT_PRIVATE void simcall_HANDLER_execution_waitany_for(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl** execs, size_t count, double timeout);
 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, 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_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 148b2e8..f3af8b7 100644 (file)
@@ -67,13 +67,11 @@ inline static int simcall_BODY_execution_wait(simgrid::kernel::activity::ExecImp
   return simcall<int, simgrid::kernel::activity::ExecImpl*>(SIMCALL_EXECUTION_WAIT, execution);
 }
 
-inline static int simcall_BODY_execution_waitany_for(simgrid::kernel::activity::ExecImpl** execs, size_t count,
-                                                     double timeout)
+inline static int simcall_BODY_execution_waitany_for(simgrid::kernel::activity::ExecImpl** execs, size_t count, double timeout)
 {
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     simcall_HANDLER_execution_waitany_for(&SIMIX_process_self()->simcall, execs, count, timeout);
-  return simcall<int, simgrid::kernel::activity::ExecImpl**, size_t, double>(SIMCALL_EXECUTION_WAITANY_FOR, execs,
-                                                                             count, timeout);
+  return simcall<int, simgrid::kernel::activity::ExecImpl**, size_t, double>(SIMCALL_EXECUTION_WAITANY_FOR, execs, count, timeout);
 }
 
 inline static bool simcall_BODY_execution_test(simgrid::kernel::activity::ExecImpl* execution)
@@ -83,50 +81,32 @@ 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,
-                                          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)
+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, 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);
+  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, 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)
+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, 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);
+  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, 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)
+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, 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);
+  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, 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)
+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,
-                 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);
+  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)
@@ -232,4 +212,5 @@ inline static void simcall_BODY_run_blocking(std::function<void()> const* code)
   if (0) /* Go to that function to follow the code flow through the simcall barrier */
     SIMIX_run_blocking(code);
   return simcall<void, std::function<void()> const*>(SIMCALL_RUN_BLOCKING, code);
-} /** @endcond */
+}
+/** @endcond */
index 4457433..a78e0f4 100644 (file)
@@ -64,146 +64,112 @@ void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {
   if (simcall->issuer->context_->iwannadie)
     return;
   switch (simcall->call) {
-case SIMCALL_PROCESS_SUSPEND:
-  simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
-  break;
-
-case SIMCALL_PROCESS_JOIN:
-  simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
-  break;
-
-case SIMCALL_PROCESS_SLEEP:
-  simcall_HANDLER_process_sleep(simcall, simgrid::simix::unmarshal<double>(simcall->args[0]));
-  break;
-
-case SIMCALL_EXECUTION_WAIT:
-  simcall_HANDLER_execution_wait(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]));
-  break;
-
-case SIMCALL_EXECUTION_WAITANY_FOR:
-  simcall_HANDLER_execution_waitany_for(
-      simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl**>(simcall->args[0]),
-      simgrid::simix::unmarshal<size_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
-  break;
-
-case SIMCALL_EXECUTION_TEST:
-  simcall_HANDLER_execution_test(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]));
-  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<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<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<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<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;
-
-case SIMCALL_COMM_WAITANY:
-  simcall_HANDLER_comm_waitany(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0]), simgrid::simix::unmarshal<size_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
-  break;
-
-case SIMCALL_COMM_WAIT:
-  simcall_HANDLER_comm_wait(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
-  break;
-
-case SIMCALL_COMM_TEST:
-  simcall_HANDLER_comm_test(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0]));
-  break;
-
-case SIMCALL_COMM_TESTANY:
-  simcall_HANDLER_comm_testany(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0]), simgrid::simix::unmarshal<size_t>(simcall->args[1]));
-  break;
-
-case SIMCALL_MUTEX_LOCK:
-  simcall_HANDLER_mutex_lock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
-  break;
-
-case SIMCALL_MUTEX_TRYLOCK:
-  simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mutex_trylock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0])));
-  SIMIX_simcall_answer(simcall);
-  break;
-
-case SIMCALL_MUTEX_UNLOCK:
-  simcall_HANDLER_mutex_unlock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
-  SIMIX_simcall_answer(simcall);
-  break;
-
-case SIMCALL_COND_WAIT:
-  simcall_HANDLER_cond_wait(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]));
-  break;
-
-case SIMCALL_COND_WAIT_TIMEOUT:
-  simcall_HANDLER_cond_wait_timeout(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
-  break;
-
-case SIMCALL_SEM_ACQUIRE:
-  simcall_HANDLER_sem_acquire(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]));
-  break;
-
-case SIMCALL_SEM_ACQUIRE_TIMEOUT:
-  simcall_HANDLER_sem_acquire_timeout(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
-  break;
-
-case SIMCALL_IO_WAIT:
-  simcall_HANDLER_io_wait(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::IoImpl*>(simcall->args[0]));
-  break;
-
-case SIMCALL_MC_RANDOM:
-  simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1])));
-  SIMIX_simcall_answer(simcall);
-  break;
-
-case SIMCALL_RUN_KERNEL:
-  SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
-  SIMIX_simcall_answer(simcall);
-  break;
-
-case SIMCALL_RUN_BLOCKING:
-  SIMIX_run_blocking(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
-  break;
+    case SIMCALL_PROCESS_SUSPEND:
+      simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]));
+      break;
+
+    case SIMCALL_PROCESS_JOIN:
+      simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal<smx_actor_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
+      break;
+
+    case SIMCALL_PROCESS_SLEEP:
+      simcall_HANDLER_process_sleep(simcall, simgrid::simix::unmarshal<double>(simcall->args[0]));
+      break;
+
+    case SIMCALL_EXECUTION_WAIT:
+      simcall_HANDLER_execution_wait(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]));
+      break;
+
+    case SIMCALL_EXECUTION_WAITANY_FOR:
+      simcall_HANDLER_execution_waitany_for(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl**>(simcall->args[0]), simgrid::simix::unmarshal<size_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
+      break;
+
+    case SIMCALL_EXECUTION_TEST:
+      simcall_HANDLER_execution_test(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::ExecImpl*>(simcall->args[0]));
+      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<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<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<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<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;
+
+    case SIMCALL_COMM_WAITANY:
+      simcall_HANDLER_comm_waitany(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0]), simgrid::simix::unmarshal<size_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
+      break;
+
+    case SIMCALL_COMM_WAIT:
+      simcall_HANDLER_comm_wait(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
+      break;
+
+    case SIMCALL_COMM_TEST:
+      simcall_HANDLER_comm_test(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl*>(simcall->args[0]));
+      break;
+
+    case SIMCALL_COMM_TESTANY:
+      simcall_HANDLER_comm_testany(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::CommImpl**>(simcall->args[0]), simgrid::simix::unmarshal<size_t>(simcall->args[1]));
+      break;
+
+    case SIMCALL_MUTEX_LOCK:
+      simcall_HANDLER_mutex_lock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
+      break;
+
+    case SIMCALL_MUTEX_TRYLOCK:
+      simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mutex_trylock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0])));
+      SIMIX_simcall_answer(simcall);
+      break;
+
+    case SIMCALL_MUTEX_UNLOCK:
+      simcall_HANDLER_mutex_unlock(simcall, simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[0]));
+      SIMIX_simcall_answer(simcall);
+      break;
+
+    case SIMCALL_COND_WAIT:
+      simcall_HANDLER_cond_wait(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]));
+      break;
+
+    case SIMCALL_COND_WAIT_TIMEOUT:
+      simcall_HANDLER_cond_wait_timeout(simcall, simgrid::simix::unmarshal<smx_cond_t>(simcall->args[0]), simgrid::simix::unmarshal<smx_mutex_t>(simcall->args[1]), simgrid::simix::unmarshal<double>(simcall->args[2]));
+      break;
+
+    case SIMCALL_SEM_ACQUIRE:
+      simcall_HANDLER_sem_acquire(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]));
+      break;
+
+    case SIMCALL_SEM_ACQUIRE_TIMEOUT:
+      simcall_HANDLER_sem_acquire_timeout(simcall, simgrid::simix::unmarshal<smx_sem_t>(simcall->args[0]), simgrid::simix::unmarshal<double>(simcall->args[1]));
+      break;
+
+    case SIMCALL_IO_WAIT:
+      simcall_HANDLER_io_wait(simcall, simgrid::simix::unmarshal<simgrid::kernel::activity::IoImpl*>(simcall->args[0]));
+      break;
+
+    case SIMCALL_MC_RANDOM:
+      simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1])));
+      SIMIX_simcall_answer(simcall);
+      break;
+
+    case SIMCALL_RUN_KERNEL:
+      SIMIX_run_kernel(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
+      SIMIX_simcall_answer(simcall);
+      break;
+
+    case SIMCALL_RUN_BLOCKING:
+      SIMIX_run_blocking(simgrid::simix::unmarshal<std::function<void()> const*>(simcall->args[0]));
+      break;
+
     case NUM_SIMCALLS:
       break;
     case SIMCALL_NONE:
index d757d81..622ae8b 100755 (executable)
@@ -129,9 +129,10 @@ class Simcall(object):
 
     def case(self):
         res = []
+        indent = '    '
         args = ["simgrid::simix::unmarshal<%s>(simcall->args[%d])" % (arg.rettype(), i)
                 for i, arg in enumerate(self.args)]
-        res.append('case SIMCALL_%s:' % (self.name.upper()))
+        res.append(indent + 'case SIMCALL_%s:' % (self.name.upper()))
         if self.need_handler:
             call = "simcall_HANDLER_%s(simcall%s%s)" % (self.name,
                                                         ", " if len(args) > 0 else "",
@@ -139,12 +140,12 @@ class Simcall(object):
         else:
             call = "SIMIX_%s(%s)" % (self.name, ', '.join(args))
         if self.call_kind == 'Func':
-            res.append("  simgrid::simix::marshal<%s>(simcall->result, %s);" % (self.res.rettype(), call))
+            res.append(indent + "  simgrid::simix::marshal<%s>(simcall->result, %s);" % (self.res.rettype(), call))
         else:
-            res.append("  " + call + ";")
+            res.append(indent + "  " + call + ";")
         if self.call_kind != 'Blck':
-            res.append('  SIMIX_simcall_answer(simcall);')
-        res.append('  break;')
+            res.append(indent + '  SIMIX_simcall_answer(simcall);')
+        res.append(indent + '  break;')
         res.append('')
         return '\n'.join(res)
 
@@ -265,8 +266,9 @@ def handle(fd, func, simcalls, guarded_simcalls):
     for guard, ll in guarded_simcalls.items():
         fd.write('\n#if %s\n' % (guard))
         fd.write('\n'.join(func(simcall) for simcall in ll))
-        fd.write('\n#endif\n')
+        fd.write('\n#endif')
 
+    fd.write('\n')
 
 if __name__ == '__main__':
     simcalls, simcalls_dict = parse('simcalls.in')
@@ -286,7 +288,7 @@ if __name__ == '__main__':
     fd.write('#include "src/simix/popping_private.hpp"')
     handle(fd, Simcall.accessors, simcalls, simcalls_dict)
     fd.write(
-        "\n\n/* The prototype of all simcall handlers, automatically generated for you */\n\n")
+        "\n/* The prototype of all simcall handlers, automatically generated for you */\n\n")
     handle(fd, Simcall.handler_prototype, simcalls, simcalls_dict)
     fd.close()
 
@@ -302,7 +304,6 @@ if __name__ == '__main__':
 
     handle(fd, Simcall.enum, simcalls, simcalls_dict)
 
-    fd.write('\n')
     fd.write('  NUM_SIMCALLS\n')
     fd.write('} e_smx_simcall_t;\n')
     fd.close()
@@ -330,7 +331,7 @@ if __name__ == '__main__':
     fd.write('    "SIMCALL_NONE",\n')
     handle(fd, Simcall.string, simcalls, simcalls_dict)
 
-    fd.write('\n};\n\n')
+    fd.write('};\n\n')
 
     fd.write('/** @private\n')
     fd.write(
@@ -393,5 +394,5 @@ inline static R simcall(e_smx_simcall_t call, T const&... t)
 }
 ''')
     handle(fd, Simcall.body, simcalls, simcalls_dict)
-    fd.write(" /** @endcond */\n")
+    fd.write("/** @endcond */\n")
     fd.close()