Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge s4u wait_any
[simgrid.git] / src / simix / popping_bodies.cpp
index 74b4dcf..1910808 100644 (file)
@@ -221,10 +221,10 @@ inline static smx_synchro_t simcall_BODY_comm_irecv(smx_process_t receiver, smx_
     return simcall<smx_synchro_t, smx_process_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);
   }
   
-inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
+inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) simcall_HANDLER_comm_waitany(&SIMIX_process_self()->simcall, comms);
-    return simcall<int, xbt_dynar_t>(SIMCALL_COMM_WAITANY, comms);
+    if (0) simcall_HANDLER_comm_waitany(&SIMIX_process_self()->simcall, comms, timeout);
+    return simcall<int, xbt_dynar_t, double>(SIMCALL_COMM_WAITANY, comms, timeout);
   }
   
 inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
@@ -239,10 +239,10 @@ inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
     return simcall<int, smx_synchro_t>(SIMCALL_COMM_TEST, comm);
   }
   
-inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
+inline static int simcall_BODY_comm_testany(smx_synchro_t* comms, size_t count) {
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) simcall_HANDLER_comm_testany(&SIMIX_process_self()->simcall, comms);
-    return simcall<int, xbt_dynar_t>(SIMCALL_COMM_TESTANY, comms);
+    if (0) simcall_HANDLER_comm_testany(&SIMIX_process_self()->simcall, comms, count);
+    return simcall<int, smx_synchro_t*, size_t>(SIMCALL_COMM_TESTANY, comms, count);
   }
   
 inline static smx_mutex_t simcall_BODY_mutex_init() {
@@ -441,4 +441,10 @@ inline static void simcall_BODY_run_kernel(std::function<void()> const* code) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_run_kernel(code);
     return simcall<void, std::function<void()> const*>(SIMCALL_RUN_KERNEL, code);
+  }
+  
+inline static void simcall_BODY_run_blocking(std::function<void()> const* code) {
+    /* Go to that function to follow the code flow through the simcall barrier */
+    if (0) SIMIX_run_blocking(code);
+    return simcall<void, std::function<void()> const*>(SIMCALL_RUN_BLOCKING, code);
   }/** @endcond */