diff options
author | Brad Smith <brad@comstyle.com> | 2023-09-07 21:05:25 -0400 |
---|---|---|
committer | Tobias Hieta <tobias@hieta.se> | 2023-10-30 10:18:17 +0100 |
commit | 2b82ec7947fe070c16091a7724b2865d49e3c299 (patch) | |
tree | bc45dd5e74c1488f9940946a376c9c0a10b6a3cd | |
parent | [libc++] Encode additional ODR-affecting properties in the ABI tag (#69669) (diff) | |
download | llvm-project-2b82ec7947fe070c16091a7724b2865d49e3c299.tar.gz llvm-project-2b82ec7947fe070c16091a7724b2865d49e3c299.tar.bz2 llvm-project-2b82ec7947fe070c16091a7724b2865d49e3c299.zip |
[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)
-rw-r--r-- | openmp/runtime/src/kmp_wrapper_getpid.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_wrapper_getpid.h b/openmp/runtime/src/kmp_wrapper_getpid.h index 32ede3ed715b..82b1fe767507 100644 --- a/openmp/runtime/src/kmp_wrapper_getpid.h +++ b/openmp/runtime/src/kmp_wrapper_getpid.h @@ -30,7 +30,7 @@ #include <lwp.h> #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 |