[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/77] vhost-user-test: use g_cond_broadcast
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 01/77] vhost-user-test: use g_cond_broadcast |
Date: |
Mon, 4 Feb 2019 19:35:03 +0100 |
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: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
---
tests/vhost-user-test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 84e50d8..9baaff4 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -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:
--
1.8.3.1
- Re: [Qemu-devel] [PULL 07/77] tap: flush STDOUT on newline, (continued)
- [Qemu-devel] [PULL 11/77] cpus: ignore ESRCH in qemu_cpu_kick_thread(), Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 03/77] vhost-user: support cross-endian vnet headers, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 05/77] vhost-user-test: skip if there is no memory at address 0, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 14/77] pvh: Add x86/HVM direct boot ABI header file, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 09/77] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 02/77] vhost-user-test: signal data_cond when s->rings changes, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 17/77] linuxboot_dma: remove duplicate definitions of FW_CFG, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 13/77] elf-ops.h: Add get_elf_note_type(), Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 20/77] hw/i386/pc: use PVH option rom, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 01/77] vhost-user-test: use g_cond_broadcast,
Paolo Bonzini <=
- [Qemu-devel] [PULL 29/77] contrib/elf2dmp: use GLib in PDB processing, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 16/77] pvh: load initrd and expose it through fw_cfg, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 18/77] linuxboot_dma: move common functions in a new header, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 23/77] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 30/77] contrib/elf2dmp: fix structures definitions, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 32/77] configure: enable elf2dmp build for Windows hosts, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 12/77] elf: Add optional function ptr to load_elf() to parse ELF notes, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 24/77] i386: remove the 'INTEL_PT' CPUID bit from named CPU models, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 26/77] target-i386: hvf: remove MPX support, Paolo Bonzini, 2019/02/04
- [Qemu-devel] [PULL 22/77] hw/i386/pc: enable PVH only for machine type >= 4.0, Paolo Bonzini, 2019/02/04