aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/ModuleDependencyCollector.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-04-06 23:46:40 +0000
committerJustin Lebar <jlebar@google.com>2016-04-06 23:46:40 +0000
commit9e479e4763df7801a7da3209f69dcb4875645552 (patch)
tree784cf2a65ef7fd5358d64e8ac1d67e78c2e64e5c /clang/lib/Frontend/ModuleDependencyCollector.cpp
parentdd11ee7452beae10875e7690ea5dccda0ee52444 (diff)
downloadllvm-9e479e4763df7801a7da3209f69dcb4875645552.zip
llvm-9e479e4763df7801a7da3209f69dcb4875645552.tar.gz
llvm-9e479e4763df7801a7da3209f69dcb4875645552.tar.bz2
Fix a race condition in support library ThreadPool.
By running TSAN on the ThreadPool unit tests it was discovered that the threads in the pool can pop tasks off the queue at the same time the "wait" routine is trying to check if the task queue is empty. This patch fixes this problem by checking for active threads in the waiter before checking whether the queue is empty. Patch by Jason Henline. Differential Revision: http://reviews.llvm.org/D18811 Reviewers: joker.eph, jlebar llvm-svn: 265618
Diffstat (limited to 'clang/lib/Frontend/ModuleDependencyCollector.cpp')
0 files changed, 0 insertions, 0 deletions