msg_mailbox_t MSG_mailbox_get_by_channel(m_host_t host,
m_channel_t channel)
{
- xbt_assert0((host != NULL), "Invalid host");
- xbt_assert1((channel >= 0)
+ xbt_assert((host != NULL), "Invalid host");
+ xbt_assert((channel >= 0)
&& (channel < msg_global->max_channel), "Invalid channel %d",
channel);
#endif
/* Sanity check */
- xbt_assert0(task, "Null pointer for the task storage");
+ xbt_assert(task, "Null pointer for the task storage");
if (*task)
XBT_CRITICAL
t_simdata->sender = process;
t_simdata->source = MSG_host_self();
- xbt_assert0(t_simdata->isused == 0,
+ xbt_assert(t_simdata->isused == 0,
"This task is still being used somewhere else. You cannot send it now. Go fix your code!");
t_simdata->isused=1;
/* Try to send it by calling SIMIX network layer */
TRY {
#ifdef HAVE_TRACING
- comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
- t_simdata->rate, task, sizeof(void *), NULL, NULL, 0);
- t_simdata->comm = comm;
- SIMIX_req_set_category(comm, task->category);
- SIMIX_req_comm_wait(comm, timeout);
-#else
- SIMIX_req_comm_send(mailbox, t_simdata->message_size,
- t_simdata->rate, task, sizeof(void*), NULL, NULL, timeout);
+ if (TRACE_is_active()) {
+ comm = SIMIX_req_comm_isend(mailbox, t_simdata->message_size,
+ t_simdata->rate, task, sizeof(void *),
+ NULL, NULL, 0);
+ t_simdata->comm = comm;
+ 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
}