Skip to content

Commit d2ce9dc

Browse files
authored
Add support for retrieving the thread ID on DragonFly BSD (#106938)
1 parent dd5d730 commit d2ce9dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Support/Unix/Threading.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#include <pthread.h>
3131

32-
#if defined(__FreeBSD__) || defined(__OpenBSD__)
32+
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
3333
#include <pthread_np.h> // For pthread_getthreadid_np() / pthread_set_name_np()
3434
#endif
3535

@@ -121,7 +121,7 @@ uint64_t llvm::get_threadid() {
121121
return InitSelf;
122122
}();
123123
return Self;
124-
#elif defined(__FreeBSD__)
124+
#elif defined(__FreeBSD__) || defined(__DragonFly__)
125125
return uint64_t(pthread_getthreadid_np());
126126
#elif defined(__NetBSD__)
127127
return uint64_t(_lwp_self());

0 commit comments

Comments
 (0)