octocat 252465b23f Fix deadlock in uart_handle_read() (#2)
The loop this commit removed tries to sleep and wait for the IO DLL
to write something to uart->readable. It doesn't work for two reasons:

1. When uart_handle_read() is sleeping, its caller holds the lock
   for the resource, meaning nothing can be writen, and it always times out.

2. Even without the deadlock problem, due to timer resolution limit
   on Windows, Sleep(1) does not actually sleep 1ms.
   Instead it sleeps over 15ms by default.

The symptom is a noticable input lag, and lost inputs.
This commit tries to fix that.

Reviewed-on: #2
Co-authored-by: octocat <git.rascal570@passinbox.com>
Co-committed-by: octocat <git.rascal570@passinbox.com>
2025-10-12 10:07:25 +00:00
2025-02-04 11:05:07 -05:00
2018-10-09 19:06:37 -04:00
2018-11-01 18:18:44 -04:00
2018-11-01 18:18:44 -04:00
2018-11-01 18:18:44 -04:00
2018-10-07 14:20:22 -04:00
2019-10-18 19:05:06 -04:00
Description
Win32 API hooking toolkit
MIT 122 KiB
Languages
C 98.6%
Meson 1.4%