From: Marion Guthmuller Date: Wed, 25 Feb 2015 15:13:33 +0000 (+0100) Subject: model-checker : fix SIMCALL_MUTEX_LOCK with MC X-Git-Tag: v3_12~748 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/cc65d2b16b44aceb784687cf94626c7dca9423b4?hp=a883120fb94a2ec473ac6ecfba41a69ff1846426 model-checker : fix SIMCALL_MUTEX_LOCK with MC --- diff --git a/src/mc/mc_base.c b/src/mc/mc_base.c index 82ca8c6a4f..69e7e020f8 100644 --- a/src/mc/mc_base.c +++ b/src/mc/mc_base.c @@ -38,6 +38,7 @@ int MC_request_is_enabled(smx_simcall_t req) switch (req->call) { case SIMCALL_NONE: + case SIMCALL_MUTEX_LOCK: /* If MUTEX_LOCK is catched by the MC, it means that the mutex is locked by another process, thus the request shouldn't be enabled (loop until another process is executed) */ return FALSE; case SIMCALL_COMM_WAIT: diff --git a/src/mc/mc_config.c b/src/mc/mc_config.c index 5959b7f780..d52c95a84d 100644 --- a/src/mc/mc_config.c +++ b/src/mc/mc_config.c @@ -153,7 +153,6 @@ void _mc_cfg_cb_comms_determinism(const char *name, int pos) ("You are specifying a value to enable/disable the detection of determinism in the communications schemes after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry."); } _sg_mc_comms_determinism = xbt_cfg_get_boolean(_sg_cfg_set, name); - mc_reduce_kind = e_mc_reduce_none; } void _mc_cfg_cb_send_determinism(const char *name, int pos) @@ -163,7 +162,6 @@ void _mc_cfg_cb_send_determinism(const char *name, int pos) ("You are specifying a value to enable/disable the detection of send-determinism in the communications schemes after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry."); } _sg_mc_send_determinism = xbt_cfg_get_boolean(_sg_cfg_set, name); - mc_reduce_kind = e_mc_reduce_none; } void _mc_cfg_cb_termination(const char *name, int pos) @@ -173,7 +171,6 @@ void _mc_cfg_cb_termination(const char *name, int pos) ("You are specifying a value to enable/disable the detection of non progressive cycles after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry."); } _sg_mc_termination = xbt_cfg_get_boolean(_sg_cfg_set, name); - mc_reduce_kind = e_mc_reduce_none; } #endif diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index ca66d7bdb0..b700c10c97 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -332,6 +332,7 @@ void MC_do_the_modelcheck_for_real() if (_sg_mc_comms_determinism || _sg_mc_send_determinism) { XBT_INFO("Check communication determinism"); + mc_reduce_kind = e_mc_reduce_none; MC_modelcheck_comm_determinism_init(); } else if (!_sg_mc_property_file || _sg_mc_property_file[0] == '\0') { if(_sg_mc_termination){ @@ -339,7 +340,6 @@ void MC_do_the_modelcheck_for_real() mc_reduce_kind = e_mc_reduce_none; }else{ XBT_INFO("Check a safety property"); - mc_reduce_kind = e_mc_reduce_dpor; } MC_modelcheck_safety_init(); } else {