X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d2bb33858171f062e6bd6abd3d6982d37cd51de9..d034a28c8e76a4f17219f931ef95382572225c4b:/src/simix/smx_smurf.c diff --git a/src/simix/smx_smurf.c b/src/simix/smx_smurf.c index a5c10c9bc0..a80a17fb99 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; }