Add support for retrieving the thread ID on DragonFly BSD (#106938)
This commit is contained in:
parent
dd5d730072
commit
d2ce9dc85e
@ -29,7 +29,7 @@
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#include <pthread_np.h> // For pthread_getthreadid_np() / pthread_set_name_np()
|
||||
#endif
|
||||
|
||||
@ -121,7 +121,7 @@ uint64_t llvm::get_threadid() {
|
||||
return InitSelf;
|
||||
}();
|
||||
return Self;
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
return uint64_t(pthread_getthreadid_np());
|
||||
#elif defined(__NetBSD__)
|
||||
return uint64_t(_lwp_self());
|
||||
|
Loading…
x
Reference in New Issue
Block a user