hle(host_posix): the thread and processor calls a job system asks for are still unimplemented #617
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:17:10Z.
Summary
A handful of kernel32/ calls that a job system or a crash reporter asks for have no implementation in
crates/victory-hle/src/host_posix, so they land in the loader's unimplemented-import stub. The ones worth having, with what they should answer on this host:GetActiveProcessorCount(group)cpus()for a real group, and forALL_PROCESSOR_GROUPS(0xFFFF); 0 for a group that does not exist. A title that sizes a worker pool by this currently gets the stub's 0GetCurrentProcessorNumber()0..cpus()(a hash of the thread id is enough; Windows only promises a hint)GetProcessIdOfThread(handle)GetCurrentThread's -2;ERROR_INVALID_HANDLEotherwiseSetThreadDescription/GetThreadDescriptionGethands back aLocalAlloced copy, as Windows doesGetThreadPriorityBoost/SetThreadPriorityBoostSetThreadStackGuaranteeNot part of #559 (which is about
DuplicateHandle,OpenThread,ExitThread,InitOnce*, the FLS destructors and pooled threadpool workers) and not touched by the threadpool work.Why it matters
GetActiveProcessorCountdeciding a pool's size, andGetCurrentProcessorNumberin a backoff loop, are the kind of call whose stub value is silent: the title does not fail, it just behaves as if the machine had no processors.SetThreadDescriptionis what a crash reporter prints next to a faulting thread.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:17:19Z.
/claim
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T15:17:29Z.
Claimed by @AnastasisKon. Open a draft pull request with
Refs #617in its description within 24 hours, or the claim expires.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T15:26:37Z.
Closed by #559's neighbour on the fork:
GetActiveProcessorCount,GetCurrentProcessorNumber,GetThreadPriorityBoost/SetThreadPriorityBoostandSetThreadStackGuaranteelanded earlier, and the rest of this list landed separately -GetMaximumProcessorCount,GetActiveProcessorGroupCount- this machine's numbers (one group holding every processor).GetProcessIdOfThread- this process for the calling thread's pseudo handle and for any thread in the handle table,ERROR_INVALID_HANDLEotherwise.SetThreadDescription/GetThreadDescription- the name kept per thread, handed back as aLocalAlloced copy, andS_OKwith no string for a thread that has none.Measured on the fork's
main: the five names resolve underapi-ms-win-core-sysinfo-l1-1-0andapi-ms-win-core-processthreads-l1-1-0/-l1-2-0, the HLE host suite is 430 tests with six new ones for these calls (a thread named, read back character for character with its terminator, cleared, and not shared with another thread), and all 16 shipped DLLs still exit 0 under--execute --unimplemented zero.One thing worth noting for whoever picks up the next batch:
GetActiveProcessorCountwas the sharp one. Its stub answered 0, so a pool sized by it decided the machine had no processors and nothing failed - the same shape of failure as the ones this issue was filed about.