projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8227a5
)
Properly handle pthread_cond_timedwait timing out
author
malc
<malc@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 21 Feb 2009 05:48:19 +0000
(
05:48
+0000)
committer
malc
<malc@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 21 Feb 2009 05:48:19 +0000
(
05:48
+0000)
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
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6634
c046a42c
-6fe2-441c-8c8c-
71466251a162
posix-aio-compat.c
patch
|
blob
|
history
diff --git
a/posix-aio-compat.c
b/posix-aio-compat.c
index 19569174429ff3936d5542507a5ac26dc637bda7..6b547f41fd96fd1694735be814270b852ad18b41 100644
(file)
--- a/
posix-aio-compat.c
+++ b/
posix-aio-compat.c
@@
-104,7
+104,7
@@
static void *aio_thread(void *unused)
ret = cond_timedwait(&cond, &lock, &ts);
}
- if (
ret == ETIMEDOUT
)
+ if (
TAILQ_EMPTY(&request_list)
)
break;
aiocb = TAILQ_FIRST(&request_list);