X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=datarace.h;h=7c24b6d56c1b400a311b0eaae5ef32e9ad0e8c31;hb=262fab229626c8504297467fc7b5a04f60b7c530;hp=5bfcb8ad48cc98d007612805c2cc48567dedf984;hpb=7c003db5218470054490a6777c97c6611b933a12;p=model-checker.git diff --git a/datarace.h b/datarace.h index 5bfcb8a..7c24b6d 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" +#include "stl-model.h" + +/* Forward declaration */ +class ClockVector; +class ModelAction; struct ShadowTable { void * array[65536]; @@ -32,18 +36,18 @@ 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; +extern SnapVector unrealizedraces; /** Basic encoding idea: * (void *) Either: