From nobody Fri Nov 7 14:33:35 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548094309662885.9661188738903; Mon, 21 Jan 2019 10:11:49 -0800 (PST) Received: from localhost ([127.0.0.1]:57417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gle2r-0008Ga-T6 for importer@patchew.org; Mon, 21 Jan 2019 13:11:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gldy1-0004GL-I9 for qemu-devel@nongnu.org; Mon, 21 Jan 2019 13:06:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gldxz-00040b-Dg for qemu-devel@nongnu.org; Mon, 21 Jan 2019 13:06:37 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:56120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gldxw-0003xV-Q3 for qemu-devel@nongnu.org; Mon, 21 Jan 2019 13:06:33 -0500 Received: by mail-wm1-x329.google.com with SMTP id y139so11637310wmc.5 for ; Mon, 21 Jan 2019 10:06:32 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id 133sm56197732wme.9.2019.01.21.10.06.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 10:06:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HirKuAepWipj01CzQcFv6/HMOdSLZG6wCYv1fURhwgQ=; b=JtPrRZqrmtV2lTb93i/DDxWEsw3pPMmTVl2wXjRthq5v9QJ9EgdEt1GeHljNvGPhYY NErzK97Y5LHy83b97idH2NPRzpr+i3Ek86kTdnTBUs4OXX/CZIRN9jRp2KG+c+QZN3Yz l9cQShQnEa6aemMcwusdQdHX/cTJbFenPBO1jngmlT3zXUUoWWcChhdbDLQFHO0ee/6y 24D/20IUgefp21qjP0Qj5jJqf4MuLmTkcmqOph+QSK4FTWTGyfoqYK2x5ua7ZECtJdwr SJPw1n8iPtS1lxEiNQQvQkYpgFyXz//sDMHSR/q6Q4/LeZjY5nnwJvW11OI4xJG8N+Vn kTGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=HirKuAepWipj01CzQcFv6/HMOdSLZG6wCYv1fURhwgQ=; b=NBlt7xERVhHOqdEaMIGYtG8QSa7EK14s4kcTgQaH6IfbN6KRN6UTRMcOCkmWzWWRIi IrOJX2CmAjYCglAfFuAozNTETOXdDUxGUAvtWdf3yD/t51mQfZIFtlxkykEB7/iz4loe 9ZjA8WTx9xRXAP5C8RP4GKAlQN97dvZYIwC1QuO3muG6qFJL4PTF3QACzRgzHtsHVv5q 8+FwZVlRjEY03oQOpHzso0oOIvumtAF8uWnu7N8zDvitdfdhOGoULEPBzNcANJxaQxoi uGLy/+DjuZUy1vvtKftsbgAgFukyBNS3Vu+I7NCqLanhE5mHUPERXx1XHm5UmnGOl79h 9bDA== X-Gm-Message-State: AJcUukdbZbLN3YtRyPZAWEXNaKqxZ635HJjfMLOmwweHNKo0rKmEZm8W s8zAaW6QtdjLlS5ZNfmFkHfBKoG6 X-Google-Smtp-Source: ALg8bN7vYYO00hzcmLNQ9JKXlxXhj+LbjIxnQzgUMQW6OxCF8hNur4P81ADP5BirzgY4+15ZkG+mbg== X-Received: by 2002:a7b:c852:: with SMTP id c18mr391397wml.49.1548093990914; Mon, 21 Jan 2019 10:06:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 21 Jan 2019 19:05:39 +0100 Message-Id: <1548093980-43088-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1548093980-43088-1-git-send-email-pbonzini@redhat.com> References: <1548093980-43088-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::329 Subject: [Qemu-devel] [PULL 08/49] vhost-user-test: use g_cond_broadcast X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Lureau Signed-off-by: Paolo Bonzini Message-Id: <1543851204-41186-7-git-send-email-pbonzini@redhat.com> --- 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 e7900fa..52c4d39 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -396,7 +396,7 @@ static void chr_read(void *opaque, const uint8_t *buf, = int size) G_N_ELEMENTS(s->fds)); =20 /* signal the test that it can continue */ - g_cond_signal(&s->data_cond); + g_cond_broadcast(&s->data_cond); break; =20 case VHOST_USER_SET_VRING_KICK: @@ -422,7 +422,7 @@ static void chr_read(void *opaque, const uint8_t *buf, = int size) p =3D (uint8_t *) &msg; qemu_chr_fe_write_all(chr, p, VHOST_USER_HDR_SIZE); =20 - g_cond_signal(&s->data_cond); + g_cond_broadcast(&s->data_cond); break; =20 case VHOST_USER_SET_VRING_BASE: --=20 1.8.3.1