Date: Sat, 16 Mar 2019 13:45:14 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345234 - head/contrib/openmp/runtime/src Message-ID: <201903161345.x2GDjESM005945@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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()
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903161345.x2GDjESM005945>