Skip to content

Commit 7e31b45

Browse files
authored
[OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (#65553)
Use the getthrid() function instead of a syscall.
1 parent 2f183d6 commit 7e31b45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmp/runtime/src/kmp_wrapper_getpid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <lwp.h>
3131
#define __kmp_gettid() _lwp_self()
3232
#elif KMP_OS_OPENBSD
33-
#define __kmp_gettid() syscall(SYS_getthrid)
33+
#define __kmp_gettid() getthrid()
3434
#elif defined(SYS_gettid)
3535
// Hopefully other Unix systems define SYS_gettid syscall for getting os thread
3636
// id

0 commit comments

Comments
 (0)