mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
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 (#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>