feat(libkernel): accept pipe read ends in sceKernelAddReadEvent #8057
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8057"
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 HQasper on 2026-10-19T19:11:36Z.
What
sceKernelAddReadEventthrew for anything but a guest socket, althoughkeventalready acceptsEVFILT_READon the read end of a pipe (FreeBSDfilt_piperead). It now registers a read event on a pipe's read end through the same pathkeventuses and ignores the size argument there. Host streams, other descriptors and a write event on a pipe still throw, as recorded indocs/dev/debt/libkernel.md.Tested
Linux (gcc, Release):
guest_socket_eventspasses, including new checks that a pipe read event stays quiet on an empty pipe, reports the readable byte count after a write, wakes a blocked wait when another thread writes, and reportsEV_EOFonce the write end closes. No title was run.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)Imported from boykopovar/AnyPS5. Originally posted by HQasper on 2026-10-19T21:49:43Z.
Manual check of the files the overlap report could not compare. #7049 and #7509 change
Equeue.cppinCollectTriggered,AddEventandTriggerEvent, notAddDescriptorEvent. No other open pull request changessceKernelAddReadEvent: #7075 (EVFILT_WRITEon a pipe's write end) and #7088 (kevent on regular files) changekeventinKqueue.cpp. #6044 movesGuestSocketEvents.cpptocore/libs/tests/networking/; a merge carries this change's test lines to the new path. The other pull requests share onlydocs/dev/debt/libkernel.md; merged directly with this branch, each conflicts only where it already conflicts withmain.One wording overlap: #7088's new debt entry ends with "
sceKernelAddReadEventandsceKernelAddWriteEventstill refuse non-socket descriptors", which is no longer true for a pipe's read end once this lands. Whichever merges second should reword that sentence. The pipe entry here now says it is the exception to the sockets-only socket entry before it; that entry itself is left as it is because #7299 edits the line above it. Depends on: none.Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-19T22:29:08Z.
Windows run (the description has Linux only): Windows 11 Home 26300, Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON. This PR merged onto
main9127ea36d.guest_socket_events, including the new pipe checks, passes in every run: 3/3, plus 6 more serial runs.Equeue.cppfrommain, new test kept):guest_socket_eventsaborts (0xc0000409).guest_kqueuepasses.guest_selectis flaky on this loaded machine with or without the change:Equeue.cppreverted: 1/8;main: 5/6.This PR doesn't touch select.
filt_piperead. It setskn_datato the buffered byte count and fires onkn_data > 0or EOF; it doesn't readNOTE_LOWATorkn_sdata.AI-assisted: yes (Claude Code); results above were run on this machine.