From nobody Mon Feb 9 22:39:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499239639754591.9642812576216; Wed, 5 Jul 2017 00:27:19 -0700 (PDT) Received: from localhost ([::1]:44539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSeiU-0007Nb-Dj for importer@patchew.org; Wed, 05 Jul 2017 03:27:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSeWl-0004c4-4g for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSeWk-0007fk-2Z for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:11 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:34661) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dSeWj-0007fC-TR for qemu-devel@nongnu.org; Wed, 05 Jul 2017 03:15:10 -0400 Received: by mail-wm0-x241.google.com with SMTP id p204so30534602wmg.1 for ; Wed, 05 Jul 2017 00:15:09 -0700 (PDT) Received: from 640k.lan (94-39-191-51.adsl-ull.clienti.tiscali.it. [94.39.191.51]) by smtp.gmail.com with ESMTPSA id y35sm22202793wrc.51.2017.07.05.00.15.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jul 2017 00:15:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EyH2PLpaOvyCaCwHKZyOrYewcYZ1BkMGBAOvaGnzP+c=; b=R4kFF3NHPPqCIRPHPS+hQ48hvprFJNj3zNhMd/mpgRVRtIV2+caUwux96bCsPf8aKf gQBoQS3ysD7MLuZnnbIGrvupTT5GQEjCa7lGSBWS9BgH3437VOUy01EvQiVbthwcjjP0 niUdeaqe29kjD4QS5Eka109hm3OJcBsUsK3X4X0tPt+j235N0KzW+2hCLkR5suBb0TCq hAKnF9zgcCsPRz/kWxBwhdQJPUaHHnC9hZ7lACBwPKotZ4e7LFGQMjlKNOiFvYSsMmon uZ47J7Gekm9cMaJGdwdKZwbLUeG4z7VrfeHYDjZnt+xDcT17nfM9PSragPeV3s7RWdQp yOsA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EyH2PLpaOvyCaCwHKZyOrYewcYZ1BkMGBAOvaGnzP+c=; b=sEoSyHSJG2jrElC09FGaiusRTyvVkElhIduZjxVglIkhsxAiUij98MiNaCHbivxPle qYTHaqlT67bGVVFPR2q7b85n/DfjU+b+0i2QeWkmUKxHCM7ubzT6zoG8ZEWhXZiWfNP7 dNKDBXGep1kO0LWGfH8N2ygCUnPiewG2BZ9BL0apeBwj2u9+xAuhC7WyNro5/qLmBGbs DFJx8+jMd0gWDwEyX2ABUhmPrSyvxEMX4sa6l1tooEeoOSQO6+GfuKtQtcu5JlWCOc3W 5FdZRCVmZMcBQqShXfigaGxVdJ9KoscukL/7TCljbqHoFLHZraFvJUu1rNyJGDkusIel VkKA== X-Gm-Message-State: AKS2vOysuBTx7TBtkKY5i8MMECvPSZQR/1Geslgr/L0hG08WpMGmFVly CevuVtlqJXImOmdgWNE= X-Received: by 10.28.68.66 with SMTP id r63mr20823192wma.120.1499238908758; Wed, 05 Jul 2017 00:15:08 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 09:14:19 +0200 Message-Id: <1499238885-26161-17-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1499238885-26161-1-git-send-email-pbonzini@redhat.com> References: <1499238885-26161-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:400c:c09::241 Subject: [Qemu-devel] [PULL 16/42] tests/test-char.c: Don't use main_loop_wait()'s return value 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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Peter Maydell In QEMU's main_loop() we used to check whether we should do a nonblocking call to main_loop(); this was deleted in commit e330c118f2a5, because now that vCPUs always drop the I/O thread lock it is an unnecessary optimization. The loop in test-char.c copied the old QEMU main_loop() code, but here the nonblocking check has never been necessary because this standalone test case doesn't hold the I/O lock anyway. Remove it, so we can drop the main_loop_wait() return value. Signed-off-by: Peter Maydell Message-Id: <1498584769-12439-2-git-send-email-peter.maydell@linaro.org> Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- tests/test-char.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/test-char.c b/tests/test-char.c index 87c724c..b962063 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -20,13 +20,9 @@ typedef struct FeHandler { =20 static void main_loop(void) { - bool nonblocking; - int last_io =3D 0; - quit =3D false; do { - nonblocking =3D last_io > 0; - last_io =3D main_loop_wait(nonblocking); + main_loop_wait(false); } while (!quit); } =20 --=20 1.8.3.1