From: Dmitry Vyukov Date: Mon, 18 Mar 2013 17:21:15 +0000 (+0000) Subject: tsan: add support for idle threads X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61ce9560d4a11262294235538afd0433a50572a6;p=platform%2Fupstream%2Fllvm.git tsan: add support for idle threads llvm-svn: 177292 --- diff --git a/compiler-rt/lib/tsan/rtl/tsan_mman.cc b/compiler-rt/lib/tsan/rtl/tsan_mman.cc index 1d887c6..7c7b89c 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_mman.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_mman.cc @@ -234,4 +234,9 @@ uptr __tsan_get_allocated_size(void *p) { 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"