[Mesa-dev] [PATCH 1/8] util/u_queue: fix timeout handling in util_queue_fence_wait_timeout

Nicolai Hähnle nhaehnle at gmail.com
Mon Nov 13 14:03:29 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

Fixes: e3a8013de8ca ("util/u_queue: add util_queue_fence_wait_timeout")
---
 src/util/u_queue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/u_queue.c b/src/util/u_queue.c
index 43c28ac6ef8..dba23f96456 100644
--- a/src/util/u_queue.c
+++ b/src/util/u_queue.c
@@ -106,21 +106,21 @@ do_futex_fence_wait(struct util_queue_fence *fence,
 
    while (v != 0) {
       if (v != 2) {
          v = p_atomic_cmpxchg(&fence->val, 1, 2);
          if (v == 0)
             return true;
       }
 
       int r = futex_wait(&fence->val, 2, timeout ? &ts : NULL);
       if (timeout && r < 0) {
-         if (errno == -ETIMEDOUT)
+         if (errno == ETIMEDOUT)
             return false;
       }
 
       v = fence->val;
    }
 
    return true;
 }
 
 void
-- 
2.11.0



More information about the mesa-dev mailing list