projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23eeae5
)
call ::pthread_detach on llvm_execute_on_thread_impl
author
Nathan James
<n.james93@hotmail.co.uk>
Thu, 2 Jul 2020 13:41:03 +0000
(14:41 +0100)
committer
Nathan James
<n.james93@hotmail.co.uk>
Thu, 2 Jul 2020 13:41:05 +0000
(14:41 +0100)
Fixes all TSAN bugs in clangd
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D83039
llvm/lib/Support/Unix/Threading.inc
patch
|
blob
|
history
diff --git
a/llvm/lib/Support/Unix/Threading.inc
b/llvm/lib/Support/Unix/Threading.inc
index
9c1f116
..
2d0aaca
100644
(file)
--- a/
llvm/lib/Support/Unix/Threading.inc
+++ b/
llvm/lib/Support/Unix/Threading.inc
@@
-94,6
+94,10
@@
llvm_execute_on_thread_impl(void *(*ThreadFunc)(void *), void *Arg,
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);
+ }
}
}