From: Gabriel Corona Date: Thu, 7 Apr 2016 11:17:53 +0000 (+0200) Subject: [mc] Remove the client-side processing in simgrid::mc::handle_simcall() X-Git-Tag: v3_13~131 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7ba0fd48abab3f11773232e7ba9e0a7e2a6772c6?ds=sidebyside [mc] Remove the client-side processing in simgrid::mc::handle_simcall() --- diff --git a/src/mc/mc_base.cpp b/src/mc/mc_base.cpp index f68fc96a9b..cfd63caaa1 100644 --- a/src/mc/mc_base.cpp +++ b/src/mc/mc_base.cpp @@ -214,30 +214,3 @@ int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max) return prng_random(min, max); return simcall->mc_value; } - -namespace simgrid { -namespace mc { - -void handle_simcall(smx_simcall_t req, int value) -{ -#if !HAVE_MC - SIMIX_simcall_handle(req, value); -#else - if (mc_mode == MC_MODE_CLIENT) { - SIMIX_simcall_handle(req, value); - return; - } - - for (auto& pi : mc_model_checker->process().smx_process_infos) - if (req == &pi.copy.simcall) { - mc_model_checker->simcall_handle( - mc_model_checker->process(), pi.copy.pid, value); - return; - } - - xbt_die("Could not find the request"); -#endif -} - -} -} diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index 04b2773b47..0f882a25cf 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -115,6 +115,17 @@ void MC_run() namespace simgrid { namespace mc { +void handle_simcall(smx_simcall_t req, int value) +{ + for (auto& pi : mc_model_checker->process().smx_process_infos) + if (req == &pi.copy.simcall) { + mc_model_checker->simcall_handle( + mc_model_checker->process(), pi.copy.pid, value); + return; + } + xbt_die("Could not find the request"); +} + /** * \brief Re-executes from the state at position start all the transitions indicated by * a given model-checker stack. @@ -182,10 +193,8 @@ void replay(std::list> const& stack) call = MC_get_call_type(req); simgrid::mc::handle_simcall(req, value); - if (_sg_mc_comms_determinism || _sg_mc_send_determinism) MC_handle_comm_pattern(call, req, value, nullptr, 1); - mc_model_checker->wait_for_requests(); count++;