commit | 3ce21701b4e1026a4f5157ff9771c533f4e3ef55 | [log] [tgz] |
---|---|---|
author | Dmitry Vyukov <dvyukov@google.com> | Mon Mar 18 17:21:15 2013 +0000 |
committer | Dmitry Vyukov <dvyukov@google.com> | Mon Mar 18 17:21:15 2013 +0000 |
tree | 6216471587c3343a51501c750bfdb68c4f307689 | |
parent | 74172de3ce25bf52d9d3918c94216f2eef5956e2 [diff] |
tsan: add support for idle threads git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177292 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/rtl/tsan_mman.cc b/lib/tsan/rtl/tsan_mman.cc index 1d887c6..7c7b89c 100644 --- a/lib/tsan/rtl/tsan_mman.cc +++ b/lib/tsan/rtl/tsan_mman.cc
@@ -234,4 +234,9 @@ MBlock *b = (MBlock*)allocator()->GetMetaData(p); return b->size; } + +void __tsan_on_thread_idle() { + ThreadState *thr = cur_thread(); + allocator()->SwallowCache(&thr->alloc_cache); +} } // extern "C"