]>
Commit | Line | Data |
---|---|---|
cd0be65c WM |
1 | //===-- tsan_interface.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 | // The functions declared in this header will be inserted by the instrumentation | |
11 | // module. | |
12 | // This header can be included by the instrumented program or by TSan tests. | |
13 | //===----------------------------------------------------------------------===// | |
14 | #ifndef TSAN_INTERFACE_H | |
15 | #define TSAN_INTERFACE_H | |
16 | ||
cd0be65c WM |
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 | // This function should be called at the very beginning of the process, | |
25 | // before any instrumented code is executed and before any call to malloc. | |
e297eb60 | 26 | void __tsan_init(); |
cd0be65c | 27 | |
e297eb60 KS |
28 | void __tsan_read1(void *addr); |
29 | void __tsan_read2(void *addr); | |
30 | void __tsan_read4(void *addr); | |
31 | void __tsan_read8(void *addr); | |
32 | void __tsan_read16(void *addr); | |
cd0be65c | 33 | |
e297eb60 KS |
34 | void __tsan_write1(void *addr); |
35 | void __tsan_write2(void *addr); | |
36 | void __tsan_write4(void *addr); | |
37 | void __tsan_write8(void *addr); | |
38 | void __tsan_write16(void *addr); | |
cd0be65c | 39 | |
e297eb60 | 40 | void __tsan_vptr_update(void **vptr_p, void *new_val); |
cd0be65c | 41 | |
e297eb60 KS |
42 | void __tsan_func_entry(void *call_pc); |
43 | void __tsan_func_exit(); | |
cd0be65c WM |
44 | |
45 | #ifdef __cplusplus | |
46 | } // extern "C" | |
47 | #endif | |
48 | ||
49 | #endif // TSAN_INTERFACE_H |