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