Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move process info in a new s_mc_process_t structure
[simgrid.git] / src / mc / mc_ignore.c
index 13cab5e..9f3a0a7 100644 (file)
@@ -175,27 +175,27 @@ void MC_remove_ignore_heap(void *address, size_t size)
 
 void MC_ignore_global_variable(const char *name)
 {
-
+  mc_process_t process = &mc_model_checker->process;
   int raw_mem_set = (mmalloc_get_current_heap() == mc_heap);
 
   MC_SET_MC_HEAP;
 
-  xbt_assert(mc_libsimgrid_info, "MC subsystem not initialized");
+  xbt_assert(process->libsimgrid_info, "MC subsystem not initialized");
 
   unsigned int cursor = 0;
   dw_variable_t current_var;
   int start = 0;
-  int end = xbt_dynar_length(mc_libsimgrid_info->global_variables) - 1;
+  int end = xbt_dynar_length(process->libsimgrid_info->global_variables) - 1;
 
   while (start <= end) {
     cursor = (start + end) / 2;
     current_var =
-        (dw_variable_t) xbt_dynar_get_as(mc_libsimgrid_info->global_variables,
+        (dw_variable_t) xbt_dynar_get_as(process->libsimgrid_info->global_variables,
                                          cursor, dw_variable_t);
     if (strcmp(current_var->name, name) == 0) {
-      xbt_dynar_remove_at(mc_libsimgrid_info->global_variables, cursor, NULL);
+      xbt_dynar_remove_at(process->libsimgrid_info->global_variables, cursor, NULL);
       start = 0;
-      end = xbt_dynar_length(mc_libsimgrid_info->global_variables) - 1;
+      end = xbt_dynar_length(process->libsimgrid_info->global_variables) - 1;
     } else if (strcmp(current_var->name, name) < 0) {
       start = cursor + 1;
     } else {
@@ -285,6 +285,8 @@ static void MC_ignore_local_variable_in_object(const char *var_name,
 
 void MC_ignore_local_variable(const char *var_name, const char *frame_name)
 {
+  mc_process_t process = &mc_model_checker->process;
+
 
   int raw_mem_set = (mmalloc_get_current_heap() == mc_heap);
 
@@ -293,9 +295,9 @@ void MC_ignore_local_variable(const char *var_name, const char *frame_name)
 
   MC_SET_MC_HEAP;
 
-  MC_ignore_local_variable_in_object(var_name, frame_name, mc_libsimgrid_info);
+  MC_ignore_local_variable_in_object(var_name, frame_name, process->libsimgrid_info);
   if (frame_name != NULL)
-    MC_ignore_local_variable_in_object(var_name, frame_name, mc_binary_info);
+    MC_ignore_local_variable_in_object(var_name, frame_name, process->binary_info);
 
   if (!raw_mem_set)
     MC_SET_STD_HEAP;