mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
FreeBSD activates an EV_CLEAR knote on each state change the object reports through KNOTE (sorwakeup, sowwakeup, pipeselwakeup), not on its level, so polling the level cannot tell an EV_CLEAR knote when to fire again. EdgeWatch::Watch registers the host descriptor with a private epoll instance in edge-triggered mode: every wakeup of the descriptor with a matching mask (data arriving, buffer space freed, a hang-up) queues one edge, which TakeEdge consumes, and the epoll descriptor itself is readable while an edge is pending, so a wait can block on it. Off Linux opening a watch throws.