X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=datarace.h;h=34bfd4067dc99ad591a21d1ca621ca5498f0ff67;hp=c78f5a424929d89d3cedc805006f1b401790a211;hb=25d73096cfc14c655f94b01bb235cc5efd1d5696;hpb=91579dadd25579b9aa7e1dd7a537892c9b1e9311 diff --git a/datarace.h b/datarace.h index c78f5a42..34bfd406 100644 --- a/datarace.h +++ b/datarace.h @@ -44,14 +44,31 @@ struct DataRace { void initRaceDetector(); void raceCheckWrite(thread_id_t thread, void *location); +void atomraceCheckWrite(thread_id_t thread, void *location); void raceCheckRead(thread_id_t thread, const 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); + +#ifdef COLLECT_STAT +void print_normal_accesses(); +#endif + /** * @brief A record of information for detecting data races */ @@ -102,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__ */