msg_mailbox_t MSG_mailbox_get_by_channel(m_host_t host,
m_channel_t channel)
{
+ XBT_WARN("DEPRECATED! Now use MSG_mailbox_get_by_alias");
xbt_assert((host != NULL), "Invalid host");
xbt_assert((channel >= 0)
&& (channel < msg_global->max_channel), "Invalid channel %d",
CHECK_HOST();
#ifdef HAVE_TRACING
TRACE_msg_task_get_start();
- double start_time = MSG_get_clock();
+ volatile double start_time = MSG_get_clock();
#endif
/* Sanity check */
MSG_error_t ret = MSG_OK;
simdata_task_t t_simdata = NULL;
m_process_t process = MSG_process_self();
- simdata_process_t p_simdata = SIMIX_process_self_get_data();
+ simdata_process_t p_simdata = SIMIX_process_self_get_data(process);
CHECK_HOST();
#ifdef HAVE_TRACING
/* Prepare the task to send */
t_simdata = task->simdata;
t_simdata->sender = process;
- t_simdata->source = MSG_host_self();
+ t_simdata->source = ((simdata_process_t) SIMIX_process_self_get_data(process))->m_host;
xbt_assert(t_simdata->isused == 0,
"This task is still being used somewhere else. You cannot send it now. Go fix your code!");
/* 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);
+ NULL, NULL, task, 0);
#ifdef HAVE_TRACING
+ if (TRACE_is_enabled()) {
+ SIMIX_req_set_category(comm, task->category);
}
#endif
+ t_simdata->comm = comm;
+ SIMIX_req_comm_wait(comm, timeout);
}
CATCH(e) {
t_simdata->isused = 0;
}
+
p_simdata->waiting_task = NULL;
#ifdef HAVE_TRACING
if (call_end)