Go to the documentation of this file.
13#ifndef KMP_WRAPPER_GETPID_H
14#define KMP_WRAPPER_GETPID_H
20#if !KMP_OS_AIX && !KMP_OS_HAIKU
21#include <sys/syscall.h>
27#define __kmp_gettid() pthread_mach_thread_np(pthread_self())
28#elif KMP_OS_FREEBSD || KMP_OS_DRAGONFLY
29#include <pthread_np.h>
30#define __kmp_gettid() pthread_getthreadid_np()
33#define __kmp_gettid() _lwp_self()
35#define __kmp_gettid() getthrid()
36#elif KMP_OS_AIX || KMP_OS_SOLARIS
38#define __kmp_gettid() pthread_self()
41#define __kmp_gettid() find_thread(NULL)
42#elif defined(SYS_gettid)
45#define __kmp_gettid() syscall(SYS_gettid)
47#warning No gettid found, use getpid instead
48#define __kmp_gettid() getpid()
61#define __kmp_gettid() GetCurrentThreadId()
65#error Unknown or unsupported OS.