From 5287022eeeb3c017d49fc8580b52e18377bf23f3 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 12 Jun 2019 15:37:56 +0000 Subject: bpo-37160: Thread native ID NetBSD support (GH-13835) --- Python/thread_pthread.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Python/thread_pthread.h') diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 740b521b94..9b4b23bdc7 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -18,6 +18,8 @@ # include /* pthread_getthreadid_np() */ #elif defined(__OpenBSD__) # include /* getthrid() */ +#elif defined(__NetBSD__) /* _lwp_self */ +# include #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; } -- cgit v1.2.1