From b42c4276ab63fd7b29c459afbd5fa75a04aedc6c Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 6 Sep 2023 20:00:18 -0400 Subject: [PATCH] [OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD Use the getthrid() function instead of a syscall. --- openmp/runtime/src/kmp_wrapper_getpid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmp/runtime/src/kmp_wrapper_getpid.h b/openmp/runtime/src/kmp_wrapper_getpid.h index 32ede3ed715b4..82b1fe767507d 100644 --- a/openmp/runtime/src/kmp_wrapper_getpid.h +++ b/openmp/runtime/src/kmp_wrapper_getpid.h @@ -30,7 +30,7 @@ #include #define __kmp_gettid() _lwp_self() #elif KMP_OS_OPENBSD -#define __kmp_gettid() syscall(SYS_getthrid) +#define __kmp_gettid() getthrid() #elif defined(SYS_gettid) // Hopefully other Unix systems define SYS_gettid syscall for getting os thread // id