summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2016-04-18 21:33:01 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2016-04-18 21:33:01 +0000
commitf252010f691d7ebf896ee6465c91f454fc46e621 (patch)
treec11dfc0b297f621f72afdcf68c4104e3e6a2f43d /lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp
parentf5b25f83e30af7c141af98f14dd9471c75b3aca8 (diff)
downloadbcm5719-llvm-f252010f691d7ebf896ee6465c91f454fc46e621.tar.gz
bcm5719-llvm-f252010f691d7ebf896ee6465c91f454fc46e621.zip
Fix for pthread_setspecific (TLS and shutdown) problem
Some codes that use TLS fail intermittently because one thread tries to write TLS values after the TLS key has been destroyed by another thread. This happens when one thread executes library shutdown (and destroys TLS keys), while another thread starts to execute the TLS key destructor routine. Before this change, the kmp_init_runtime flag was checked before calling pthread_* TLS functions, but this flag is set to FALSE later than the destruction of the TLS keys, which leads to failure. The fix is to check kmp_init_gtid instead, as this flag is unset *before* the destruction of TLS keys. Differential Revision: http://reviews.llvm.org/D19022 llvm-svn: 266674
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud