aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 2237018e9cb..1b2c28d0f39 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;
}