void _mc_cfg_cb_reduce(const char *name, int pos);
void _mc_cfg_cb_checkpoint(const char *name, int pos);
void _mc_cfg_cb_property(const char *name, int pos);
+void _mc_cfg_cb_timeout(const char *name, int pos);
XBT_PUBLIC(void) MC_do_the_modelcheck_for_real(void);
xbt_cfg_set_int(_surf_cfg_set,"model-check",1);
}
+void _mc_cfg_cb_timeout(const char *name, int pos) {
+ if (_surf_init_status && !_surf_do_model_check) {
+ xbt_die("You are specifying a value to enable/disable timeout for wait requests 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.");
+ }
+ _surf_mc_timeout= xbt_cfg_get_int(_surf_cfg_set, name);
+ xbt_cfg_set_int(_surf_cfg_set,"model-check",1);
+}
+
/* MC global data structures */
extern int _surf_mc_checkpoint;
extern char* _surf_mc_property_file;
+extern int _surf_mc_timeout;
/****** Core dump ******/
"Specify the kind of exploration reduction (either none or DPOR)",
xbt_cfgelm_string, &default_value, 0, 1,
_mc_cfg_cb_reduce, NULL);
+
+ /* Enable/disable timeout for wait requests with model-checking */
+ default_value_int = 1;
+ xbt_cfg_register(&_surf_cfg_set, "model-check/timeout",
+ "Enable/Disable timeout for wait requests",
+ xbt_cfgelm_int, &default_value, 0, 1,
+ _mc_cfg_cb_timeout, NULL);
#endif
/* do verbose-exit */
int _surf_do_model_check = 0;
int _surf_mc_checkpoint=0;
char* _surf_mc_property_file=NULL;
+int _surf_mc_timeout=0;
/* Declare xbt_preinit and xbt_postexit as constructor/destructor of the library.
* This is crude and rather compiler-specific, unfortunately.