Files
AnyPS5/core
MaxandClaude Opus 5.5 9f3799cfaa fix(libSceUsbd): wake event waiters after each pass of event handling
FreeBSD 11.4's libusb10_handle_events_sub ends every pass, a timed-out
one included, with pthread_cond_broadcast on the context's condition
variable, so a thread in libusb_wait_for_event wakes after each pass of
the handler. Here waiters woke only when the handler unlocked, so a
waiter could sleep through the handler's whole loop. Notify them when
the handler takes the event lock back after a pass.

The follower test that expected a timeout while the handler ran 20 ms
passes now races that wake-up, so guest_usbd checks three cases
instead: a follower with a long timeout returns 0 after a pass, a
follower times out during a longer pass, and a follower returns after
the handler held the event lock past its timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 15:27:07 +01:00
..