- SIMIX_network_send(mailbox->rdv, t_simdata->message_size, t_simdata->rate,
- timeout, &task, sizeof(void*), &t_simdata->comm, task);
+ p_simdata->waiting_task = task;
+
+ /* Try to send it by calling SIMIX network layer */
+ TRY {
+ smx_action_t comm = simcall_comm_isend(mailbox, t_simdata->message_size,
+ t_simdata->rate, task, sizeof(void *),
+ NULL, NULL, task, 0);
+#ifdef HAVE_TRACING
+ if (TRACE_is_enabled()) {
+ simcall_set_category(comm, task->category);
+ }
+#endif
+ t_simdata->comm = comm;
+ simcall_comm_wait(comm, timeout);