PipeRead (guest_kqueue) and the blocking read in guest_socket_events took
their start time after creating the thread that writes after 50 ms, so a
main thread preempted between the two measured less than the writer's
sleep and failed the 40 ms check although the wait did block until the
write.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The listener read event now reports one connection after the first connect, and on Linux two once a second client is waiting, before both are accepted.
A wait on an equeue that holds socket events now blocks in poll/WSAPoll on
those sockets plus a per-thread loopback wake socket, instead of rechecking
every millisecond. Adding, triggering or deleting an event and closing the
equeue wake the blocked waiters. Closing a socket removes its read and write
events, as on FreeBSD. A read event also reports EV_EOF once the peer has
shut down its sending side.
sceKernelAddReadEvent/DeleteReadEvent and sceKernelAddWriteEvent/
DeleteWriteEvent register EVFILT_READ and EVFILT_WRITE events on guest
sockets. The equeue polls the host socket for readiness on each wait
and reports the readable byte count or the send buffer size in data,
with EV_EOF on hang-up or error.