datarace: don't export unrealized race vector
authorBrian Norris <banorris@uci.edu>
Wed, 17 Apr 2013 20:15:30 +0000 (13:15 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 17 Apr 2013 20:26:07 +0000 (13:26 -0700)
datarace.cc
datarace.h
execution.cc

index af70041..41bfbe0 100644 (file)
@@ -8,9 +8,10 @@
 #include "config.h"
 #include "action.h"
 #include "execution.h"
+#include "stl-model.h"
 
 static struct ShadowTable *root;
-SnapVector<struct DataRace *> unrealizedraces;
+static SnapVector<DataRace *> unrealizedraces;
 static void *memory_base;
 static void *memory_top;
 
@@ -354,3 +355,8 @@ void raceCheckRead(thread_id_t thread, const void *location)
 
        *shadow = ENCODEOP(threadid, ourClock, id_to_int(writeThread), writeClock);
 }
+
+bool haveUnrealizedRaces()
+{
+       return !unrealizedraces.empty();
+}
index 78903d3..89db333 100644 (file)
@@ -6,10 +6,8 @@
 #include "config.h"
 #include <stdint.h>
 #include "modeltypes.h"
-#include "stl-model.h"
 
 /* Forward declaration */
-class ClockVector;
 class ModelAction;
 
 struct ShadowTable {
@@ -46,8 +44,7 @@ void raceCheckWrite(thread_id_t thread, void *location);
 void raceCheckRead(thread_id_t thread, const void *location);
 bool checkDataRaces();
 void assert_race(struct DataRace *race);
-
-extern SnapVector<struct DataRace *> unrealizedraces;
+bool haveUnrealizedRaces();
 
 /**
  * @brief A record of information for detecting data races
index a74147b..c8c4b89 100644 (file)
@@ -2816,7 +2816,7 @@ void ModelExecution::fixup_release_sequences()
 {
        while (!pending_rel_seqs.empty() &&
                        is_feasible_prefix_ignore_relseq() &&
-                       !unrealizedraces.empty()) {
+                       haveUnrealizedRaces()) {
                model_print("*** WARNING: release sequence fixup action "
                                "(%zu pending release seuqence(s)) ***\n",
                                pending_rel_seqs.size());