[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 06:58:06 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe0968ad45948: call ::pthread_detach on llvm_execute_on_thread_impl (authored by njames93).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83039/new/

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.275100.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/4052cf1d/attachment.bin>


More information about the llvm-commits mailing list