Skip to content

Conversation

joboet
Copy link
Member

@joboet joboet commented Sep 17, 2025

This PR moves the responsibility for calling set_current (which initialises the thread handle) to the platform implementation. This unblocks #144465 and cleans up the fallout from #144500, as well as enabling the removal of the set_name function on platforms without thread names (as we now have access to the thread name in the platform thread main function).

This PR also contains a second commit (sorry, I couldn't help myself) that fixes a (mostly theoretical) unsoundness introduced by #115746, which added a call to current_os_id to the SIGSEGV signal handler even though that function might not be async-signal-safe. The thread ID is now initialised before the stack overflow information, so the ID can be stored therein.

@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants