15 #include "tsan_annotations.h" 19 typedef unsigned long uptr;
20 typedef signed long sptr;
22 extern "C" __attribute__((weak))
void AnnotateHappensBefore(
const char *f,
24 extern "C" __attribute__((weak))
void AnnotateHappensAfter(
const char *f,
int l,
26 extern "C" __attribute__((weak))
void AnnotateCondVarSignal(
const char *f,
28 extern "C" __attribute__((weak))
void AnnotateCondVarSignalAll(
const char *f,
31 extern "C" __attribute__((weak))
void AnnotateMutexIsNotPHB(
const char *f,
33 extern "C" __attribute__((weak))
void AnnotateCondVarWait(
const char *f,
int l,
34 uptr cv, uptr lock) {}
35 extern "C" __attribute__((weak))
void AnnotateRWLockCreate(
const char *f,
int l,
37 extern "C" __attribute__((weak))
void 38 AnnotateRWLockCreateStatic(
const char *f,
int l, uptr m) {}
39 extern "C" __attribute__((weak))
void AnnotateRWLockDestroy(
const char *f,
41 extern "C" __attribute__((weak))
void 42 AnnotateRWLockAcquired(
const char *f,
int l, uptr m, uptr is_w) {}
43 extern "C" __attribute__((weak))
void 44 AnnotateRWLockReleased(
const char *f,
int l, uptr m, uptr is_w) {}
45 extern "C" __attribute__((weak))
void AnnotateTraceMemory(
const char *f,
int l,
47 extern "C" __attribute__((weak))
void AnnotateFlushState(
const char *f,
int l) {
49 extern "C" __attribute__((weak))
void AnnotateNewMemory(
const char *f,
int l,
50 uptr mem, uptr size) {}
51 extern "C" __attribute__((weak))
void AnnotateNoOp(
const char *f,
int l,
53 extern "C" __attribute__((weak))
void AnnotateFlushExpectedRaces(
const char *f,
55 extern "C" __attribute__((weak))
void 56 AnnotateEnableRaceDetection(
const char *f,
int l,
int enable) {}
57 extern "C" __attribute__((weak))
void 58 AnnotateMutexIsUsedAsCondVar(
const char *f,
int l, uptr mu) {}
59 extern "C" __attribute__((weak))
void AnnotatePCQGet(
const char *f,
int l,
61 extern "C" __attribute__((weak))
void AnnotatePCQPut(
const char *f,
int l,
63 extern "C" __attribute__((weak))
void AnnotatePCQDestroy(
const char *f,
int l,
65 extern "C" __attribute__((weak))
void AnnotatePCQCreate(
const char *f,
int l,
67 extern "C" __attribute__((weak))
void AnnotateExpectRace(
const char *f,
int l,
68 uptr mem,
char *desc) {
70 extern "C" __attribute__((weak))
void 71 AnnotateBenignRaceSized(
const char *f,
int l, uptr mem, uptr size,
char *desc) {
73 extern "C" __attribute__((weak))
void AnnotateBenignRace(
const char *f,
int l,
74 uptr mem,
char *desc) {
76 extern "C" __attribute__((weak))
void AnnotateIgnoreReadsBegin(
const char *f,
78 extern "C" __attribute__((weak))
void AnnotateIgnoreReadsEnd(
const char *f,
80 extern "C" __attribute__((weak))
void AnnotateIgnoreWritesBegin(
const char *f,
82 extern "C" __attribute__((weak))
void AnnotateIgnoreWritesEnd(
const char *f,
84 extern "C" __attribute__((weak))
void AnnotateIgnoreSyncBegin(
const char *f,
86 extern "C" __attribute__((weak))
void AnnotateIgnoreSyncEnd(
const char *f,
88 extern "C" __attribute__((weak))
void 89 AnnotatePublishMemoryRange(
const char *f,
int l, uptr addr, uptr size) {}
90 extern "C" __attribute__((weak))
void 91 AnnotateUnpublishMemoryRange(
const char *f,
int l, uptr addr, uptr size) {}
92 extern "C" __attribute__((weak))
void AnnotateThreadName(
const char *f,
int l,
94 extern "C" __attribute__((weak))
void 95 WTFAnnotateHappensBefore(
const char *f,
int l, uptr addr) {}
96 extern "C" __attribute__((weak))
void 97 WTFAnnotateHappensAfter(
const char *f,
int l, uptr addr) {}
98 extern "C" __attribute__((weak))
void 99 WTFAnnotateBenignRaceSized(
const char *f,
int l, uptr mem, uptr sz,
101 extern "C" __attribute__((weak))
int RunningOnValgrind() {
return 0; }
102 extern "C" __attribute__((weak))
double ValgrindSlowdown(
void) {
return 0; }
103 extern "C" __attribute__((weak))
const char __attribute__((weak)) *
104 ThreadSanitizerQuery(
const char *query) {
107 extern "C" __attribute__((weak))
void 108 AnnotateMemoryIsInitialized(
const char *f,
int l, uptr mem, uptr sz) {}