- 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;
+
+ xbt_ex_t e;
+ /* Try to send it by calling SIMIX network layer */
+ TRY {
+ smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simix call */
+ comm = simcall_comm_isend(SIMIX_process_self(), mailbox,t_simdata->bytes_amount,
+ t_simdata->rate, task, sizeof(void *),
+ NULL, NULL, NULL, task, 0);
+ if (TRACE_is_enabled())
+ simcall_set_category(comm, task->category);
+ t_simdata->comm = comm;
+ simcall_comm_wait(comm, timeout);