[PATCH] D83039: call ::pthread_detach on llvm_execute_on_thread_impl
Nathan James via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 05:20:40 PDT 2020
njames93 created this revision.
njames93 added a reviewer: sammccall.
Herald added subscribers: llvm-commits, usaxena95, kadircet, ilya-biryukov, hiraditya.
Herald added a project: LLVM.
Fixes all TSAN bugs in clangd
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83039
Files:
llvm/lib/Support/Unix/Threading.inc
Index: llvm/lib/Support/Unix/Threading.inc
===================================================================
--- llvm/lib/Support/Unix/Threading.inc
+++ llvm/lib/Support/Unix/Threading.inc
@@ -94,6 +94,10 @@
if ((errnum = ::pthread_join(Thread, nullptr)) != 0) {
ReportErrnumFatal("pthread_join failed", errnum);
}
+ } else if (JP == JoiningPolicy::Detach) {
+ if ((errnum = ::pthread_detach(Thread)) != 0) {
+ ReportErrnumFatal("pthread_detach failed", errnum);
+ }
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83039.275068.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/9c46fb71/attachment.bin>
More information about the llvm-commits
mailing list