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

@orlp
Copy link
Contributor

orlp commented Sep 21, 2025

This actually conflicts with #144465 due to parallel work. @joboet Can you take a look?

@bors
Copy link
Collaborator

bors commented Sep 29, 2025

☔ The latest upstream changes (presumably #147090) made this pull request unmergeable. Please resolve the merge conflicts.

@joboet joboet added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 31, 2025
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-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants