On Tue Oct 27, 2026 at 4:35 PM JST, Alexandre Courbot wrote:
> `read_poll_timeout` can potentially sleep for the specified
> `sleep_delta` if `timeout_delta` is `Delta::ZERO` and the system clock
> is coarse enough to not register a tick between the time the function
> has been called and the time the loop test is done. `wait_for_msg` has a
> short test condition and is particularly vulnerable to this condition.
>
> Add a dedicated branch when `timeout` is `Delta::ZERO` to perform the
> test without calling `read_poll_timeout` and avoid potentially sleeping
> for 1ms.
>
> Signed-off-by: Alexandre Courbot <[email protected]>
> ---

Reviewed-by: Eliot Courtney <[email protected]>

Reply via email to