Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
On DragonFly BSD, :func:`threading.get_native_id` now returns a value that is
unique across processes, matching the other platforms.
4 changes: 2 additions & 2 deletions Python/thread_pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ PyThread_get_thread_native_id(void)
lwpid_t native_id;
native_id = _lwp_self();
#elif defined(__DragonFly__)
lwpid_t native_id;
native_id = lwp_gettid();
// lwp_gettid() is only unique within a process, so combine it with the pid.
unsigned long native_id = (unsigned long)getpid() << 32 | lwp_gettid();
#endif
return (unsigned long) native_id;
}
Expand Down
Loading