svn commit: r345234 - head/contrib/openmp/runtime/src
Dimitry Andric
dim at FreeBSD.org
Sat Mar 16 13:45:15 UTC 2019
Author: dim
Date: Sat Mar 16 13:45:14 2019
New Revision: 345234
URL: https://svnweb.freebsd.org/changeset/base/345234
Log:
Add openmp __kmp_gettid() wrapper, using pthread_getthreadid_np(3).
This has also been submitted upstream.
PR: 236062
MFC after: 1 month
X-MFC-With: r344779
Modified:
head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h
Modified: head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h
==============================================================================
--- head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h Sat Mar 16 13:43:07 2019 (r345233)
+++ head/contrib/openmp/runtime/src/kmp_wrapper_getpid.h Sat Mar 16 13:45:14 2019 (r345234)
@@ -24,6 +24,9 @@
#if KMP_OS_DARWIN
// OS X
#define __kmp_gettid() syscall(SYS_thread_selfid)
+#elif KMP_OS_FREEBSD
+#include <pthread_np.h>
+#define __kmp_gettid() pthread_getthreadid_np()
#elif KMP_OS_NETBSD
#include <lwp.h>
#define __kmp_gettid() _lwp_self()
More information about the svn-src-all
mailing list