From: Brian Norris Date: Wed, 17 Apr 2013 20:15:30 +0000 (-0700) Subject: datarace: don't export unrealized race vector X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=commitdiff_plain;h=133e215362162a6146b51fe9ac4eec749cc3c6c5 datarace: don't export unrealized race vector --- diff --git a/datarace.cc b/datarace.cc index af70041..41bfbe0 100644 --- a/datarace.cc +++ b/datarace.cc @@ -8,9 +8,10 @@ #include "config.h" #include "action.h" #include "execution.h" +#include "stl-model.h" static struct ShadowTable *root; -SnapVector unrealizedraces; +static SnapVector 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(); +} diff --git a/datarace.h b/datarace.h index 78903d3..89db333 100644 --- a/datarace.h +++ b/datarace.h @@ -6,10 +6,8 @@ #include "config.h" #include #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 unrealizedraces; +bool haveUnrealizedRaces(); /** * @brief A record of information for detecting data races diff --git a/execution.cc b/execution.cc index a74147b..c8c4b89 100644 --- a/execution.cc +++ b/execution.cc @@ -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());