X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=datarace.h;h=d1f91b2057e2f98834f633766a71963dfa632187;hb=3b08bb3248c8f63fc1c54da23da471cab0fe7239;hp=5bfcb8ad48cc98d007612805c2cc48567dedf984;hpb=c5b57f3d98d1d14b4546995a0882753cf71a1c4b;p=model-checker.git diff --git a/datarace.h b/datarace.h index 5bfcb8a..d1f91b2 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,16 +36,16 @@ 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 raceCheckRead(thread_id_t thread, const void *location, ClockVector *currClock); bool checkDataRaces(); -void printRace(struct DataRace *race); +void assert_race(struct DataRace *race); extern std::vector unrealizedraces;