summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Leone <dleone@nvidia.com>2018-06-18 16:24:28 -0700
committerKeith Packard <keithp@keithp.com>2018-06-26 17:03:32 -0700
commitf33cb4264387ed14a586ba080885b4d21e4aa48b (patch)
tree6d759fef5b092284f7f1741da1daefc8e7505312
parent92daeb31fa3235dc791e0444b072ec4bbc6e35ab (diff)
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 <dleone@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--os/WaitFor.c3
1 files changed, 2 insertions, 1 deletions
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;