mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-13 04:51:38 -10:00
Retiring a pad's slot closes its gate and waits for the readers still inside; it waited by yielding in a loop. It now parks on an eventcount that the last reader out of a closed slot notifies, so the thread retiring a pad (a HID driver's worker, or the main thread at teardown) sleeps until the slot is empty. A live slot's readers never notify. samples/input/connection_gate holds a reader inside while the slot is retired and requires the retiring thread to park; a build without the eventcount must fail.