Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove useless extern "C" around logging categories
[simgrid.git] / src / mc / mc_compare.cpp
index 634402e..8aaaefb 100644 (file)
@@ -23,7 +23,7 @@
 #include "src/mc/ObjectInformation.hpp"
 #include "src/mc/Variable.hpp"
 
-#ifdef HAVE_SMPI
+#if HAVE_SMPI
 #include "src/smpi/private.h"
 #endif
 
 
 using simgrid::mc::remote;
 
-extern "C" {
-
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, xbt,
                                 "Logging specific to mc_compare in mc");
 
-}
-
 namespace simgrid {
 namespace mc {
 
@@ -236,7 +232,7 @@ static int compare_global_variables(simgrid::mc::ObjectInformation* object_info,
 {
   xbt_assert(r1 && r2, "Missing region.");
 
-#ifdef HAVE_SMPI
+#if HAVE_SMPI
   if (r1->storage_type() == simgrid::mc::StorageType::Privatized) {
     xbt_assert(process_index >= 0);
     if (r2->storage_type() != simgrid::mc::StorageType::Privatized)
@@ -359,20 +355,20 @@ int snapshot_compare(void *state1, void *state2)
   int num1, num2;
 
   if (_sg_mc_liveness) {        /* Liveness MC */
-    s1 = ((mc_visited_pair_t) state1)->graph_state->system_state;
-    s2 = ((mc_visited_pair_t) state2)->graph_state->system_state;
-    num1 = ((mc_visited_pair_t) state1)->num;
-    num2 = ((mc_visited_pair_t) state2)->num;
+    s1 = ((simgrid::mc::VisitedPair*) state1)->graph_state->system_state;
+    s2 = ((simgrid::mc::VisitedPair*) state2)->graph_state->system_state;
+    num1 = ((simgrid::mc::VisitedPair*) state1)->num;
+    num2 = ((simgrid::mc::VisitedPair*) state2)->num;
   }else if (_sg_mc_termination) { /* Non-progressive cycle MC */
     s1 = ((mc_state_t) state1)->system_state;
     s2 = ((mc_state_t) state2)->system_state;
     num1 = ((mc_state_t) state1)->num;
     num2 = ((mc_state_t) state2)->num;
   } else {                      /* Safety or comm determinism MC */
-    s1 = ((mc_visited_state_t) state1)->system_state;
-    s2 = ((mc_visited_state_t) state2)->system_state;
-    num1 = ((mc_visited_state_t) state1)->num;
-    num2 = ((mc_visited_state_t) state2)->num;
+    s1 = ((simgrid::mc::VisitedState*) state1)->system_state;
+    s2 = ((simgrid::mc::VisitedState*) state2)->system_state;
+    num1 = ((simgrid::mc::VisitedState*) state1)->num;
+    num2 = ((simgrid::mc::VisitedState*) state2)->num;
   }
 
   int errors = 0;