diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-05 13:54:50 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-11-05 13:54:50 +0000 |
commit | cd18f28751ad304e0ecd9b8d7c0cb67bff4e0768 (patch) | |
tree | 28f9718f9a2596513219678e67f76adecdeb0ce5 /lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp | |
parent | f714d470d76e9d5eab7f224719208eec95b2b17b (diff) | |
download | bcm5719-llvm-cd18f28751ad304e0ecd9b8d7c0cb67bff4e0768.tar.gz bcm5719-llvm-cd18f28751ad304e0ecd9b8d7c0cb67bff4e0768.zip |
[tsan] Alternative ThreadState storage for OS X
This implements a "poor man's TLV" to be used for TSan's ThreadState on OS X. Based on the fact that `pthread_self()` is always available and reliable and returns a valid pointer to memory, we'll use the shadow memory of this pointer as a thread-local storage. No user code should ever read/write to this internal libpthread structure, so it's safe to use it for this purpose. We lazily allocate the ThreadState object and store the pointer here.
Differential Revision: http://reviews.llvm.org/D14288
llvm-svn: 252159
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/process/main.cpp')
0 files changed, 0 insertions, 0 deletions