diff options
author | Kamil Rytarowski <n54@gmx.com> | 2017-11-26 20:20:42 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2017-11-26 20:20:42 +0000 |
commit | 7160c2f770a44020c821bf44436132d623fb558d (patch) | |
tree | cae3df415115e9d8ef1f04f225e671e009f85599 /llvm/lib/Support/ThreadPool.cpp | |
parent | 61145d5c2538749f2b8892ef8f1eea3ec485c6b2 (diff) | |
download | llvm-7160c2f770a44020c821bf44436132d623fb558d.zip llvm-7160c2f770a44020c821bf44436132d623fb558d.tar.gz llvm-7160c2f770a44020c821bf44436132d623fb558d.tar.bz2 |
Prevent Thread Exited/Joined events race
Summary:
Add atomic verification to ensure that Thread is Joined after marking it
Finished.
It is required for NetBSD in order to prevent Thread Exited/Joined race,
that may occur when native system libpthread(3) cannot be reliably traced
in a way to guarantee that the mentioned events happen one after another.
This change fixes at least TSan and LSan on NetBSD.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, dvyukov, vitalybuka
Reviewed By: dvyukov
Subscribers: llvm-commits, kubamracek, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D40294
llvm-svn: 319004
Diffstat (limited to 'llvm/lib/Support/ThreadPool.cpp')
0 files changed, 0 insertions, 0 deletions