1// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_PLATFORM_THREAD_SANITIZER_H_
6#define RUNTIME_PLATFORM_THREAD_SANITIZER_H_
7
8#include "platform/globals.h"
9
10#if defined(__has_feature)
11#if __has_feature(thread_sanitizer)
12#define USING_THREAD_SANITIZER
13#endif
14#endif
15
16#if defined(USING_THREAD_SANITIZER)
17#define NO_SANITIZE_THREAD __attribute__((no_sanitize("thread")))
18#else
19#define NO_SANITIZE_THREAD
20#endif
21
22#endif // RUNTIME_PLATFORM_THREAD_SANITIZER_H_
23