fix(libkernel): honour MSG_DONTWAIT in the socket send and receive calls on Windows #8186
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8186"
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 xXPBSXx on 2026-10-20T01:52:06Z.
What
Winsock has no per-call non-blocking flag.
WaitForTransfer(Udp.cpp), which every send/receive call already runs, now answers aMSG_DONTWAITcall on Windows with a zero-timeoutWSAPollforPOLLRDNORM/POLLWRNORM:EAGAIN(35) when the socket is not ready, otherwise the transfer goes on.GuestSendFlags/GuestReceiveFlagsaccept the flag on every host. The debt entry forMSG_DONTWAITstates the two remaining differences: the poll and the transfer are two host calls (a second thread can take the data in between), and asendlarger than the socket buffer can still block where FreeBSD returns a partial count.Fixes #8185
Overlap:
git merge-treeagainst the open socket PR #7090 (SCM_RIGHTS on Unix sockets) conflicts inUdp.cpp; whichever lands second rebases.pr_overlapwas not run.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on upstream/main
7e12b3da80+ this commit:guest_udpandguest_socket_timeouts:Exit code 0xc0000409without the change toUdp.cpp, pass with it.guest_socket_options,_read_write,_event,_descriptors,_connect_listening,_error,_stream_options,_pair,_port_zero,_descriptor_flags,_host_writeandguest_sce_netpass (27 of 27).python tools/check_conventions.py --base upstream/main: passes.libSceNetis not changed and still answersEOPNOTSUPPon Windows.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T02:02:49Z.
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.
main)docs/dev/debt/libkernel.mdL176Some 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.
core/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mdcore/libs/tests/GuestUdp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.mdcore/libs/prx/libkernel/Socket/src/Udp.cppdocs/dev/debt/libkernel.mddocs/dev/debt/libkernel.md