[OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (#65553)

Use the getthrid() function instead of a syscall.
This commit is contained in:
Brad Smith 2023-09-07 21:05:25 -04:00 committed by GitHub
parent 2f183d6efb
commit 7e31b45d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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