[asan] Refactor thread creation bookkeeping
authorVitaly Buka <vitalybuka@google.com>
Wed, 9 Aug 2017 00:38:57 +0000 (00:38 +0000)
committerVitaly Buka <vitalybuka@google.com>
Wed, 9 Aug 2017 00:38:57 +0000 (00:38 +0000)
commit703035474467d0c84ed80c969ef3c58b7bf8c244
tree044d271ecc1580fc3a84c09aa36aa3d9bfe8fbba
parent83832fe7dbd58daab4ee874c6a19d07160047841
[asan] Refactor thread creation bookkeeping

Summary:
This is a pure refactoring change.  It paves the way for OS-specific
implementations, such as Fuchsia's, that can do most of the
per-thread bookkeeping work in the creator thread before the new
thread actually starts.  This model is simpler and cleaner, avoiding
some race issues that the interceptor code for thread creation has
to do for the existing OS-specific implementations.

Submitted on behalf of Roland McGrath.

Reviewers: vitalybuka, alekseyshl, kcc

Reviewed By: alekseyshl

Subscribers: phosek, filcab, llvm-commits, kubamracek

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36385

llvm-svn: 310432
compiler-rt/lib/asan/asan_internal.h
compiler-rt/lib/asan/asan_rtl.cc
compiler-rt/lib/asan/asan_thread.cc
compiler-rt/lib/asan/asan_thread.h
compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc