mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-29 12:15:39 +00:00
FreeBSD 11 kqueue_scan (sys/kern/kern_event.c) re-inserts a reported knote without EV_CLEAR or EV_DISPATCH at the tail of kq_head, and knote_enqueue puts a knote that fires again at the tail as well, so the next scan starts with the events that were not reported yet. sceKernelWaitEqueue scanned the event list in place, so with num smaller than the number of ready events the first ones were reported on every call and the later ones starved. Each reported event that stays registered now moves to the end of the list, in the order reported.