Skip to content
Snippets Groups Projects
Commit 210c2112 authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

tsan: add memory range access functions to public iface

llvm-svn: 168692
parent 96c39f73
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,9 @@ void __tsan_vptr_update(void **vptr_p, void *new_val);
void __tsan_func_entry(void *call_pc);
void __tsan_func_exit();
void __tsan_read_range(void *addr, unsigned long size); // NOLINT
void __tsan_write_range(void *addr, unsigned long size); // NOLINT
#ifdef __cplusplus
} // extern "C"
#endif
......
......@@ -63,3 +63,11 @@ void __tsan_func_entry(void *pc) {
void __tsan_func_exit() {
FuncExit(cur_thread());
}
void __tsan_read_range(void *addr, uptr size) {
MemoryAccessRange(cur_thread(), CALLERPC, (uptr)addr, size, false);
}
void __tsan_write_range(void *addr, uptr size) {
MemoryAccessRange(cur_thread(), CALLERPC, (uptr)addr, size, true);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment