5#ifndef RUNTIME_PLATFORM_THREAD_SANITIZER_H_
6#define RUNTIME_PLATFORM_THREAD_SANITIZER_H_
10#if __SANITIZE_THREAD__
11#define USING_THREAD_SANITIZER
12#elif defined(__has_feature)
13#if __has_feature(thread_sanitizer)
14#define USING_THREAD_SANITIZER
18#if defined(USING_THREAD_SANITIZER)
19#define NO_SANITIZE_THREAD __attribute__((no_sanitize("thread")))
23#define NO_SANITIZE_THREAD
26#if defined(USING_THREAD_SANITIZER)
27#define DO_IF_TSAN(CODE) CODE
29#define DO_IF_TSAN(CODE)
32#if defined(USING_THREAD_SANITIZER)
33#define DO_IF_NOT_TSAN(CODE)
35#define DO_IF_NOT_TSAN(CODE) CODE
void __tsan_acquire(void *addr)
void __tsan_release(void *addr)