about summary refs log tree commit diff
path: root/src/rustllvm/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-06-25 18:00:02 -0700
committerGitHub <noreply@github.com>2020-06-25 18:00:02 -0700
commit5158b3c9989a1872fae0cb72e5cd0b5228cf12c0 (patch)
tree49b26cebcd1e189328dab666b01cd26e09708cb1 /src/rustllvm/CoverageMappingWrapper.cpp
parent50fc24d8a172a853b5dfe40702d6550e3b8562ba (diff)
parent771a1d8e0ad4e6702aaab91cb5e58adbf3ec3708 (diff)
downloadrust-5158b3c9989a1872fae0cb72e5cd0b5228cf12c0.tar.gz
rust-5158b3c9989a1872fae0cb72e5cd0b5228cf12c0.zip
Rollup merge of #72617 - eduardosm:panicking, r=Amanieu
Add a fast path for `std::thread::panicking`.

This is done by adding a global atomic variable (non-TLS) that counts how many threads are panicking. In order to check if the current thread is panicking, this variable is read and, if it is zero, no thread (including the one where `panicking` is being called) is panicking and `panicking` can return `false` immediately without needing to access TLS. If the global counter is not zero, the local counter is accessed from TLS to check if the current thread is panicking.
Diffstat (limited to 'src/rustllvm/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions