提交 04ad1bf6 编写于 作者: P Paolo Bonzini

vhost-user-test: use g_cond_broadcast

g_cond_signal is rarely the right thing to do, it works now because
vhost-user-test only has two threads but it is not correct in general.
Fix it before adding more calls.
Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Message-Id: <1543851204-41186-7-git-send-email-pbonzini@redhat.com>
上级 1c3d45df
......@@ -393,7 +393,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
G_N_ELEMENTS(s->fds));
/* signal the test that it can continue */
g_cond_signal(&s->data_cond);
g_cond_broadcast(&s->data_cond);
break;
case VHOST_USER_SET_VRING_KICK:
......@@ -419,7 +419,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
p = (uint8_t *) &msg;
qemu_chr_fe_write_all(chr, p, VHOST_USER_HDR_SIZE);
g_cond_signal(&s->data_cond);
g_cond_broadcast(&s->data_cond);
break;
case VHOST_USER_SET_VRING_BASE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册