- DEBUG4("Trying to send a task (%g kB) from %s to %s on the channel %s",
- t_simdata->message_size / 1000, local_host->name,
- remote_host->name, MSG_mailbox_get_alias(mailbox));
-
- TRY{
- SIMIX_network_send(mailbox->rdv, t_simdata->message_size, t_simdata->rate,
- timeout, &task, sizeof(void *), comm_filter_put, NULL);
+ p_simdata->waiting_task = task;
+
+ /* Try to send it by calling SIMIX network layer */
+ TRY {
+#ifdef HAVE_TRACING
+ if (TRACE_is_enabled()) {
+ smx_action_t comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
+ t_simdata->rate, task, sizeof(void *),
+ NULL, NULL, 0);
+ SIMIX_req_set_category(comm, task->category);
+ SIMIX_req_comm_wait(comm, timeout);
+ } else {
+#endif
+ SIMIX_req_comm_send(mailbox, t_simdata->message_size,
+ t_simdata->rate, task, sizeof(void*),
+ NULL, NULL, timeout);
+#ifdef HAVE_TRACING
+ }
+#endif