提交 514f7a27 编写于 作者: M malc

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6634 c046a42c-6fe2-441c-8c8c-71466251a162
上级 a8227a5a
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册