fix mutex_trylock bug
[c11tester.git] / datarace.h
index a9bc92f6625d30c54a2a50da995b543085471079..34bfd4067dc99ad591a21d1ca621ca5498f0ff67 100644 (file)
@@ -60,10 +60,14 @@ 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 raceCheckRead32(thread_id_t thread, const void *location);
 void raceCheckRead64(thread_id_t thread, const void *location);
 
-void raceCheckWrite8(thread_id_t thread, void *location);
-void raceCheckWrite16(thread_id_t thread, void *location);
-void raceCheckWrite32(thread_id_t thread, void *location);
-void raceCheckWrite64(thread_id_t thread, 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
 
 /**
  * @brief A record of information for detecting data races
@@ -115,6 +119,9 @@ bool race_equals(struct DataRace *r1, struct DataRace *r2);
 #define MAXREADVECTOR (READMASK-1)
 #define MAXWRITEVECTOR (WRITEMASK-1)
 
 #define MAXREADVECTOR (READMASK-1)
 #define MAXWRITEVECTOR (WRITEMASK-1)
 
+#define INVALIDSHADOWVAL 0x2ULL
+#define CHECKBOUNDARY(location, bits) ((((uintptr_t)location & MASK16BIT) + bits) <= MASK16BIT)
+
 typedef HashSet<struct DataRace *, uintptr_t, 0, model_malloc, model_calloc, model_free, race_hash, race_equals> RaceSet;
 
 #endif /* __DATARACE_H__ */
 typedef HashSet<struct DataRace *, uintptr_t, 0, model_malloc, model_calloc, model_free, race_hash, race_equals> RaceSet;
 
 #endif /* __DATARACE_H__ */