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());
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());
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits