XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg, "Logging specific to MSG (gos)");
+SG_BEGIN_DECL()
+
/** \ingroup msg_task_usage
* \brief Executes a task and waits for its termination.
*
msg_error_t MSG_parallel_task_execute_with_timeout(msg_task_t task, double timeout)
{
simdata_task_t simdata = task->simdata;
- MsgActorExt* p_simdata = static_cast<MsgActorExt*>(SIMIX_process_self_get_data());
e_smx_state_t comp_state;
msg_error_t status = MSG_OK;
simcall_execution_start(task->name, simdata->flops_amount, simdata->priority, simdata->bound));
}
simcall_set_category(simdata->compute, task->category);
- p_simdata->waiting_action = simdata->compute;
comp_state = simcall_execution_wait(simdata->compute);
- p_simdata->waiting_action = nullptr;
simdata->setNotUsed();
XBT_DEBUG("Execution task '%s' finished in state %d", task->name, (int)comp_state);
/* Prepare the task to send */
t_simdata = task->simdata;
t_simdata->sender = myself;
- t_simdata->source = (static_cast<MsgActorExt*>(SIMIX_process_self_get_data()))->m_host;
+ t_simdata->source = MSG_host_self();
t_simdata->setUsed();
t_simdata->comm = nullptr;
msg_global->sent_msg++;
msg_error_t ret = MSG_OK;
simdata_task_t t_simdata = nullptr;
msg_process_t process = MSG_process_self();
- MsgActorExt* p_simdata = static_cast<MsgActorExt*>(process->data);
simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(alias);
int call_end = TRACE_msg_task_put_start(task); //must be after CHECK_HOST()
/* Prepare the task to send */
t_simdata = task->simdata;
t_simdata->sender = process;
- t_simdata->source = (static_cast<MsgActorExt*>(SIMIX_process_self_get_data()))->m_host;
+ t_simdata->source = MSG_host_self();
t_simdata->setUsed();
t_simdata->comm = nullptr;
msg_global->sent_msg++;
- p_simdata->waiting_task = task;
-
/* Try to send it by calling SIMIX network layer */
try {
smx_activity_t comm = nullptr; /* MC needs the comm to be set to nullptr during the simix call */
t_simdata->setNotUsed();
}
- p_simdata->waiting_task = nullptr;
if (call_end)
TRACE_msg_task_put_end();
return ret;
{
return task->category;
}
+
+SG_END_DECL()