We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cd117c commit 66b7ba5Copy full SHA for 66b7ba5
llvm/lib/Support/Unix/Threading.inc
@@ -37,6 +37,10 @@
37
#include <lwp.h> // For _lwp_self()
38
#endif
39
40
+#if defined(__OpenBSD__)
41
+#include <unistd.h> // For getthrid()
42
+#endif
43
+
44
#if defined(__linux__)
45
#include <sched.h> // For sched_getaffinity
46
#include <sys/syscall.h> // For syscall codes
@@ -105,6 +109,8 @@ uint64_t llvm::get_threadid() {
105
109
return uint64_t(pthread_getthreadid_np());
106
110
#elif defined(__NetBSD__)
107
111
return uint64_t(_lwp_self());
112
+#elif defined(__OpenBSD__)
113
+ return uint64_t(getthrid());
108
114
#elif defined(__ANDROID__)
115
return uint64_t(gettid());
116
#elif defined(__linux__)
0 commit comments