• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- tsan_interface_ann.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of ThreadSanitizer (TSan), a race detector.
10 //
11 // Interface for dynamic annotations.
12 //===----------------------------------------------------------------------===//
13 #ifndef TSAN_INTERFACE_ANN_H
14 #define TSAN_INTERFACE_ANN_H
15 
16 #include <sanitizer_common/sanitizer_internal_defs.h>
17 
18 // This header should NOT include any other headers.
19 // All functions in this header are extern "C" and start with __tsan_.
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 SANITIZER_INTERFACE_ATTRIBUTE void __tsan_acquire(void *addr);
26 SANITIZER_INTERFACE_ATTRIBUTE void __tsan_release(void *addr);
27 
28 #ifdef __cplusplus
29 }  // extern "C"
30 #endif
31 
32 #endif  // TSAN_INTERFACE_ANN_H
33