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 af70041b231fbccbba9f109a8c4b282267e4a022..41bfbe0eaa5679d77faa111502833205c936e540 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 78903d336832bb7439d4a8ab61799dd48f2ceed5..89db3335998db371dc3ecced1a840086ac4fa9e6 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 a74147be4bbe7e068a9ddd05a58ff459ccb1a7c8..c8c4b89ac2910abd7024b531ea1bed5e97187faa 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());