xref: /netbsd-src/external/gpl3/gcc.old/dist/libsanitizer/tsan/tsan_interface_ann.h (revision 1debfc3d3fad8af6f31804271c18e67f77b4d718)
1 //===-- tsan_interface_ann.h ------------------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of ThreadSanitizer (TSan), a race detector.
9 //
10 // Interface for dynamic annotations.
11 //===----------------------------------------------------------------------===//
12 #ifndef TSAN_INTERFACE_ANN_H
13 #define TSAN_INTERFACE_ANN_H
14 
15 #include <sanitizer_common/sanitizer_internal_defs.h>
16 
17 // This header should NOT include any other headers.
18 // All functions in this header are extern "C" and start with __tsan_.
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 SANITIZER_INTERFACE_ATTRIBUTE void __tsan_acquire(void *addr);
25 SANITIZER_INTERFACE_ATTRIBUTE void __tsan_release(void *addr);
26 
27 #ifdef __cplusplus
28 }  // extern "C"
29 #endif
30 
31 #endif  // TSAN_INTERFACE_ANN_H
32