feat(xgameruntime): map threading slots 16 and 18 from a second GDK module #73

Manually merged
github merged 1 commit from gh-pr/73/head into gh-pr/73/base 2026-11-26 19:17:42 +00:00
Owner

@⁠Dark3581 on GitHub · 2026-11-23 05:33 UTC · original
Dark3581:feat/threading-dispatch-submit → main · +21 −6 · 4 files · 1 commits · merged 2026-11-23 05:36 UTC

What

Two more slots of the GDK threading table (#71), measured in a second bundled GDK module (the package's curl build). Its own code calls these threading slots: 3, 5, 12, 16, 17, 18, 22 and 29. Two of them were not mapped yet:

Slot Shape Call sites Return use Function
16 ptr, u32, u32 3 the thunk keeps only al; a caller loops while (slot16(q, 1, 0) || ...) XTaskQueueDispatch (returns bool)
18 ptr, u32, ptr, ptr 5 every caller tests eax with js XTaskQueueSubmitCallback (returns HRESULT)

Both shapes are also what the slot order predicted (#71 left them unmapped for lack of a call site). They forward to the existing XTaskQueueDispatch and XTaskQueueSubmitCallback. The debt entry is updated. e2e_api_unmapped now uses slot 20, which is still unmapped.

Tested

Windows 10, MinGW (GCC) and MSVC 2022.

  • e2e_api_threading now also creates a manual queue through slot 12 and submits a callback through slot 18. The callback hasn't run yet; dispatching through slot 16 runs it and returns true, and a second dispatch on the empty port returns false. Then it terminates and closes the queue through slots 22 and 17.
  • With the package's curl module (scratch harness, not in the repository), curl_global_init now gets past the handshake and the threading calls. It stops in QueryApiImpl naming its next interface, {bf2346b2-39af-4658-b5ea-44713c7e83b3} of provider {37e56907-2f10-41e8-b72f-36edb185331a}. Its call sites point to the connectivity-hint functions; that interface isn't mapped because the hint's enum values aren't in any public source I could reach.
  • MinGW ctest: 77 of 77. MSVC ctest: 77 of 77. Every MSVC target builds except ab_gameinput, which needs gameinput.lib, which this machine doesn't have. python tools/check_conventions.py and debt_fold.py --check: ok.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • python tools/check_conventions.py passes (no comments in code, one declaration per export, Conventional Commit subjects)
  • Unimplemented paths stop (AbxNotImplemented / AbxUnsupported); silent stubs are listed under Silent stubs through a debt fragment
  • Known gaps added, changed or removed through docs/dev/debt/changes/<branch>.md
  • Generic behaviour, not specific to one title
  • No game files, keys, notes or logs added to the repository
  • Depends on: #71 (merged)
  • Fixes: none
  • Unblocks: none
  • Source of behaviour: call sites in a second bundled GDK module (argument shapes, call counts, return value use)
  • AI-assisted: yes
**@⁠Dark3581** on GitHub · 2026-11-23 05:33 UTC · [original](https://github.com/Dark3581/AnyBox/pull/73) `Dark3581:feat/threading-dispatch-submit` → `main` · +21 −6 · 4 files · 1 commits · merged 2026-11-23 05:36 UTC ### What Two more slots of the GDK threading table (#71), measured in a second bundled GDK module (the package's curl build). Its own code calls these threading slots: 3, 5, 12, 16, 17, 18, 22 and 29. Two of them were not mapped yet: | Slot | Shape | Call sites | Return use | Function | |---|---|---|---|---| | 16 | ptr, u32, u32 | 3 | the thunk keeps only `al`; a caller loops `while (slot16(q, 1, 0) \|\| ...)` | `XTaskQueueDispatch` (returns `bool`) | | 18 | ptr, u32, ptr, ptr | 5 | every caller tests `eax` with `js` | `XTaskQueueSubmitCallback` (returns HRESULT) | Both shapes are also what the slot order predicted (#71 left them unmapped for lack of a call site). They forward to the existing `XTaskQueueDispatch` and `XTaskQueueSubmitCallback`. The debt entry is updated. `e2e_api_unmapped` now uses slot 20, which is still unmapped. ### Tested Windows 10, MinGW (GCC) and MSVC 2022. - `e2e_api_threading` now also creates a manual queue through slot 12 and submits a callback through slot 18. The callback hasn't run yet; dispatching through slot 16 runs it and returns true, and a second dispatch on the empty port returns false. Then it terminates and closes the queue through slots 22 and 17. - With the package's curl module (scratch harness, not in the repository), `curl_global_init` now gets past the handshake and the threading calls. It stops in `QueryApiImpl` naming its next interface, `{bf2346b2-39af-4658-b5ea-44713c7e83b3}` of provider `{37e56907-2f10-41e8-b72f-36edb185331a}`. Its call sites point to the connectivity-hint functions; that interface isn't mapped because the hint's enum values aren't in any public source I could reach. - MinGW `ctest`: 77 of 77. MSVC `ctest`: 77 of 77. Every MSVC target builds except `ab_gameinput`, which needs `gameinput.lib`, which this machine doesn't have. `python tools/check_conventions.py` and `debt_fold.py --check`: ok. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] `python tools/check_conventions.py` passes (no comments in code, one declaration per export, Conventional Commit subjects) - [x] Unimplemented paths stop (`AbxNotImplemented` / `AbxUnsupported`); silent stubs are listed under Silent stubs through a debt fragment - [x] Known gaps added, changed or removed through `docs/dev/debt/changes/<branch>.md` - [x] Generic behaviour, not specific to one title - [x] No game files, keys, notes or logs added to the repository - [x] Depends on: #71 (merged) - [x] Fixes: none - [x] Unblocks: none - [x] Source of behaviour: call sites in a second bundled GDK module (argument shapes, call counts, return value use) - [x] AI-assisted: yes
The package's curl module calls threading slots 16 and 18 of the GDK API table. Slot 16 returns a byte used in a dispatch loop and slot 18 an HRESULT, matching XTaskQueueDispatch and XTaskQueueSubmitCallback; both now forward to the existing implementations.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:17:40 +00:00
github manually merged commit 768d585bbe into gh-pr/73/base 2026-11-26 19:17:42 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.