X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=datarace.h;h=1cdf8c7023e37350c533bb334075dd98244ef002;hb=HEAD;hp=67d58e7c3c12cd46387391c132c62a945b911685;hpb=a9e77155aee17d9e66603f970a964bee83f62248;p=c11tester.git diff --git a/datarace.h b/datarace.h index 67d58e7c..1cdf8c70 100644 --- a/datarace.h +++ b/datarace.h @@ -43,11 +43,31 @@ struct DataRace { #define MASK16BIT 0xffff void initRaceDetector(); -void raceCheckWrite(thread_id_t thread, void *location); -void raceCheckRead(thread_id_t thread, const void *location); +void atomraceCheckWrite(thread_id_t thread, void *location); +void atomraceCheckRead(thread_id_t thread, const void *location); void recordWrite(thread_id_t thread, void *location); -bool checkDataRaces(); +void recordCalloc(void *location, size_t size); void assert_race(struct DataRace *race); +bool hasNonAtomicStore(const void *location); +void setAtomicStoreFlag(const void *location); +void getStoreThreadAndClock(const void *address, thread_id_t * thread, modelclock_t * clock); + +void raceCheckRead8(thread_id_t thread, const void *location); +void raceCheckRead16(thread_id_t thread, const void *location); +void raceCheckRead32(thread_id_t thread, const void *location); +void raceCheckRead64(thread_id_t thread, const void *location); + +void raceCheckWrite8(thread_id_t thread, const void *location); +void raceCheckWrite16(thread_id_t thread, const void *location); +void raceCheckWrite32(thread_id_t thread, const void *location); +void raceCheckWrite64(thread_id_t thread, const void *location); + +void raceCheckWriteMemop(thread_id_t thread, const void *location, size_t size); +void raceCheckReadMemop(thread_id_t thread, const void *location, size_t size); + +#ifdef COLLECT_STAT +void print_normal_accesses(); +#endif /** * @brief A record of information for detecting data races @@ -99,6 +119,9 @@ bool race_equals(struct DataRace *r1, struct DataRace *r2); #define MAXREADVECTOR (READMASK-1) #define MAXWRITEVECTOR (WRITEMASK-1) +#define INVALIDSHADOWVAL 0x2ULL +#define CHECKBOUNDARY(location, bits) ((((uintptr_t)location & MASK16BIT) + bits) <= MASK16BIT) + typedef HashSet RaceSet; #endif /* __DATARACE_H__ */