[Openmp-commits] [openmp] 7e31b45 - [OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (#65553)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Sep 7 18:05:29 PDT 2023
Author: Brad Smith
Date: 2023-09-07T21:05:25-04:00
New Revision: 7e31b45d6a2571ff17426930dcbb784473a965b4
URL: https://github.com/llvm/llvm-project/commit/7e31b45d6a2571ff17426930dcbb784473a965b4
DIFF: https://github.com/llvm/llvm-project/commit/7e31b45d6a2571ff17426930dcbb784473a965b4.diff
LOG: [OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (#65553)
Use the getthrid() function instead of a syscall.
Added:
Modified:
openmp/runtime/src/kmp_wrapper_getpid.h
Removed:
################################################################################
diff --git a/openmp/runtime/src/kmp_wrapper_getpid.h b/openmp/runtime/src/kmp_wrapper_getpid.h
index 605c802d1b92136..f9d7f4804fbc6ec 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
More information about the Openmp-commits
mailing list