Repository navigation
Conversation
Implement _ZNSt4_PadC2Ev, _ZNSt4_PadD2Ev, _ZNSt4_Pad7_LaunchEPP7pthread and _ZNSt4_Pad8_ReleaseEv, which Deathloop (PPSA01670) and Minecraft Legends (PPSA05510) import from libSceAmpr for the std::thread launch path. The algorithm and object layout follow Dinkumware V6.00 thr/xthread and thr/threadcall.cpp of Visual C++ 2013 (ganboing/crt.vc12 f1d47126): a vtable pointer whose first slot is the pure virtual _Go(), then the condition and mutex handles and bool _Started (0x8, 0x10, 0x18), with the console's pointer-to-slot handles of libc Threads.cpp (boykopovar#3079). The pad uses libc's _Cnd_*/_Mtx_* exports, starts the guest thread with pthread_create and an entry that calls _Go() and returns its result as the exit code, as _Call_func does. The unverified layout, thread attributes and error reporting are recorded in TechnicalDebt.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit c387c15)
Progress report (a11c8f7 → be2b77f)📈 System libraries: 85.93% (+0.12%, +5 implemented functions) ✅ 5 implemented
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
Cross-reference: #3743 implements the same functions (the CONTRIBUTING.md asks authors to "check that no open pull request already implements the same functions" before starting — both PRs are open, so flagging for the maintainers. The limitation this creates: only one of the two can be merged; the other gets closed as duplicate. Related: this is also the fix tracked in #3361, which has a two-platform-verified branch ( |
|
Closing: #3743 carries the same commit, merges cleanly with main and keeps You're welcome to reopen this if you think it was closed by mistake or the situation changes. |
What
Implements the four Dinkumware
std::_Padthread helpers, adds guest tests for launch/release/destruction and failures, and documents the modeled layout and remaining differences in TechnicalDebt.Carried David's ready commit unchanged onto current
main, preserving author metadata. #3499 and #3679 touch the samelibSceAmpr/Export.cppand TechnicalDebt files for different exports; neither is a dependency, though the second change to merge may need a rebase.Tested
Local Linux Release build and
guest_ampr_threads: passed (1/1).tools/check_conventions.py --base upstream/mainandgit diff upstream/main --checkpass.Independent Linux verification reports
guest_ampr_threadsand the full suite (520/520) passed. The original Windows Release report recordsguest_ampr_threads3/3 and full suite 513/513, with the #3329 test fix applied locally. Verification details are in issue #3361.Checklist
main; no other open PR implements these exports