From: Arnaud Giersch Date: Sun, 8 May 2011 08:10:46 +0000 (+0200) Subject: Change the handling of SIMIX requests in model checker too. X-Git-Tag: v3_6_rc3~63 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/627ead2c22ce3a0522bdfca1eb58123df7bc8413 Change the handling of SIMIX requests in model checker too. --- diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 48b6872b05..9fcb58c087 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -76,15 +76,23 @@ int MC_random(int min, int max) */ void MC_wait_for_requests(void) { - smx_req_t req = NULL; + smx_process_t process; + smx_req_t req; + unsigned int iter; - do { + while (xbt_dynar_length(simix_global->process_to_run)) { SIMIX_context_runall(simix_global->process_to_run); - while((req = SIMIX_request_pop())){ - if(!MC_request_is_visible(req)) - SIMIX_request_pre(req, 0); + + xbt_dynar_t tmp = simix_global->process_that_ran; + simix_global->process_that_ran = simix_global->process_to_run; + simix_global->process_to_run = tmp; + xbt_dynar_reset(simix_global->process_to_run); + xbt_dynar_foreach(simix_global->process_that_ran, iter, process) { + req = &process->request; + if (req->call != REQ_NO_REQ && !MC_request_is_visible(req)) + SIMIX_request_pre(req, 0); } - } while (xbt_dynar_length(simix_global->process_to_run)); + } } int MC_deadlock_check()