From: cristianrosa Date: Wed, 26 Jan 2011 13:53:53 +0000 (+0000) Subject: Bugfix: do not use the action state to determine the result of TEST requests when... X-Git-Tag: v3.6_beta2~430 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/448f6dc9acd8c69e31ba8a74fb315712dbffc427?hp=3e2d38c807f62cd66fe31885811a975cb38de7cb Bugfix: do not use the action state to determine the result of TEST requests when running in MC mode. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9499 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 5a1d6036f3..641fac3e4e 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -362,8 +362,20 @@ void SIMIX_pre_comm_wait(smx_req_t req, int idx) void SIMIX_pre_comm_test(smx_req_t req) { smx_action_t action = req->comm_test.comm; - req->comm_test.result = (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING); + if(MC_IS_ENABLED){ + req->comm_test.result = action->comm.src_proc && action->comm.dst_proc; + if(req->comm_test.result){ + action->state = SIMIX_DONE; + xbt_fifo_push(action->request_list, req); + SIMIX_comm_finish(action); + }else{ + SIMIX_request_answer(req); + } + return; + } + + req->comm_test.result = (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING); if (req->comm_test.result) { xbt_fifo_push(action->request_list, req); SIMIX_comm_finish(action);