diff options
author | David CARLIER <devnexen@gmail.com> | 2022-05-18 13:10:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-18 13:10:10 (GMT) |
commit | 9a1adf2790c156318158606ad83df9ce494f326a (patch) | |
tree | cdda30f9ff3be458d82fc7d24031a316ef68b4b7 /Python/thread_pthread.h | |
parent | e0477ae371d983bec07b3dc75e6426785592f2d4 (diff) | |
download | cpython-9a1adf2790c156318158606ad83df9ce494f326a.zip cpython-9a1adf2790c156318158606ad83df9ce494f326a.tar.gz cpython-9a1adf2790c156318158606ad83df9ce494f326a.tar.bz2 |
bpo-42047: Add native thread ID for DragonFlyBSD (#22714)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: kj <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
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 2237018..1b2c28d 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -23,6 +23,8 @@ # include <sys/thread.h> /* thread_self() */ #elif defined(__NetBSD__) # include <lwp.h> /* _lwp_self() */ +#elif defined(__DragonFly__) +# include <sys/lwp.h> /* lwp_gettid() */ #endif /* The POSIX spec requires that use of pthread_attr_setstacksize @@ -349,6 +351,9 @@ PyThread_get_thread_native_id(void) #elif defined(__NetBSD__) lwpid_t native_id; native_id = _lwp_self(); +#elif defined(__DragonFly__) + lwpid_t native_id; + native_id = lwp_gettid(); #endif return (unsigned long) native_id; } |