simdata_task_t simdata = NULL;
simdata_process_t p_simdata;
e_smx_state_t comp_state;
+ MSG_error_t status = MSG_OK;
simdata = task->simdata;
CATCH(e) {
switch (e.category) {
case host_error:
- /* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
- simdata->comm = NULL;
- simdata->compute = NULL;
- #ifdef HAVE_TRACING
- TRACE_msg_task_execute_end(task);
- #endif
- MSG_RETURN(MSG_HOST_FAILURE);
+ status = MSG_HOST_FAILURE;
break;
case cancel_error:
/* action ended, set comm and compute = NULL, the actions is already destroyed in the main function */
#ifdef HAVE_TRACING
TRACE_msg_task_execute_end(task);
#endif
- MSG_RETURN(MSG_TASK_CANCELED);
+ status = MSG_TASK_CANCELED;
break;
default:
RETHROW;
TRACE_msg_task_execute_end(task);
#endif
- MSG_RETURN(MSG_OK);
+ MSG_RETURN(status);
}
MSG_error_t MSG_process_sleep(double nb_sec)
{
xbt_ex_t e;
+ MSG_error_t status = MSG_OK;
/*m_process_t proc = MSG_process_self();*/
#ifdef HAVE_TRACING
#ifdef HAVE_TRACING
TRACE_msg_process_sleep_out(MSG_process_self());
#endif
- MSG_RETURN(MSG_HOST_FAILURE);
- break;
+ status = MSG_HOST_FAILURE;
+ break;
default:
RETHROW;
}
xbt_ex_free(e);
}
+
#ifdef HAVE_TRACING
TRACE_msg_process_sleep_out(MSG_process_self());
#endif
- MSG_RETURN(MSG_OK);
+ MSG_RETURN(status);
}
/** \ingroup msg_task_usage