From: Martin Quinson Date: Mon, 17 Jul 2017 22:44:01 +0000 (+0200) Subject: cosmetics and comments X-Git-Tag: v3_17~371 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bd19e36b929625721465a14a73dc7b5299a0c7ca cosmetics and comments --- diff --git a/src/mc/mc_base.cpp b/src/mc/mc_base.cpp index e567c57397..f84aad4cb6 100644 --- a/src/mc/mc_base.cpp +++ b/src/mc/mc_base.cpp @@ -33,17 +33,16 @@ namespace mc { void wait_for_requests() { #if SIMGRID_HAVE_MC - xbt_assert(mc_model_checker == nullptr); + xbt_assert(mc_model_checker == nullptr, "This must be called from the client"); #endif smx_actor_t process; - smx_simcall_t req; unsigned int iter; while (not xbt_dynar_is_empty(simix_global->process_to_run)) { SIMIX_process_runall(); xbt_dynar_foreach(simix_global->process_that_ran, iter, process) { - req = &process->simcall; + smx_simcall_t req = &process->simcall; if (req->call != SIMCALL_NONE && not simgrid::mc::request_is_visible(req)) SIMIX_simcall_handle(req, 0); } @@ -193,8 +192,12 @@ bool actor_is_enabled(smx_actor_t actor) } } +/* This is the list of requests that are visible from the checker algorithm. + * Any other requests are handled right away on the application side. + */ bool request_is_visible(smx_simcall_t req) { + xbt_assert(mc_model_checker == nullptr, "This should be called from the client side"); return req->call == SIMCALL_COMM_ISEND || req->call == SIMCALL_COMM_IRECV || req->call == SIMCALL_COMM_WAIT diff --git a/src/mc/mc_base.h b/src/mc/mc_base.h index 54a209bf57..798dbbab41 100644 --- a/src/mc/mc_base.h +++ b/src/mc/mc_base.h @@ -39,10 +39,7 @@ XBT_PRIVATE void handle_simcall(smx_simcall_t req, int req_num); */ XBT_PRIVATE bool actor_is_enabled(smx_actor_t process); -/** Check if the given simcall is visible - * - * \return `TRUE` or `FALSE` - */ +/** Check if the given simcall is visible */ XBT_PRIVATE bool request_is_visible(smx_simcall_t req); }