forked from OSchip/llvm-project
tsan: add __attribute__((visibility("default"))) to interface functions
llvm-svn: 169265
This commit is contained in:
parent
5e6f833bdd
commit
01ea653166
|
@ -16,6 +16,8 @@
|
|||
#ifndef TSAN_INTERFACE_H
|
||||
#define TSAN_INTERFACE_H
|
||||
|
||||
#include <sanitizer/common_interface_defs.h>
|
||||
|
||||
// This header should NOT include any other headers.
|
||||
// All functions in this header are extern "C" and start with __tsan_.
|
||||
|
||||
|
@ -25,27 +27,29 @@ extern "C" {
|
|||
|
||||
// This function should be called at the very beginning of the process,
|
||||
// before any instrumented code is executed and before any call to malloc.
|
||||
void __tsan_init();
|
||||
void __tsan_init() SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
void __tsan_read1(void *addr);
|
||||
void __tsan_read2(void *addr);
|
||||
void __tsan_read4(void *addr);
|
||||
void __tsan_read8(void *addr);
|
||||
void __tsan_read16(void *addr);
|
||||
void __tsan_read1(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_read2(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_read4(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_read8(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_read16(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
void __tsan_write1(void *addr);
|
||||
void __tsan_write2(void *addr);
|
||||
void __tsan_write4(void *addr);
|
||||
void __tsan_write8(void *addr);
|
||||
void __tsan_write16(void *addr);
|
||||
void __tsan_write1(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_write2(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_write4(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_write8(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_write16(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
void __tsan_vptr_update(void **vptr_p, void *new_val);
|
||||
void __tsan_vptr_update(void **vptr_p, void *new_val) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
void __tsan_func_entry(void *call_pc);
|
||||
void __tsan_func_exit();
|
||||
void __tsan_func_entry(void *call_pc) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_func_exit() SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
void __tsan_read_range(void *addr, unsigned long size); // NOLINT
|
||||
void __tsan_write_range(void *addr, unsigned long size); // NOLINT
|
||||
void __tsan_read_range(void *addr, unsigned long size) // NOLINT
|
||||
SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_write_range(void *addr, unsigned long size) // NOLINT
|
||||
SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#include "sanitizer_common/sanitizer_libc.h"
|
||||
#include "sanitizer_common/sanitizer_internal_defs.h"
|
||||
#include "sanitizer_common/sanitizer_placement_new.h"
|
||||
#include "tsan_interface_ann.h"
|
||||
#include "tsan_mutex.h"
|
||||
|
@ -159,48 +160,50 @@ bool IsExpectedReport(uptr addr, uptr size) {
|
|||
using namespace __tsan; // NOLINT
|
||||
|
||||
extern "C" {
|
||||
void AnnotateHappensBefore(char *f, int l, uptr addr) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateHappensBefore(char *f, int l, uptr addr) {
|
||||
SCOPED_ANNOTATION(AnnotateHappensBefore);
|
||||
Release(cur_thread(), CALLERPC, addr);
|
||||
}
|
||||
|
||||
void AnnotateHappensAfter(char *f, int l, uptr addr) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateHappensAfter(char *f, int l, uptr addr) {
|
||||
SCOPED_ANNOTATION(AnnotateHappensAfter);
|
||||
Acquire(cur_thread(), CALLERPC, addr);
|
||||
}
|
||||
|
||||
void AnnotateCondVarSignal(char *f, int l, uptr cv) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateCondVarSignal(char *f, int l, uptr cv) {
|
||||
SCOPED_ANNOTATION(AnnotateCondVarSignal);
|
||||
}
|
||||
|
||||
void AnnotateCondVarSignalAll(char *f, int l, uptr cv) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateCondVarSignalAll(char *f, int l, uptr cv) {
|
||||
SCOPED_ANNOTATION(AnnotateCondVarSignalAll);
|
||||
}
|
||||
|
||||
void AnnotateMutexIsNotPHB(char *f, int l, uptr mu) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateMutexIsNotPHB(char *f, int l, uptr mu) {
|
||||
SCOPED_ANNOTATION(AnnotateMutexIsNotPHB);
|
||||
}
|
||||
|
||||
void AnnotateCondVarWait(char *f, int l, uptr cv, uptr lock) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateCondVarWait(char *f, int l, uptr cv,
|
||||
uptr lock) {
|
||||
SCOPED_ANNOTATION(AnnotateCondVarWait);
|
||||
}
|
||||
|
||||
void AnnotateRWLockCreate(char *f, int l, uptr m) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateRWLockCreate(char *f, int l, uptr m) {
|
||||
SCOPED_ANNOTATION(AnnotateRWLockCreate);
|
||||
MutexCreate(thr, pc, m, true, true, false);
|
||||
}
|
||||
|
||||
void AnnotateRWLockCreateStatic(char *f, int l, uptr m) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateRWLockCreateStatic(char *f, int l, uptr m) {
|
||||
SCOPED_ANNOTATION(AnnotateRWLockCreateStatic);
|
||||
MutexCreate(thr, pc, m, true, true, true);
|
||||
}
|
||||
|
||||
void AnnotateRWLockDestroy(char *f, int l, uptr m) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateRWLockDestroy(char *f, int l, uptr m) {
|
||||
SCOPED_ANNOTATION(AnnotateRWLockDestroy);
|
||||
MutexDestroy(thr, pc, m);
|
||||
}
|
||||
|
||||
void AnnotateRWLockAcquired(char *f, int l, uptr m, uptr is_w) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateRWLockAcquired(char *f, int l, uptr m,
|
||||
uptr is_w) {
|
||||
SCOPED_ANNOTATION(AnnotateRWLockAcquired);
|
||||
if (is_w)
|
||||
MutexLock(thr, pc, m);
|
||||
|
@ -208,7 +211,8 @@ void AnnotateRWLockAcquired(char *f, int l, uptr m, uptr is_w) {
|
|||
MutexReadLock(thr, pc, m);
|
||||
}
|
||||
|
||||
void AnnotateRWLockReleased(char *f, int l, uptr m, uptr is_w) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateRWLockReleased(char *f, int l, uptr m,
|
||||
uptr is_w) {
|
||||
SCOPED_ANNOTATION(AnnotateRWLockReleased);
|
||||
if (is_w)
|
||||
MutexUnlock(thr, pc, m);
|
||||
|
@ -216,19 +220,20 @@ void AnnotateRWLockReleased(char *f, int l, uptr m, uptr is_w) {
|
|||
MutexReadUnlock(thr, pc, m);
|
||||
}
|
||||
|
||||
void AnnotateTraceMemory(char *f, int l, uptr mem) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateTraceMemory(char *f, int l, uptr mem) {
|
||||
SCOPED_ANNOTATION(AnnotateTraceMemory);
|
||||
}
|
||||
|
||||
void AnnotateFlushState(char *f, int l) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateFlushState(char *f, int l) {
|
||||
SCOPED_ANNOTATION(AnnotateFlushState);
|
||||
}
|
||||
|
||||
void AnnotateNewMemory(char *f, int l, uptr mem, uptr size) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateNewMemory(char *f, int l, uptr mem,
|
||||
uptr size) {
|
||||
SCOPED_ANNOTATION(AnnotateNewMemory);
|
||||
}
|
||||
|
||||
void AnnotateNoOp(char *f, int l, uptr mem) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateNoOp(char *f, int l, uptr mem) {
|
||||
SCOPED_ANNOTATION(AnnotateNoOp);
|
||||
}
|
||||
|
||||
|
@ -240,7 +245,7 @@ static void ReportMissedExpectedRace(ExpectRace *race) {
|
|||
Printf("==================\n");
|
||||
}
|
||||
|
||||
void AnnotateFlushExpectedRaces(char *f, int l) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateFlushExpectedRaces(char *f, int l) {
|
||||
SCOPED_ANNOTATION(AnnotateFlushExpectedRaces);
|
||||
Lock lock(&dyn_ann_ctx->mtx);
|
||||
while (dyn_ann_ctx->expect.next != &dyn_ann_ctx->expect) {
|
||||
|
@ -255,32 +260,39 @@ void AnnotateFlushExpectedRaces(char *f, int l) {
|
|||
}
|
||||
}
|
||||
|
||||
void AnnotateEnableRaceDetection(char *f, int l, int enable) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateEnableRaceDetection(
|
||||
char *f, int l, int enable) {
|
||||
SCOPED_ANNOTATION(AnnotateEnableRaceDetection);
|
||||
// FIXME: Reconsider this functionality later. It may be irrelevant.
|
||||
}
|
||||
|
||||
void AnnotateMutexIsUsedAsCondVar(char *f, int l, uptr mu) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateMutexIsUsedAsCondVar(
|
||||
char *f, int l, uptr mu) {
|
||||
SCOPED_ANNOTATION(AnnotateMutexIsUsedAsCondVar);
|
||||
}
|
||||
|
||||
void AnnotatePCQGet(char *f, int l, uptr pcq) {
|
||||
void INTERFACE_ATTRIBUTE AnnotatePCQGet(
|
||||
char *f, int l, uptr pcq) {
|
||||
SCOPED_ANNOTATION(AnnotatePCQGet);
|
||||
}
|
||||
|
||||
void AnnotatePCQPut(char *f, int l, uptr pcq) {
|
||||
void INTERFACE_ATTRIBUTE AnnotatePCQPut(
|
||||
char *f, int l, uptr pcq) {
|
||||
SCOPED_ANNOTATION(AnnotatePCQPut);
|
||||
}
|
||||
|
||||
void AnnotatePCQDestroy(char *f, int l, uptr pcq) {
|
||||
void INTERFACE_ATTRIBUTE AnnotatePCQDestroy(
|
||||
char *f, int l, uptr pcq) {
|
||||
SCOPED_ANNOTATION(AnnotatePCQDestroy);
|
||||
}
|
||||
|
||||
void AnnotatePCQCreate(char *f, int l, uptr pcq) {
|
||||
void INTERFACE_ATTRIBUTE AnnotatePCQCreate(
|
||||
char *f, int l, uptr pcq) {
|
||||
SCOPED_ANNOTATION(AnnotatePCQCreate);
|
||||
}
|
||||
|
||||
void AnnotateExpectRace(char *f, int l, uptr mem, char *desc) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateExpectRace(
|
||||
char *f, int l, uptr mem, char *desc) {
|
||||
SCOPED_ANNOTATION(AnnotateExpectRace);
|
||||
Lock lock(&dyn_ann_ctx->mtx);
|
||||
AddExpectRace(&dyn_ann_ctx->expect,
|
||||
|
@ -288,7 +300,8 @@ void AnnotateExpectRace(char *f, int l, uptr mem, char *desc) {
|
|||
DPrintf("Add expected race: %s addr=%zx %s:%d\n", desc, mem, f, l);
|
||||
}
|
||||
|
||||
static void BenignRaceImpl(char *f, int l, uptr mem, uptr size, char *desc) {
|
||||
static void BenignRaceImpl(
|
||||
char *f, int l, uptr mem, uptr size, char *desc) {
|
||||
Lock lock(&dyn_ann_ctx->mtx);
|
||||
AddExpectRace(&dyn_ann_ctx->benign,
|
||||
f, l, mem, size, desc);
|
||||
|
@ -296,69 +309,75 @@ static void BenignRaceImpl(char *f, int l, uptr mem, uptr size, char *desc) {
|
|||
}
|
||||
|
||||
// FIXME: Turn it off later. WTF is benign race?1?? Go talk to Hans Boehm.
|
||||
void AnnotateBenignRaceSized(char *f, int l, uptr mem, uptr size, char *desc) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateBenignRaceSized(
|
||||
char *f, int l, uptr mem, uptr size, char *desc) {
|
||||
SCOPED_ANNOTATION(AnnotateBenignRaceSized);
|
||||
BenignRaceImpl(f, l, mem, size, desc);
|
||||
}
|
||||
|
||||
void AnnotateBenignRace(char *f, int l, uptr mem, char *desc) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateBenignRace(
|
||||
char *f, int l, uptr mem, char *desc) {
|
||||
SCOPED_ANNOTATION(AnnotateBenignRace);
|
||||
BenignRaceImpl(f, l, mem, 1, desc);
|
||||
}
|
||||
|
||||
void AnnotateIgnoreReadsBegin(char *f, int l) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateIgnoreReadsBegin(char *f, int l) {
|
||||
SCOPED_ANNOTATION(AnnotateIgnoreReadsBegin);
|
||||
IgnoreCtl(cur_thread(), false, true);
|
||||
}
|
||||
|
||||
void AnnotateIgnoreReadsEnd(char *f, int l) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateIgnoreReadsEnd(char *f, int l) {
|
||||
SCOPED_ANNOTATION(AnnotateIgnoreReadsEnd);
|
||||
IgnoreCtl(cur_thread(), false, false);
|
||||
}
|
||||
|
||||
void AnnotateIgnoreWritesBegin(char *f, int l) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateIgnoreWritesBegin(char *f, int l) {
|
||||
SCOPED_ANNOTATION(AnnotateIgnoreWritesBegin);
|
||||
IgnoreCtl(cur_thread(), true, true);
|
||||
}
|
||||
|
||||
void AnnotateIgnoreWritesEnd(char *f, int l) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateIgnoreWritesEnd(char *f, int l) {
|
||||
SCOPED_ANNOTATION(AnnotateIgnoreWritesEnd);
|
||||
IgnoreCtl(cur_thread(), true, false);
|
||||
}
|
||||
|
||||
void AnnotatePublishMemoryRange(char *f, int l, uptr addr, uptr size) {
|
||||
void INTERFACE_ATTRIBUTE AnnotatePublishMemoryRange(
|
||||
char *f, int l, uptr addr, uptr size) {
|
||||
SCOPED_ANNOTATION(AnnotatePublishMemoryRange);
|
||||
}
|
||||
|
||||
void AnnotateUnpublishMemoryRange(char *f, int l, uptr addr, uptr size) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateUnpublishMemoryRange(
|
||||
char *f, int l, uptr addr, uptr size) {
|
||||
SCOPED_ANNOTATION(AnnotateUnpublishMemoryRange);
|
||||
}
|
||||
|
||||
void AnnotateThreadName(char *f, int l, char *name) {
|
||||
void INTERFACE_ATTRIBUTE AnnotateThreadName(
|
||||
char *f, int l, char *name) {
|
||||
SCOPED_ANNOTATION(AnnotateThreadName);
|
||||
}
|
||||
|
||||
void WTFAnnotateHappensBefore(char *f, int l, uptr addr) {
|
||||
void INTERFACE_ATTRIBUTE WTFAnnotateHappensBefore(char *f, int l, uptr addr) {
|
||||
SCOPED_ANNOTATION(AnnotateHappensBefore);
|
||||
}
|
||||
|
||||
void WTFAnnotateHappensAfter(char *f, int l, uptr addr) {
|
||||
void INTERFACE_ATTRIBUTE WTFAnnotateHappensAfter(char *f, int l, uptr addr) {
|
||||
SCOPED_ANNOTATION(AnnotateHappensAfter);
|
||||
}
|
||||
|
||||
void WTFAnnotateBenignRaceSized(char *f, int l, uptr mem, uptr sz, char *desc) {
|
||||
void INTERFACE_ATTRIBUTE WTFAnnotateBenignRaceSized(
|
||||
char *f, int l, uptr mem, uptr sz, char *desc) {
|
||||
SCOPED_ANNOTATION(AnnotateBenignRaceSized);
|
||||
}
|
||||
|
||||
int RunningOnValgrind() {
|
||||
int INTERFACE_ATTRIBUTE RunningOnValgrind() {
|
||||
return flags()->running_on_valgrind;
|
||||
}
|
||||
|
||||
double __attribute__((weak)) ValgrindSlowdown(void) {
|
||||
double __attribute__((weak)) INTERFACE_ATTRIBUTE ValgrindSlowdown(void) {
|
||||
return 10.0;
|
||||
}
|
||||
|
||||
const char *ThreadSanitizerQuery(const char *query) {
|
||||
const char INTERFACE_ATTRIBUTE* ThreadSanitizerQuery(const char *query) {
|
||||
if (internal_strcmp(query, "pure_happens_before") == 0)
|
||||
return "1";
|
||||
else
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#ifndef TSAN_INTERFACE_ANN_H
|
||||
#define TSAN_INTERFACE_ANN_H
|
||||
|
||||
#include <sanitizer/common_interface_defs.h>
|
||||
|
||||
// This header should NOT include any other headers.
|
||||
// All functions in this header are extern "C" and start with __tsan_.
|
||||
|
||||
|
@ -21,8 +23,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
void __tsan_acquire(void *addr);
|
||||
void __tsan_release(void *addr);
|
||||
void __tsan_acquire(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
void __tsan_release(void *addr) SANITIZER_INTERFACE_ATTRIBUTE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
#ifndef TSAN_INTERFACE_ATOMIC_H
|
||||
#define TSAN_INTERFACE_ATOMIC_H
|
||||
|
||||
#ifndef INTERFACE_ATTRIBUTE
|
||||
# define INTERFACE_ATTRIBUTE __attribute__((visibility("default")))
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -43,157 +47,159 @@ typedef enum {
|
|||
} __tsan_memory_order;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_load(const volatile __tsan_atomic8 *a,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_load(const volatile __tsan_atomic16 *a,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_load(const volatile __tsan_atomic32 *a,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_load(const volatile __tsan_atomic64 *a,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_load(const volatile __tsan_atomic128 *a,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
void __tsan_atomic8_store(volatile __tsan_atomic8 *a, __tsan_atomic8 v,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
void __tsan_atomic16_store(volatile __tsan_atomic16 *a, __tsan_atomic16 v,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
void __tsan_atomic32_store(volatile __tsan_atomic32 *a, __tsan_atomic32 v,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
void __tsan_atomic64_store(volatile __tsan_atomic64 *a, __tsan_atomic64 v,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
void __tsan_atomic128_store(volatile __tsan_atomic128 *a, __tsan_atomic128 v,
|
||||
__tsan_memory_order mo);
|
||||
__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_exchange(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 v, __tsan_memory_order mo);
|
||||
__tsan_atomic8 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_exchange(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 v, __tsan_memory_order mo);
|
||||
__tsan_atomic16 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_exchange(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 v, __tsan_memory_order mo);
|
||||
__tsan_atomic32 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_exchange(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 v, __tsan_memory_order mo);
|
||||
__tsan_atomic64 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_exchange(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 v, __tsan_memory_order mo);
|
||||
__tsan_atomic128 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_fetch_add(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 v, __tsan_memory_order mo);
|
||||
__tsan_atomic8 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_fetch_add(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 v, __tsan_memory_order mo);
|
||||
__tsan_atomic16 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_fetch_add(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 v, __tsan_memory_order mo);
|
||||
__tsan_atomic32 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_fetch_add(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 v, __tsan_memory_order mo);
|
||||
__tsan_atomic64 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_fetch_add(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 v, __tsan_memory_order mo);
|
||||
__tsan_atomic128 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_fetch_sub(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 v, __tsan_memory_order mo);
|
||||
__tsan_atomic8 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_fetch_sub(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 v, __tsan_memory_order mo);
|
||||
__tsan_atomic16 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_fetch_sub(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 v, __tsan_memory_order mo);
|
||||
__tsan_atomic32 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_fetch_sub(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 v, __tsan_memory_order mo);
|
||||
__tsan_atomic64 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_fetch_sub(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 v, __tsan_memory_order mo);
|
||||
__tsan_atomic128 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_fetch_and(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 v, __tsan_memory_order mo);
|
||||
__tsan_atomic8 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_fetch_and(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 v, __tsan_memory_order mo);
|
||||
__tsan_atomic16 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_fetch_and(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 v, __tsan_memory_order mo);
|
||||
__tsan_atomic32 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_fetch_and(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 v, __tsan_memory_order mo);
|
||||
__tsan_atomic64 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_fetch_and(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 v, __tsan_memory_order mo);
|
||||
__tsan_atomic128 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_fetch_or(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 v, __tsan_memory_order mo);
|
||||
__tsan_atomic8 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_fetch_or(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 v, __tsan_memory_order mo);
|
||||
__tsan_atomic16 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_fetch_or(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 v, __tsan_memory_order mo);
|
||||
__tsan_atomic32 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_fetch_or(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 v, __tsan_memory_order mo);
|
||||
__tsan_atomic64 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_fetch_or(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 v, __tsan_memory_order mo);
|
||||
__tsan_atomic128 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_fetch_xor(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 v, __tsan_memory_order mo);
|
||||
__tsan_atomic8 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_fetch_xor(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 v, __tsan_memory_order mo);
|
||||
__tsan_atomic16 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_fetch_xor(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 v, __tsan_memory_order mo);
|
||||
__tsan_atomic32 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_fetch_xor(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 v, __tsan_memory_order mo);
|
||||
__tsan_atomic64 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_fetch_xor(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 v, __tsan_memory_order mo);
|
||||
__tsan_atomic128 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_fetch_nand(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 v, __tsan_memory_order mo);
|
||||
__tsan_atomic8 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_fetch_nand(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 v, __tsan_memory_order mo);
|
||||
__tsan_atomic16 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_fetch_nand(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 v, __tsan_memory_order mo);
|
||||
__tsan_atomic32 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_fetch_nand(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 v, __tsan_memory_order mo);
|
||||
__tsan_atomic64 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_fetch_nand(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 v, __tsan_memory_order mo);
|
||||
__tsan_atomic128 v, __tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
int __tsan_atomic8_compare_exchange_weak(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 *c, __tsan_atomic8 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic16_compare_exchange_weak(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 *c, __tsan_atomic16 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic32_compare_exchange_weak(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 *c, __tsan_atomic32 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic64_compare_exchange_weak(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 *c, __tsan_atomic64 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic128_compare_exchange_weak(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 *c, __tsan_atomic128 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
int __tsan_atomic8_compare_exchange_strong(volatile __tsan_atomic8 *a,
|
||||
__tsan_atomic8 *c, __tsan_atomic8 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic16_compare_exchange_strong(volatile __tsan_atomic16 *a,
|
||||
__tsan_atomic16 *c, __tsan_atomic16 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic32_compare_exchange_strong(volatile __tsan_atomic32 *a,
|
||||
__tsan_atomic32 *c, __tsan_atomic32 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic64_compare_exchange_strong(volatile __tsan_atomic64 *a,
|
||||
__tsan_atomic64 *c, __tsan_atomic64 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
int __tsan_atomic128_compare_exchange_strong(volatile __tsan_atomic128 *a,
|
||||
__tsan_atomic128 *c, __tsan_atomic128 v, __tsan_memory_order mo,
|
||||
__tsan_memory_order fail_mo);
|
||||
__tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
__tsan_atomic8 __tsan_atomic8_compare_exchange_val(
|
||||
volatile __tsan_atomic8 *a, __tsan_atomic8 c, __tsan_atomic8 v,
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo);
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic16 __tsan_atomic16_compare_exchange_val(
|
||||
volatile __tsan_atomic16 *a, __tsan_atomic16 c, __tsan_atomic16 v,
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo);
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic32 __tsan_atomic32_compare_exchange_val(
|
||||
volatile __tsan_atomic32 *a, __tsan_atomic32 c, __tsan_atomic32 v,
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo);
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic64 __tsan_atomic64_compare_exchange_val(
|
||||
volatile __tsan_atomic64 *a, __tsan_atomic64 c, __tsan_atomic64 v,
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo);
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
__tsan_atomic128 __tsan_atomic128_compare_exchange_val(
|
||||
volatile __tsan_atomic128 *a, __tsan_atomic128 c, __tsan_atomic128 v,
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo);
|
||||
__tsan_memory_order mo, __tsan_memory_order fail_mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
void __tsan_atomic_thread_fence(__tsan_memory_order mo);
|
||||
void __tsan_atomic_signal_fence(__tsan_memory_order mo);
|
||||
void __tsan_atomic_thread_fence(__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
void __tsan_atomic_signal_fence(__tsan_memory_order mo) INTERFACE_ATTRIBUTE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#undef INTERFACE_ATTRIBUTE
|
||||
|
||||
#endif // #ifndef TSAN_INTERFACE_ATOMIC_H
|
||||
|
|
Loading…
Reference in New Issue