aboutsummaryrefslogtreecommitdiff
path: root/qemu-thread-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-thread-posix.c')
-rw-r--r--qemu-thread-posix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c
index 6374df3..4489abf 100644
--- a/qemu-thread-posix.c
+++ b/qemu-thread-posix.c
@@ -213,6 +213,7 @@ int qemu_sem_timedwait(QemuSemaphore *sem, int ms)
while (sem->count < 0) {
rc = pthread_cond_timedwait(&sem->cond, &sem->lock, &ts);
if (rc == ETIMEDOUT) {
+ ++sem->count;
break;
}
if (rc != 0) {