From 9798c96cf144cfb203756457a0cdb751b498a625 Mon Sep 17 00:00:00 2001 From: Kuba Brecka Date: Wed, 4 Nov 2015 15:09:14 +0000 Subject: [tsan] Handle libdispatch worker threads on OS X On OS X, GCD worker threads are created without a call to pthread_create. We need to properly register these threads with ThreadCreate and ThreadStart. This patch uses a libpthread API (`pthread_introspection_hook_install`) to get notifications about new threads and about threads that are about to be destroyed. Differential Revision: http://reviews.llvm.org/D14328 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252049 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/tsan/rtl/tsan_platform.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/tsan/rtl/tsan_platform.h') diff --git a/lib/tsan/rtl/tsan_platform.h b/lib/tsan/rtl/tsan_platform.h index 87169fc08..57cd86d83 100644 --- a/lib/tsan/rtl/tsan_platform.h +++ b/lib/tsan/rtl/tsan_platform.h @@ -355,6 +355,8 @@ int call_pthread_cancel_with_cleanup(int(*fn)(void *c, void *m, void *abstime), void *c, void *m, void *abstime, void(*cleanup)(void *arg), void *arg); +void DestroyThreadState(); + } // namespace __tsan #endif // TSAN_PLATFORM_H -- cgit v1.2.3