From d0eeb936d8daf05d7d89f6935e3f4c0dee49c5be Mon Sep 17 00:00:00 2001 From: Michael Felt Date: Fri, 14 Jun 2019 00:34:46 +0200 Subject: bpo-37077: Add native thread ID (TID) for AIX (GH-13624) This is the followup for issue36084 https://bugs.python.org/issue37077 --- Python/thread_pthread.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Python/thread_pthread.h') diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 9b4b23bdc7..a36d16c19e 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -18,8 +18,10 @@ # include /* pthread_getthreadid_np() */ #elif defined(__OpenBSD__) # include /* getthrid() */ -#elif defined(__NetBSD__) /* _lwp_self */ -# include +#elif defined(_AIX) +# include /* thread_self() */ +#elif defined(__NetBSD__) +# include /* _lwp_self() */ #endif /* The POSIX spec requires that use of pthread_attr_setstacksize @@ -330,6 +332,9 @@ PyThread_get_thread_native_id(void) #elif defined(__OpenBSD__) pid_t native_id; native_id = getthrid(); +#elif defined(_AIX) + tid_t native_id; + native_id = thread_self(); #elif defined(__NetBSD__) lwpid_t native_id; native_id = _lwp_self(); -- cgit v1.2.1