m_process_t self = MSG_process_self();
e_surf_action_state_t state = SURF_ACTION_NOT_IN_THE_SYSTEM;
CHECK_HOST();
+
+ simdata = task->simdata;
+
+ xbt_assert0(simdata->host_nb==0, "This is a parallel task. Go to hell.");
+
#ifdef HAVE_TRACING
TRACE_msg_task_execute_start (task);
#endif
- simdata = task->simdata;
-
xbt_assert1((!simdata->compute) && (task->simdata->refcount == 1),
"This task is executed somewhere else. Go fix your code! %d", task->simdata->refcount);
t_simdata->refcount++;
msg_global->sent_msg++;
-
process->simdata->waiting_task = task;
/* Send it by calling SIMIX network layer */
int MSG_comm_test(msg_comm_t comm) {
return SIMIX_network_test(comm);
}
-MSG_error_t MSG_comm_wait(msg_comm_t comm,double timeout) {
+
+MSG_error_t MSG_comm_wait(msg_comm_t comm, double timeout) {
xbt_ex_t e;
MSG_error_t res = MSG_OK;
TRY {
SIMIX_network_wait(comm,timeout);
- // (*task)->simdata->refcount--;
+
+ if(!(comm->src_proc == SIMIX_process_self()))
+ {
+ m_task_t task;
+ task = (m_task_t) SIMIX_communication_get_src_buf(comm);
+ task->simdata->refcount--;
+ }
/* FIXME: these functions are not tracable */
} CATCH(e){