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
This commit is contained in:
Dimitry Andric 2019-03-16 13:45:14 +00:00
parent cc471ead66
commit 4f7e044e54
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345234

View File

@ -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()