14#include "tsan_annotations.h"
18typedef unsigned long uptr;
19typedef signed long sptr;
21extern "C" __attribute__((weak))
void AnnotateHappensBefore(
const char *f,
23extern "C" __attribute__((weak))
void AnnotateHappensAfter(
const char *f,
int l,
25extern "C" __attribute__((weak))
void AnnotateCondVarSignal(
const char *f,
27extern "C" __attribute__((weak))
void AnnotateCondVarSignalAll(
const char *f,
30extern "C" __attribute__((weak))
void AnnotateMutexIsNotPHB(
const char *f,
32extern "C" __attribute__((weak))
void AnnotateCondVarWait(
const char *f,
int l,
33 uptr cv, uptr lock) {}
34extern "C" __attribute__((weak))
void AnnotateRWLockCreate(
const char *f,
int l,
36extern "C" __attribute__((weak))
void
37AnnotateRWLockCreateStatic(
const char *f,
int l, uptr m) {}
38extern "C" __attribute__((weak))
void AnnotateRWLockDestroy(
const char *f,
40extern "C" __attribute__((weak))
void
41AnnotateRWLockAcquired(
const char *f,
int l, uptr m, uptr is_w) {}
42extern "C" __attribute__((weak))
void
43AnnotateRWLockReleased(
const char *f,
int l, uptr m, uptr is_w) {}
44extern "C" __attribute__((weak))
void AnnotateTraceMemory(
const char *f,
int l,
46extern "C" __attribute__((weak))
void AnnotateFlushState(
const char *f,
int l) {
48extern "C" __attribute__((weak))
void AnnotateNewMemory(
const char *f,
int l,
49 uptr mem, uptr size) {}
50extern "C" __attribute__((weak))
void AnnotateNoOp(
const char *f,
int l,
52extern "C" __attribute__((weak))
void AnnotateFlushExpectedRaces(
const char *f,
54extern "C" __attribute__((weak))
void
55AnnotateEnableRaceDetection(
const char *f,
int l,
int enable) {}
56extern "C" __attribute__((weak))
void
57AnnotateMutexIsUsedAsCondVar(
const char *f,
int l, uptr mu) {}
58extern "C" __attribute__((weak))
void AnnotatePCQGet(
const char *f,
int l,
60extern "C" __attribute__((weak))
void AnnotatePCQPut(
const char *f,
int l,
62extern "C" __attribute__((weak))
void AnnotatePCQDestroy(
const char *f,
int l,
64extern "C" __attribute__((weak))
void AnnotatePCQCreate(
const char *f,
int l,
66extern "C" __attribute__((weak))
void AnnotateExpectRace(
const char *f,
int l,
67 uptr mem,
char *desc) {
69extern "C" __attribute__((weak))
void
70AnnotateBenignRaceSized(
const char *f,
int l, uptr mem, uptr size,
char *desc) {
72extern "C" __attribute__((weak))
void AnnotateBenignRace(
const char *f,
int l,
73 uptr mem,
char *desc) {
75extern "C" __attribute__((weak))
void AnnotateIgnoreReadsBegin(
const char *f,
77extern "C" __attribute__((weak))
void AnnotateIgnoreReadsEnd(
const char *f,
79extern "C" __attribute__((weak))
void AnnotateIgnoreWritesBegin(
const char *f,
81extern "C" __attribute__((weak))
void AnnotateIgnoreWritesEnd(
const char *f,
83extern "C" __attribute__((weak))
void AnnotateIgnoreSyncBegin(
const char *f,
85extern "C" __attribute__((weak))
void AnnotateIgnoreSyncEnd(
const char *f,
87extern "C" __attribute__((weak))
void
88AnnotatePublishMemoryRange(
const char *f,
int l, uptr addr, uptr size) {}
89extern "C" __attribute__((weak))
void
90AnnotateUnpublishMemoryRange(
const char *f,
int l, uptr addr, uptr size) {}
91extern "C" __attribute__((weak))
void AnnotateThreadName(
const char *f,
int l,
93extern "C" __attribute__((weak))
void
94WTFAnnotateHappensBefore(
const char *f,
int l, uptr addr) {}
95extern "C" __attribute__((weak))
void
96WTFAnnotateHappensAfter(
const char *f,
int l, uptr addr) {}
97extern "C" __attribute__((weak))
void
98WTFAnnotateBenignRaceSized(
const char *f,
int l, uptr mem, uptr sz,
100extern "C" __attribute__((weak))
int RunningOnValgrind() {
return 0; }
101extern "C" __attribute__((weak))
double ValgrindSlowdown(
void) {
return 0; }
102extern "C" __attribute__((weak))
const char __attribute__((weak)) *
103 ThreadSanitizerQuery(
const char *query) {
106extern "C" __attribute__((weak))
void
107AnnotateMemoryIsInitialized(
const char *f,
int l, uptr mem, uptr sz) {}