From f33cb4264387ed14a586ba080885b4d21e4aa48b Mon Sep 17 00:00:00 2001 From: Damien Leone Date: Mon, 18 Jun 2018 16:24:28 -0700 Subject: [PATCH] os: Recompute whether any clients are ready after check_timers() If a driver calls AttendClient() from within a timer callback we need to re-compute the local 'are_ready' to prevent the attended client from waiting until WaitForSomething() times out. This is a fix similar to commit 9ed5b263. Signed-off-by: Damien Leone Reviewed-by: Keith Packard --- os/WaitFor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/WaitFor.c b/os/WaitFor.c index ae317dc11..ff1d376e9 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -190,10 +190,11 @@ WaitForSomething(Bool are_ready) /* deal with any blocked jobs */ if (workQueue) { ProcessWorkQueue(); - are_ready = clients_are_ready(); } timeout = check_timers(); + are_ready = clients_are_ready(); + if (are_ready) timeout = 0;