From dd6a386236a0de6abfc8fcc3c943e625b5b974d9 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 3 Mar 2017 18:21:04 +0000 Subject: [PATCH] Try again to appease the FreeBSD bot. The actual logic was wrong, not just the type conversion. This should get it correct. llvm-svn: 296899 --- lib/Support/Unix/Threading.inc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/Support/Unix/Threading.inc b/lib/Support/Unix/Threading.inc index e1a37cc47e0..06f4a2da6e7 100644 --- a/lib/Support/Unix/Threading.inc +++ b/lib/Support/Unix/Threading.inc @@ -126,13 +126,8 @@ void llvm::get_thread_name(SmallVectorImpl &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;