diff options
| author | mikhnenko <[email protected]> | 2025-07-15 20:05:43 +0300 |
|---|---|---|
| committer | mikhnenko <[email protected]> | 2025-07-15 20:52:16 +0300 |
| commit | a40bd4f45bbc18fd95b1596e655b8942ceb2cf4b (patch) | |
| tree | bce599ca02c778c277198de6d131d37db71997d0 /contrib/libs/cxxsupp/openmp/kmp_wrapper_getpid.h | |
| parent | 728e0eaef4dc1f1152d2c3a4cc1bbdf597f3ef3d (diff) | |
Update contrib/libs/cxxsupp/openmp to 20.1.7
commit_hash:722dd5fe79203d22ad4a0be288ac0caeb6b3dd68
Diffstat (limited to 'contrib/libs/cxxsupp/openmp/kmp_wrapper_getpid.h')
| -rw-r--r-- | contrib/libs/cxxsupp/openmp/kmp_wrapper_getpid.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/libs/cxxsupp/openmp/kmp_wrapper_getpid.h b/contrib/libs/cxxsupp/openmp/kmp_wrapper_getpid.h index 32ede3ed715..d31c6e80f75 100644 --- a/contrib/libs/cxxsupp/openmp/kmp_wrapper_getpid.h +++ b/contrib/libs/cxxsupp/openmp/kmp_wrapper_getpid.h @@ -17,20 +17,25 @@ // On Unix-like systems (Linux* OS and OS X*) getpid() is declared in standard // headers. +#if !defined(KMP_OS_AIX) #include <sys/syscall.h> +#endif #include <sys/types.h> #include <unistd.h> #if KMP_OS_DARWIN // OS X #define __kmp_gettid() pthread_mach_thread_np(pthread_self()) -#elif KMP_OS_FREEBSD +#elif KMP_OS_FREEBSD || KMP_OS_DRAGONFLY #include <pthread_np.h> #define __kmp_gettid() pthread_getthreadid_np() #elif KMP_OS_NETBSD #include <lwp.h> #define __kmp_gettid() _lwp_self() #elif KMP_OS_OPENBSD -#define __kmp_gettid() syscall(SYS_getthrid) +#define __kmp_gettid() getthrid() +#elif KMP_OS_AIX +#include <pthread.h> +#define __kmp_gettid() pthread_self() #elif defined(SYS_gettid) // Hopefully other Unix systems define SYS_gettid syscall for getting os thread // id |
