feat(kernel): implement Aio request lifecycle #102
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/102"
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?
Imported from boykopovar/AnyPS5. Originally posted by asimplestray on 2026-09-28T20:39:45Z.
What
Implements the 7 declared
sceKernelAio*entry points inlibkernel/Aio(previouslyNotImplemented_nid_no_patch):SubmitReadCommands/SubmitWriteCommands: positional read/write loop over the batch via nativepread/pwrite(duplicated fd +lseekon Windows, where no native positional IO exists), filling eachKernelAioResult(COMPLETED/ABORTED) and allocating one queue id per batch (ids cycle 1..511, 0 reserved).WaitRequest: polls every 10us until the queue leavesPROCESSING; null/zero timeout waits forever, expiry returnsETIMEDOUT.PollRequest: corrected signature to(id, state)(was a no-arg placeholder inUnimplemented.cpp) and implemented.DeleteRequest: invalidates the queue id.InitializeImpl: success (subsystem needs no init);InitializeParam: validates the param pointer.Request states follow the Sony ABI (
SUBMITTED=1, PROCESSING=2, COMPLETED=3, ABORTED=4), checked against the shadPS4 reference implementation of the same API family. Error style follows the repo:EFAULT/EINVAL/ETIMEDOUTreturns for bad arguments,throwonly for programmer errors.Scope notes: submits execute synchronously (same as the reference); true overlapped async IO is a follow-up once boot-through works.
AioPollRequestbatch variants (PollRequests/WaitRequests/Cancel*/Multiple) are not declared in this repo yet, so they are out of scope.Tested
Linux (GCC 16,
BUILD_TESTING=ON): full build,ctest57/57 pass, including the newguest_aiotest (2-request read batch with content verification, write batch verified on disk, plusEFAULT/EINVALargument checks).libkernelprogress 295/377 -> 302/377.Checklist
main; no other open PR implements the same functions (checked #77-86, #98: none touch Aio)sceKernelPread/pwriteremain throwing stubs on Windows; no new silent stubs).mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-09-29T08:01:21Z.
Progress report (
49a7819→c25c543)📈 System libraries: 65.41% (+0.25%, +7 implemented functions)
✅ 7 implemented
sceKernelAioDeleteRequestsceKernelAioInitializeImplsceKernelAioInitializeParamsceKernelAioPollRequestsceKernelAioSubmitReadCommandssceKernelAioSubmitWriteCommandssceKernelAioWaitRequest