X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=datarace.h;h=2fb1a7f927f015628953fbf2504c20fdd133e65a;hb=dd56df466206a5f34f1d9b1777d1f076f7c33e0f;hp=b2f709911ecff2274596ed11f7c5338365ee57e7;hpb=0accacf66b9f7bb4479205a0840f208dd8da6960;p=model-checker.git diff --git a/datarace.h b/datarace.h index b2f7099..2fb1a7f 100644 --- a/datarace.h +++ b/datarace.h @@ -5,8 +5,12 @@ #ifndef DATARACE_H #include "config.h" #include -#include "clockvector.h" #include +#include "modeltypes.h" + +/* Forward declaration */ +class ClockVector; +class ModelAction; struct ShadowTable { void * array[65536]; @@ -32,15 +36,15 @@ struct DataRace { bool isnewwrite; /* Address of data race. */ - void *address; + const void *address; }; #define MASK16BIT 0xffff void initRaceDetector(); void raceCheckWrite(thread_id_t thread, void *location, ClockVector *currClock); -void raceCheckRead(thread_id_t thread, void *location, ClockVector *currClock); -void checkDataRaces(); +void raceCheckRead(thread_id_t thread, const void *location, ClockVector *currClock); +bool checkDataRaces(); void printRace(struct DataRace *race); extern std::vector unrealizedraces;