From d19fe96ac9cdf42b24f19a6175dddb7284516d2b 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296899 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; -- 2.50.1