diff options
author | David Carlier <dcarlier@afilias.info> | 2019-06-12 15:37:56 +0000 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-06-12 17:37:56 +0200 |
commit | 5287022eeeb3c017d49fc8580b52e18377bf23f3 (patch) | |
tree | 74a6058866de460894474587985c05add709eecc /Python/thread_pthread.h | |
parent | bpo-35545: Skip `test_asyncio.test_create_connection_ipv6_scope` on AIX (GH-1... (diff) | |
download | cpython-5287022eeeb3c017d49fc8580b52e18377bf23f3.tar.gz cpython-5287022eeeb3c017d49fc8580b52e18377bf23f3.tar.bz2 cpython-5287022eeeb3c017d49fc8580b52e18377bf23f3.zip |
bpo-37160: Thread native ID NetBSD support (GH-13835)
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r-- | Python/thread_pthread.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 740b521b944..9b4b23bdc7d 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -18,6 +18,8 @@ # include <pthread_np.h> /* pthread_getthreadid_np() */ #elif defined(__OpenBSD__) # include <unistd.h> /* getthrid() */ +#elif defined(__NetBSD__) /* _lwp_self */ +# include <lwp.h> #endif /* The POSIX spec requires that use of pthread_attr_setstacksize @@ -328,6 +330,9 @@ PyThread_get_thread_native_id(void) #elif defined(__OpenBSD__) pid_t native_id; native_id = getthrid(); +#elif defined(__NetBSD__) + lwpid_t native_id; + native_id = _lwp_self(); #endif return (unsigned long) native_id; } |