mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 01:29:52 +00:00
Add NetBSD support in Host::GetCurrentThreadID
Summary: To retrieve the native thread ID there must be called _lwp_self(). Sponsored by <The NetBSD Foundation> Reviewers: joerg, clayborg, emaste, labath Reviewed By: joerg, clayborg, labath Subscribers: #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D29264 llvm-svn: 293625
This commit is contained in:
parent
753625b62e
commit
e5c6a32163
@ -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 @@ lldb::tid_t Host::GetCurrentThreadID() {
|
||||
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__)
|
||||
|
Loading…
Reference in New Issue
Block a user