diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-04 15:09:14 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-04 15:09:14 +0000 |
commit | 9798c96cf144cfb203756457a0cdb751b498a625 (patch) | |
tree | c4b541f8cc7b0493109ff584cba2e7cce6aab5cc /lib/tsan/rtl/tsan_platform.h | |
parent | d486db8e9130049bd6717c1c5761e25c83c39840 (diff) |
[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
Diffstat (limited to 'lib/tsan/rtl/tsan_platform.h')
-rw-r--r-- | lib/tsan/rtl/tsan_platform.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |