[Lldb-commits] [PATCH] D126982: [lldb] [test] Implement getting thread ID on FreeBSD

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 10 01:27:31 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGdf9487711249: [lldb] [test] Implement getting thread ID on FreeBSD (authored by mgorny).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126982

Files:
  lldb/packages/Python/lldbsuite/test/make/thread.h


Index: lldb/packages/Python/lldbsuite/test/make/thread.h
===================================================================
--- lldb/packages/Python/lldbsuite/test/make/thread.h
+++ lldb/packages/Python/lldbsuite/test/make/thread.h
@@ -9,6 +9,8 @@
 #elif defined(__linux__)
 #include <sys/syscall.h>
 #include <unistd.h>
+#elif defined(__FreeBSD__)
+#include <pthread_np.h>
 #elif defined(__NetBSD__)
 #include <lwp.h>
 #elif defined(_WIN32)
@@ -22,6 +24,8 @@
   return tid;
 #elif defined(__linux__)
   return syscall(__NR_gettid);
+#elif defined(__FreeBSD__)
+  return static_cast<uint64_t>(pthread_getthreadid_np());
 #elif defined(__NetBSD__)
   // Technically lwpid_t is 32-bit signed integer
   return static_cast<uint64_t>(_lwp_self());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126982.435833.patch
Type: text/x-patch
Size: 745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220610/c0fb4eb1/attachment.bin>


More information about the lldb-commits mailing list