[Openmp-commits] [openmp] [OpenMP] Use the more appropriate function to retrieve the thread id on OpenBSD (PR #65553)

Brad Smith via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 6 17:08:10 PDT 2023


https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/65553:

None

>From c222863204982cb1cba9982a1e25db651dbf1808 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Wed, 6 Sep 2023 20:00:18 -0400
Subject: [PATCH] [OpenMP] Use the more appropriate function to retrieve the
 thread id on OpenBSD

---
 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 32ede3ed715b4a..82b1fe767507d3 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