提交 a795ef8d 编写于 作者: B Brad Smith 提交者: Blue Swirl

Fix semaphores fallback code

As reported in bug 1087114 the semaphores fallback code is broken which
results in QEMU crashing and making QEMU unusable.

This patch is from Paolo.

This needs to be back ported to the 1.3 stable tree as well.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NBrad Smith <brad@comstyle.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 753d99d3
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册