Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : move creation of initial_state_liveness in MC_init_liveness
[simgrid.git] / src / mc / mc_global.c
index e7a8de6..4dce104 100644 (file)
@@ -55,6 +55,14 @@ void _mc_cfg_cb_property(const char *name, int pos) {
   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 */
 
@@ -194,6 +202,8 @@ void MC_init_liveness(){
   xbt_dict_t libsimgrid_location_list = MC_get_location_list(ls_path);
   MC_get_local_variables(ls_path, libsimgrid_location_list, &mc_local_variables);
 
+  initial_state_liveness = xbt_new0(s_mc_global_t, 1);
+
   MC_UNSET_RAW_MEM;
 
   MC_init_memory_map_info();
@@ -785,7 +795,7 @@ void MC_ignore_stack(const char *var_name, const char *frame){
 
 }
 
-void MC_new_stack_area(void *stack, char *name, void* context){
+void MC_new_stack_area(void *stack, char *name, void* context, size_t size){
 
   raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
 
@@ -798,6 +808,7 @@ void MC_new_stack_area(void *stack, char *name, void* context){
   region->address = stack;
   region->process_name = strdup(name);
   region->context = context;
+  region->size = size;
   xbt_dynar_push(stacks_areas, &region);
   
   MC_UNSET_RAW_MEM;