]> granicus.if.org Git - llvm/commitdiff
Try again to appease the FreeBSD bot.
authorZachary Turner <zturner@google.com>
Fri, 3 Mar 2017 18:21:04 +0000 (18:21 +0000)
committerZachary Turner <zturner@google.com>
Fri, 3 Mar 2017 18:21:04 +0000 (18:21 +0000)
The actual logic was wrong, not just the type conversion.
This should get it correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296899 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Unix/Threading.inc

index e1a37cc47e0568bfecf354c6c6bdac5afc9f574d..06f4a2da6e7c6f4bd3087481f3cd484dc06921eb 100644 (file)
@@ -126,13 +126,8 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
   Name.clear();
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#if defined(__FreeBSD_kernel__)
-  auto pid = ::pthread_self();
-#else
-  auto pid = ::getpid();
-#endif
-
-  int tid = ::pthread_getthreadid_np();
+  int pid = ::getpid();
+  uint64_t tid = get_threadid();
 
   struct kinfo_proc *kp = nullptr, *nkp;
   size_t len = 0;