From 1c99636ddba1ba34a07f2ac4b0b58a5e7f1afb72 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Mon, 4 Apr 2016 12:15:41 +0200 Subject: [PATCH] [mc] Different/private mc_stack variables for SafetyChecker and LivenessChecker --- src/mc/CommunicationDeterminismChecker.cpp | 2 ++ src/mc/SafetyChecker.cpp | 7 +++++++ src/mc/mc_global.cpp | 1 - src/mc/mc_private.h | 7 ------- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/mc/CommunicationDeterminismChecker.cpp b/src/mc/CommunicationDeterminismChecker.cpp index b30b312d48..1f5f320704 100644 --- a/src/mc/CommunicationDeterminismChecker.cpp +++ b/src/mc/CommunicationDeterminismChecker.cpp @@ -28,6 +28,8 @@ using simgrid::mc::remote; XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_comm_determinism, mc, "Logging specific to MC communication determinism detection"); +XBT_PRIVATE static xbt_fifo_t mc_stack; + /********** Global variables **********/ xbt_dynar_t initial_communications_pattern; diff --git a/src/mc/SafetyChecker.cpp b/src/mc/SafetyChecker.cpp index 9848af70fd..42fd716338 100644 --- a/src/mc/SafetyChecker.cpp +++ b/src/mc/SafetyChecker.cpp @@ -30,6 +30,13 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_safety, mc, "Logging specific to MC safety verification "); +/** Stack (of `simgrid::mc::State*`) representing the current position of the + * the MC in the exploration graph + * + * It is managed by its head (`xbt_fifo_shift` and `xbt_fifo_unshift`). + */ +XBT_PRIVATE static xbt_fifo_t mc_stack; + namespace simgrid { namespace mc { diff --git a/src/mc/mc_global.cpp b/src/mc/mc_global.cpp index 6e9b7b6683..de449bfe3f 100644 --- a/src/mc/mc_global.cpp +++ b/src/mc/mc_global.cpp @@ -61,7 +61,6 @@ simgrid::mc::State* mc_current_state = nullptr; char mc_replay_mode = false; mc_stats_t mc_stats = nullptr; -xbt_fifo_t mc_stack = nullptr; /* Liveness */ diff --git a/src/mc/mc_private.h b/src/mc/mc_private.h index c3ea760ff2..1e82bbea6c 100644 --- a/src/mc/mc_private.h +++ b/src/mc/mc_private.h @@ -68,13 +68,6 @@ XBT_PRIVATE extern int user_max_depth_reached; XBT_PRIVATE void MC_replay(xbt_fifo_t stack); XBT_PRIVATE void MC_show_deadlock(void); -/** Stack (of `simgrid::mc::State*`) representing the current position of the - * the MC in the exploration graph - * - * It is managed by its head (`xbt_fifo_shift` and `xbt_fifo_unshift`). - */ -XBT_PRIVATE extern xbt_fifo_t mc_stack; - /****************************** Statistics ************************************/ typedef struct mc_stats { -- 2.20.1