[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6634] Properly handle pthread_cond_timedwait timing out
From: |
malc |
Subject: |
[Qemu-devel] [6634] Properly handle pthread_cond_timedwait timing out |
Date: |
Sat, 21 Feb 2009 05:48:20 +0000 |
Revision: 6634
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6634
Author: malc
Date: 2009-02-21 05:48:19 +0000 (Sat, 21 Feb 2009)
Log Message:
-----------
Properly handle pthread_cond_timedwait timing out
pthread_cond_timedwait is allowed to both consume the signal and
return with the value indicating the timeout, hence predicate should
always be (re)checked before taking an action
Modified Paths:
--------------
trunk/posix-aio-compat.c
Modified: trunk/posix-aio-compat.c
===================================================================
--- trunk/posix-aio-compat.c 2009-02-21 05:48:17 UTC (rev 6633)
+++ trunk/posix-aio-compat.c 2009-02-21 05:48:19 UTC (rev 6634)
@@ -104,7 +104,7 @@
ret = cond_timedwait(&cond, &lock, &ts);
}
- if (ret == ETIMEDOUT)
+ if (TAILQ_EMPTY(&request_list))
break;
aiocb = TAILQ_FIRST(&request_list);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6634] Properly handle pthread_cond_timedwait timing out,
malc <=