This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kulikjak
Recipients kulikjak, miss-islington, petr.viktorin, shihai1991, vstinner
Date 2022-01-17.11:47:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642420059.83.0.499082152795.issue44133@roundup.psfhosted.org>
In-reply-to
Content
Ah, sorry, I could have described the issue better. It's not a problem with exporting, PyThread_get_thread_native_id() isn't available on Solaris (and possibly other platforms) at all.

https://github.com/python/cpython/blob/main/Include/pythread.h#L28
https://github.com/python/cpython/blob/main/Python/thread_pthread.h#L329

The reason I didn't implement it yet is that Solaris doesn't expose anything like native thread id. We do have functions like `_lwp_self()` or `pthread_self()` or `thr_self()` but neither of them returns id where "value may be used to uniquely identify this particular thread system-wide". (I presume that means that no other thread of no other process running on a given system would return the same number - all these functions return single digit numbers so there is no way they are unique system wide).

If necessary, I guess that such a number can be created by masking pid and thread id together, but then there's a question of how it is supposed to be used (because OS would not understand it).
History
Date User Action Args
2022-01-17 11:47:39kulikjaksetrecipients: + kulikjak, vstinner, petr.viktorin, miss-islington, shihai1991
2022-01-17 11:47:39kulikjaksetmessageid: <1642420059.83.0.499082152795.issue44133@roundup.psfhosted.org>
2022-01-17 11:47:39kulikjaklinkissue44133 messages
2022-01-17 11:47:39kulikjakcreate