Skip to content

The compiler asks the runtime for its thread id; the Windows runtime's bare pthread_self goes (#3311) - #3463

Merged
ehartford merged 2 commits into
mainfrom
thread-id-through-runtime
Nov 19, 2026
Merged

ehartford merged 2 commits into
mainfrom
thread-id-through-runtime

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Closes #3311 (step 2; step 1 added rt_thread_id to every backend, and the seed pinned on 2026-11-18 carries it).

  • LlvmBridge.cstr_thread_id calls rt_thread_id() through rt.platform; its extern fn pthread_self is gone (a src/ extern of a libc function, which the instructions forbid).
  • The seed-bound pub fn pthread_self is deleted from rt/windows_x86_64.w and rt/windows_aarch64.w. It was the one pub fn there not named rt_*, with_*, win_* or __with*, and it was a bare symbol in every Windows program that links the runtime: an undeclared pthread_self() compiled, an export of the name did not link, and a program's own fn pthread_self(x: i32) -> i32 failed with "no finalized FnAbi signature".
  • pthread_self leaves codegen_is_runtime_abi_symbol and CCodegen's list. docs/with-abi.sha256 is re-recorded for FnAbi.w: the list of bare runtime names changed, the calling convention did not, so WITH_ABI_VERSION stays.

Not run here: the three Windows programs in the issue. The Windows x86_64 nightly is their check. windows-aarch64's pinned seed predates rt_thread_id (#2893, non-gating).

One test (a program's own pthread_self with a parameter). Battery green on the branch tip; :release-checks green (the ABI source hash keys the bundles).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: the runtime's pthread_self is a bare symbol in every program that links the runtime (leftover from #1755, #1756)

1 participant