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)
- CRITICAL0
+ XBT_CRITICAL
("MSG_task_get() was asked to write in a non empty task struct.");
/* Try to receive it by calling SIMIX network layer */
TRY {
SIMIX_req_comm_recv(mailbox, task, NULL, NULL, NULL, timeout);
- DEBUG2("Got task %s from %p",(*task)->name,mailbox);
+ XBT_DEBUG("Got task %s from %p",(*task)->name,mailbox);
(*task)->simdata->isused=0;
}
CATCH(e) {
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();
#ifdef HAVE_TRACING
volatile smx_action_t comm = NULL;
int call_end = 0;
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;
msg_global->sent_msg++;
- process->simdata->waiting_task = task;
+
+ p_simdata->waiting_task = task;
/* Try to send it by calling SIMIX network layer */
TRY {
t_simdata->isused = 0;
}
- process->simdata->waiting_task = NULL;
+ p_simdata->waiting_task = NULL;
#ifdef HAVE_TRACING
if (call_end)
TRACE_msg_task_put_end();