A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Translate the executed TestAny and WaitAny requests into Test and Wait ones.
[simgrid.git]
/
src
/
simix
/
smx_smurf.c
diff --git
a/src/simix/smx_smurf.c
b/src/simix/smx_smurf.c
index
a5c10c9
..
c873e2c
100644
(file)
--- 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 */
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;
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;
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;
}
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:
{
switch (req->call) {
case REQ_NO_REQ: