Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use s4u API in example.
[simgrid.git] / src / mc / mc_checkpoint.cpp
index 055a4ee..abd51e2 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "src/internal_config.h"
 #include "src/mc/mc_private.hpp"
-#include "src/smpi/include/private.h"
+#include "src/smpi/include/private.hpp"
 #include "xbt/mmalloc.h"
 #include "xbt/module.h"
 
@@ -60,11 +60,6 @@ namespace mc {
 static void restore(mc_mem_region_t region)
 {
   switch(region->storage_type()) {
-  case simgrid::mc::StorageType::NoData:
-  default:
-    xbt_die("Storage type not supported");
-    break;
-
   case simgrid::mc::StorageType::Flat:
     mc_model_checker->process().write_bytes(region->flat_data().get(),
       region->size(), region->permanent_address());
@@ -78,6 +73,10 @@ static void restore(mc_mem_region_t region)
     for (auto& p : region->privatized_data())
       restore(&p);
     break;
+
+  default: // includes StorageType::NoData
+    xbt_die("Storage type not supported");
+    break;
   }
 }
 
@@ -278,10 +277,8 @@ static bool valid_variable(simgrid::mc::Variable* var,
     return true;
 }
 
-static void fill_local_variables_values(mc_stack_frame_t stack_frame,
-                                           simgrid::mc::Frame* scope,
-                                           int process_index,
-                                           std::vector<s_local_variable>& result)
+static void fill_local_variables_values(mc_stack_frame_t stack_frame, simgrid::mc::Frame* scope, int process_index,
+                                        std::vector<s_local_variable_t>& result)
 {
   simgrid::mc::RemoteClient* process = &mc_model_checker->process();
 
@@ -335,10 +332,10 @@ static void fill_local_variables_values(mc_stack_frame_t stack_frame,
       stack_frame, &nested_scope, process_index, result);
 }
 
-static std::vector<s_local_variable> get_local_variables_values(
-  std::vector<s_mc_stack_frame_t>& stack_frames, int process_index)
+static std::vector<s_local_variable_t> get_local_variables_values(std::vector<s_mc_stack_frame_t>& stack_frames,
+                                                                  int process_index)
 {
-  std::vector<s_local_variable> variables;
+  std::vector<s_local_variable_t> variables;
   for (s_mc_stack_frame_t& stack_frame : stack_frames)
     fill_local_variables_values(&stack_frame, stack_frame.frame, process_index, variables);
   return variables;