HLE: implement XTaskQueueRegisterWaiter and XTaskQueueUnregisterWaiter #1435
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1435
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1435/head"
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?
@fuzeofficlal on GitHub · 2026-11-24 17:58 UTC · original
fuzeofficlal:feat/hle-xtaskqueue-waiter-888→main· +512 −3 · 1 files · 1 commits · closed without mergingFixes #888.
Summary
XTaskQueueRegisterWaiterandXTaskQueueUnregisterWaiterand wire vtable slots20(0xa0) and21(0xa8) onXTaskQueue.WaitForMultipleObjects), wait for each dispatched callback to finish before re-arming manual-reset handles, purge queued waiter callbacks on unregister without deadlocking self-unregistering callbacks, and delivercanceled = trueonXTaskQueueTerminate.Verification
XTaskQueueTerminatecancellation.cargo test --workspace,cargo clippy --workspace --all-targets --all-features, andcargo xtask policy: passed.@Marvisak on GitHub · 2026-11-25 01:28 UTC · original · edited 2026-11-25 06:29 UTC
Automated triage for the maintainers.
Needs work. It merges cleanly. The PR wires slots 0xa0 and 0xa8 of the task-queue object (
crates/victory-hle/src/modules/xasync.rs) to a waiter implementation: a duplicated handle and a stop event, one OS thread per waiter inwaiter_loop, re-arming after each callback, and cleanup on unregister,XTaskQueueTerminateandQueue::drop. I read through the locking and found no deadlock. Self-unregistering from the callback, and dropping the last queue reference on the waiter thread, both skip the join correctly. What it needs:main, both slots go tomissing::<20>/missing::<21>, which logruntime method not implementedwith the slot. A log line showing the title calls 0xa0 would justify 500 lines and a thread per waiter. Without one, this adds runtime behaviour nobody has seen needed.XTaskQueueTerminatenow calls every registered waiter's callback once withcanceled = true, and the test pins that. Please point to public documentation or observed behaviour for that, because a waiter that was never signalled might also just be dropped silently.The same patch was first posted on a fork in #888 by another contributor. Please credit them, or say how the two relate.
CI: passing (
check).Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-25 17:20 UTC · original
Closing this PR: as noted in triage, adding the
XTaskQueue0xa0/0xa8implementation without title call-site logs is premature. Happy to revisit if a title hits those slots.Pull request closed