[Lldb-commits] [PATCH] D29264: Add NetBSD support in Host::GetCurrentThreadID
Kamil Rytarowski via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jan 29 14:52:46 PST 2017
krytarowski created this revision.
krytarowski added a project: LLDB.
To retrieve the native thread ID there must be called _lwp_self().
Sponsored by <The NetBSD Foundation>
Repository:
rL LLVM
https://reviews.llvm.org/D29264
Files:
source/Host/common/Host.cpp
Index: source/Host/common/Host.cpp
===================================================================
--- source/Host/common/Host.cpp
+++ source/Host/common/Host.cpp
@@ -40,6 +40,10 @@
#include <pthread_np.h>
#endif
+#if defined(__NetBSD__)
+#include <lwp.h>
+#endif
+
// C++ Includes
// Other libraries and framework includes
@@ -320,6 +324,8 @@
return thread_self;
#elif defined(__FreeBSD__)
return lldb::tid_t(pthread_getthreadid_np());
+#elif defined(__NetBSD__)
+ return lldb::tid_t(_lwp_self());
#elif defined(__ANDROID__)
return lldb::tid_t(gettid());
#elif defined(__linux__)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29264.86226.patch
Type: text/x-patch
Size: 606 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170129/0ffb264c/attachment.bin>
More information about the lldb-commits
mailing list