From 2b82ec7947fe070c16091a7724b2865d49e3c299 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 7 Sep 2023 21:05:25 -0400 Subject: [PATCH] [OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (#65553) Use the getthrid() function instead of a syscall. (cherry picked from commit 7e31b45d6a2571ff17426930dcbb784473a965b4) --- 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 32ede3e..82b1fe7 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 -- 2.7.4