Repository navigation
feat(libSceRudp): accept sceRudpEnableInternalIOThread2 like the first IO thread call - #6021
KernelPanicNT wants to merge 1 commit into
Conversation
…t IO thread call The signature (uint32_t stackSize, uint32_t priority, SceKernelCpumask affinityMask) is the PS4 one from Orbital's IDA type database. It answers as sceRudpEnableInternalIOThread: RUDP_ERROR_NOT_INITIALIZED before sceRudpInit and success after it. Neither call starts a thread, since no context ever holds pending data to process, so the affinity is not applied, as the stack size and priority already are not. A second enable within one sceRudpInit/sceRudpEnd cycle is not modelled for either call: the Vita3K fork returns SCE_RUDP_ERROR_THREAD_IN_USE there and the console result is unknown. The test makes each enable call once per cycle and the debt entry records the gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Closing for now: no title is known to reach The code and the test are fine (build and the libs ctest scope pass; |
What
Gives
sceRudpEnableInternalIOThread2, declared without parameters by #3853, its signature and makes it answer assceRudpEnableInternalIOThreadalready does.Source of the behaviour. No console measurement is involved.
int sceRudpEnableInternalIOThread2(uint32_t stackSize, uint32_t priority, SceKernelCpumask affinityMask), the first call's two parameters plus an affinity mask. This is the PS4 signature. No source gives a PS5 signature; shadPS4 and OpenOrbis (PS4) and Vita3K (Vita) declare the call without parameters.SceKernelCpumaskis the existingKernelCpumask(uint64_t) inSceTypes.hpp.RUDP_ERROR_NOT_INITIALIZED(0x80770001) beforesceRudpInitand 0 after it, without starting a thread. Its behaviour is not changed here; the second call takes the same path.sceRudpWrite,sceRudpReadandsceRudpGetStatusreport a reset or idle context. fix(rudp): provide the calls PPSA03490 still lacks #3823 (xXPBSXx) recorded that justification forsceRudpProcessEventsandsceRudpNetFlush. It covers only this "nothing to process" part. Those pump calls can be repeated without changing any state, while enabling the IO thread is a one-shot state change, so fix(rudp): provide the calls PPSA03490 still lacks #3823 says nothing about a second enable.sceRudpInit/sceRudpEndcycle: not modelled for either call; it returns 0 here. The Vita3K fork thatdocs/dev/debt/libSceRudp.mdalready cites returnsSCE_RUDP_ERROR_THREAD_IN_USE(0x80770010) from itssceRudpEnableInternalIOThreadonce its thread has started and leavessceRudpEnableInternalIOThread2unimplemented. The console result is unknown. The test does not pin this case, and the debt entry records it. Argument validation (zero stack size or priority, mask range) is not modelled either and is not tested.Changes:
sceRudpEnableInternalIOThread2(stackSize, priority, affinityMask)forwards tosceRudpEnableInternalIOThread(stackSize, priority). The affinity mask is not applied, as the stack size and priority are not applied by the first call.guest_rudp_pump: both calls returnRUDP_ERROR_NOT_INITIALIZEDbeforesceRudpInit. Each call is then made once in its ownsceRudpInit/sceRudpEndcycle: it returns 0 inside the cycle andRUDP_ERROR_NOT_INITIALIZEDaftersceRudpEnd. No cycle enables twice.docs/dev/debt/libSceRudp.md: the function is removed from the "declared without parameters" entry. A Silent stubs entry now covers bothsceRudpEnableInternalIOThreadandsceRudpEnableInternalIOThread2(success aftersceRudpInitwithout starting a thread), next to the pump calls placed there in fix(rudp): provide the calls PPSA03490 still lacks #3823. It records that a second enable within one cycle is not modelled (Vita3K fork:SCE_RUDP_ERROR_THREAD_IN_USE; console unknown), that arguments are not validated, and the PS4-only signature (Orbital, pinned to the same commit as above).Nothing stays throwing in this function.
sceRudpGetOptionandsceRudpGetRemoteInfo, declared in the same entry by #3853 (billythemenace2), still throw: no source gives their signatures.Progress: libSceRudp 20/24 → 21/24 (
tools/progress.py).Tested
Head
93c85830907510660f79cb67216224b8a4e56a74, basee27ff7c545cb5ac669612567d853956ffa02ebe6.BUILD_TESTING=ON, AMD EPYC 7763 (GitHub Codespaces), tests run natively):guest_rudp_pump_tests,guest_rudp_status_testsandguest_rudp_context_queries_testseach pass in 5 of 5 runs, the test executable being run directly five times.core/libs/prx/libSceRudp/Export.cppwith the base version:guest_rudp_pump_testsfails withsceRudpEnableInternalIOThread2 not implemented;guest_rudp_status_tests,guest_rudp_context_queries_testsstill pass there, as expected for regression coverage. Restoring the PR source and rebuilding,guest_rudp_pump_tests,guest_rudp_status_testsandguest_rudp_context_queries_testseach pass in 5 of 5 runs again.mainat2b7e3ce69fd889deceb6b52ac1fbf13e7c0d1084, WinLibs MinGW-w64 GCC 15.2.0, Release,BUILD_TESTING=ON: 1212/1212 tests pass; the relinker (Linux, Windows, macOS), register-context and write-watch jobs of the same run also pass.git diff --checkpass. The Linux job of the Build workflow now targets the project's self-hosted runner, so it was not run on the fork; no title was run.Duplicate and overlap check
sceRudpEnableInternalIOThread2andsceRudpEnableInternalIOThread, and checked the file lists of all open PRs (lists truncated at 100 files were fetched in full). Only feat(libSceRudp): declare the calls PPSA06888 imports #3853 (merged, the throwing declaration) names the function. No open PR touchescore/libs/prx/libSceRudp/Export.cpp,core/libs/tests/GuestRudpPump.cppordocs/dev/debt/libSceRudp.md.guest_rudp_pumpand the Silent stubs entry by xXPBSXx in fix(rudp): provide the calls PPSA03490 still lacks #3823, and the throwing declaration by billythemenace2 in feat(libSceRudp): declare the calls PPSA06888 imports #3853.sceRudpGetOption, another function from the same debt entry) was closed by oneandonlydean because no title was known to reach the call, with a request to hold PRs that name no title needing the change. This PR names no title either (Unblocks: none below). fix(rudp): provide the calls PPSA03490 still lacks #3868 (renzipego-cpu) carried the same change as fix(rudp): provide the calls PPSA03490 still lacks #3823 and was closed by its author without a stated reason; fix(rudp): provide the calls PPSA03490 still lacks #3823 merged the change later that day. Neither closed PR touched either enable call.e27ff7c54. Re-checked against the open PRs on 2026-10-15: none names either enable call; test: organize library tests and label CTest suites #6044 (opened after this PR) renamescore/libs/tests/GuestRudpPump.cpptocore/libs/tests/networking/GuestRudpPump.cppwithout changing it; merging this branch into test: organize library tests and label CTest suites #6044's head gives no conflict, the test hunk following the rename.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code