[Openmp-commits] [openmp] 09af378 - [OpenMP] Fix build on macOS sdk 10.12 and newer
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Aug 26 06:53:16 PDT 2020
Author: AndreyChurbanov
Date: 2020-08-26T16:52:46+03:00
New Revision: 09af378f49dca98bc931ba0ff2c1cde307fe7c2c
URL: https://github.com/llvm/llvm-project/commit/09af378f49dca98bc931ba0ff2c1cde307fe7c2c
DIFF: https://github.com/llvm/llvm-project/commit/09af378f49dca98bc931ba0ff2c1cde307fe7c2c.diff
LOG: [OpenMP] Fix build on macOS sdk 10.12 and newer
Patch by nihui (Ni Hui)
Differential Revision: https://reviews.llvm.org/D76755
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 257772ad92bc..32ede3ed715b 100644
--- a/openmp/runtime/src/kmp_wrapper_getpid.h
+++ b/openmp/runtime/src/kmp_wrapper_getpid.h
@@ -22,7 +22,7 @@
#include <unistd.h>
#if KMP_OS_DARWIN
// OS X
-#define __kmp_gettid() syscall(SYS_thread_selfid)
+#define __kmp_gettid() pthread_mach_thread_np(pthread_self())
#elif KMP_OS_FREEBSD
#include <pthread_np.h>
#define __kmp_gettid() pthread_getthreadid_np()
More information about the Openmp-commits
mailing list