X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/68bbe0a999c4d78d2ac27ed0b4bb325f4e6a3b03..36246161381665fecb9a5a074b081d8d712f94e6:/src/simix/smx_smurf.c diff --git a/src/simix/smx_smurf.c b/src/simix/smx_smurf.c index a5c10c9bc0..c873e2ca2c 100644 --- a/src/simix/smx_smurf.c +++ b/src/simix/smx_smurf.c @@ -90,6 +90,12 @@ int SIMIX_request_is_enabled(smx_req_t req) case REQ_COMM_WAIT: /* FIXME: check also that src and dst processes are not suspended */ + /* If there is a timeout it will be always enabled because, if the + * communication is not ready, it can timeout. + * This avoids false positives on dead-locks */ + if(req->comm_wait.timeout >= 0) + return TRUE; + act = req->comm_wait.comm; return (act->comm.src_proc && act->comm.dst_proc); break; @@ -103,11 +109,6 @@ int SIMIX_request_is_enabled(smx_req_t req) return FALSE; break; - case REQ_COMM_TEST: - act = req->comm_test.comm; - return (act->comm.src_proc && act->comm.dst_proc); - break; - default: return TRUE; } @@ -135,7 +136,7 @@ int SIMIX_request_is_enabled_by_idx(smx_req_t req, unsigned int idx) } } -void SIMIX_request_pre(smx_req_t req, unsigned int value) +void SIMIX_request_pre(smx_req_t req, int value) { switch (req->call) { case REQ_NO_REQ: