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 = (static_cast<MsgActorExt*>(SIMIX_process_self_get_data()))->host_;
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 = (static_cast<MsgActorExt*>(SIMIX_process_self_get_data()))->host_;
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;
class MsgActorExt {
public:
- msg_host_t m_host; /* the host on which the process is running */
- smx_activity_t waiting_action = nullptr;
- msg_task_t waiting_task = nullptr;
- msg_error_t last_errno = MSG_OK; /* the last value returned by a MSG_function */
-
+ msg_host_t host_; /* the host on which the process is running */
+ msg_error_t errno_ = MSG_OK; /* the last value returned by a MSG_function */
void* data = nullptr; /* user data */
};
MsgActorExt* simdata = new MsgActorExt();
/* Simulator data for MSG */
- simdata->m_host = host;
+ simdata->host_ = host;
simdata->data = data;
/* Let's create the process: SIMIX may decide to start it right now,
MsgActorExt* msgExt = new MsgActorExt();
/* Simulator data for MSG */
- msgExt->m_host = host;
+ msgExt->host_ = host;
msgExt->data = data;
/* Let's create the process: SIMIX may decide to start it right now, even before returning the flow control to us */
msg_error_t MSG_process_migrate(msg_process_t process, msg_host_t host)
{
MsgActorExt* msgExt = (MsgActorExt*)process->data;
- msgExt->m_host = host;
- msg_host_t now = msgExt->m_host;
+ msgExt->host_ = host;
+ msg_host_t now = msgExt->host_;
TRACE_msg_process_change_host(process, now, host);
simcall_process_set_host(process, host);
return MSG_OK;
else {
msgExt = (MsgActorExt*)process->data;
}
- return msgExt ? msgExt->m_host : nullptr;
+ return msgExt ? msgExt->host_ : nullptr;
}
/** \ingroup m_process_management