X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ba9a4cfeba4eb00e84cd17603fc9654e81445655..340cf8df326e4bbb67c046172f8a73eecc6a3583:/src/mc/mc_comm_determinism.cpp?ds=sidebyside diff --git a/src/mc/mc_comm_determinism.cpp b/src/mc/mc_comm_determinism.cpp index 1be100a433..d499d1b8b6 100644 --- a/src/mc/mc_comm_determinism.cpp +++ b/src/mc/mc_comm_determinism.cpp @@ -302,7 +302,6 @@ static int MC_modelcheck_comm_determinism_main(void); static void MC_pre_modelcheck_comm_determinism(void) { mc_state_t initial_state = nullptr; - smx_process_t process; int i; const int maxpid = MC_smx_get_maxpid(); @@ -333,11 +332,9 @@ static void MC_pre_modelcheck_comm_determinism(void) mc_model_checker->wait_for_requests(); /* Get an enabled process and insert it in the interleave set of the initial state */ - MC_EACH_SIMIX_PROCESS(process, - if (MC_process_is_enabled(process)) { - MC_state_interleave_process(initial_state, process); - } - ); + for (auto& p : mc_model_checker->process().simix_processes()) + if (MC_process_is_enabled(&p.copy)) + MC_state_interleave_process(initial_state, &p.copy); xbt_fifo_unshift(mc_stack, initial_state); } @@ -349,7 +346,6 @@ static int MC_modelcheck_comm_determinism_main(void) int value; mc_visited_state_t visited_state = nullptr; smx_simcall_t req = nullptr; - smx_process_t process = nullptr; mc_state_t state = nullptr, next_state = NULL; while (xbt_fifo_size(mc_stack) > 0) { @@ -403,11 +399,9 @@ static int MC_modelcheck_comm_determinism_main(void) if ((visited_state = is_visited_state(next_state)) == nullptr) { /* Get enabled processes and insert them in the interleave set of the next state */ - MC_EACH_SIMIX_PROCESS(process, - if (MC_process_is_enabled(process)) { - MC_state_interleave_process(next_state, process); - } - ); + for (auto& p : mc_model_checker->process().simix_processes()) + if (MC_process_is_enabled(&p.copy)) + MC_state_interleave_process(next_state, &p.copy); if (dot_output != nullptr) fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num, next_state->num, req_str);