Implement __kmp_gettid() for NetBSD

Summary: _lwp_self() returns current Thread Id in a numeric version on NetBSD.

Reviewers: joerg, mgorny, #openmp

Reviewed By: mgorny

Subscribers: llvm-commits, openmp-commits, #openmp

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D55497

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@348873 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kamil Rytarowski
2018-12-11 18:34:33 +00:00
parent 741abf8b86
commit 97619771cf
+3
View File
@@ -24,6 +24,9 @@
#if KMP_OS_DARWIN
// OS X
#define __kmp_gettid() syscall(SYS_thread_selfid)
#elif KMP_OS_NETBSD
#include <lwp.h>
#define __kmp_gettid() _lwp_self()
#elif defined(SYS_gettid)
// Hopefully other Unix systems define SYS_gettid syscall for getting os thread
// id