XBT_PUBLIC(double) SIMIX_req_host_execution_get_remains(smx_action_t execution);
XBT_PUBLIC(e_smx_state_t) SIMIX_req_host_execution_get_state(smx_action_t execution);
XBT_PUBLIC(void) SIMIX_req_host_execution_set_priority(smx_action_t execution, double priority);
-XBT_PUBLIC(void) SIMIX_req_host_execution_wait(smx_action_t execution);
+XBT_PUBLIC(e_smx_state_t) SIMIX_req_host_execution_wait(smx_action_t execution);
/**************************** Process Requests ********************************/
{
simdata_task_t simdata = NULL;
m_process_t self = MSG_process_self();
+ e_smx_state_t comp_state;
CHECK_HOST();
simdata = task->simdata;
#endif
self->simdata->waiting_action = simdata->compute;
- SIMIX_req_host_execution_wait(simdata->compute);
+ comp_state = SIMIX_req_host_execution_wait(simdata->compute);
self->simdata->waiting_action = NULL;
simdata->isused=0;
- DEBUG2("Execution task '%s' finished in state %d", task->name, SIMIX_req_host_execution_get_state(task->simdata->compute));
- if (SIMIX_req_host_execution_get_state(task->simdata->compute) == SIMIX_DONE) {
+ DEBUG2("Execution task '%s' finished in state %d", task->name, comp_state);
+ if (comp_state == SIMIX_DONE) {
/* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
SIMIX_req_host_execution_destroy(task->simdata->compute);
simdata->computation_amount = 0.0;
*
* \param execution The execution action
*/
-void SIMIX_req_host_execution_wait(smx_action_t execution)
+e_smx_state_t SIMIX_req_host_execution_wait(smx_action_t execution)
{
smx_req_t req = SIMIX_req_mine();
req->call = REQ_HOST_EXECUTION_WAIT;
req->host_execution_wait.execution = execution;
SIMIX_request_push();
+ return req->host_execution_wait.result;
}
/**