Files
RetroArch/input/include
LibretroAdmin 46d69f2c81 (Wii/Wii U) Atomics for the HID poll threads' quit flags
Both drivers park a poll thread on a flag the teardown sets from another
thread, with no lock either side, as volatile bools that ordered nothing
between the two. The flags are initialised before their thread is
created, and on the Wii USB side before the first goto error, since free
stores through it.

wiiusb_hid's device_detected goes the other way. It is raised by
wiiusb_hid_change_cb, which libogc runs in interrupt context, so an
atomic is not what it wants - the writer is not a thread, and this file's
other interrupt-shared state is volatile for that reason. It was a plain
bool, which left the poll thread free to hold it in a register across the
loop; volatile is the smallest thing that fixes that.

Both files build against the headers already in the tree - libogc under
wii/, wut under wiiu/ - on a 32-bit PowerPC compiler and on all five
retro_atomic backends, unmodified first and then with the change.
2026-09-20 19:06:30 +02:00
..
2021-10-16 14:52:56 -07:00
2025-02-10 13:59:25 +01:00
2021-10-05 09:10:41 -07:00