From nobody Mon May 13 01:07:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1688564004; cv=none; d=zohomail.com; s=zohoarc; b=nuzhirZGnuDBUXY3U0uoOpvOw+CG5oI+ECmPZ+tFnNT+gFjB/JeMl3pHrNGtn63JM5nCpdjnnLgJy1bxS4T2YxGPWH4a4nsHfWY4kXx1V026ZAIO0va2awOrxvtGMthm8zCnH1zC1UpzKnyml/n12cwdOpsmQW9FKWFq2I6uUNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688564004; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BC1jdW44jTbjaqw2f+cHkqvuGEwANPMIK+BI/ks2IFM=; b=dlMmhj6l4qzWFbV034++5UUF7bGZYtBMgt5JzraTJOEi8/nJ2xhMYNXD6botT0Rfyje9bZh+BI/dZ1NjclXd+IuC3NxhM8jFe8hPLrx7TYxCP/ljq/9RYe+oqv/m+CTWR3LAUP6e7AVVvjEaQQDAINAGjhjckEv3ipVKfkqslGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1688564004282598.8501155756103; Wed, 5 Jul 2023 06:33:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH2cc-0006Ni-89; Wed, 05 Jul 2023 09:32:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH2c2-0006Jm-MX for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:32:07 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qH2c0-0001zO-Qb for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:32:06 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-51dec0b6fecso6612101a12.1 for ; Wed, 05 Jul 2023 06:32:04 -0700 (PDT) Received: from m1x-phil.lan ([176.176.142.96]) by smtp.gmail.com with ESMTPSA id e11-20020a056402148b00b0051e1a4454b2sm2701296edv.67.2023.07.05.06.32.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Jul 2023 06:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688563923; x=1691155923; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BC1jdW44jTbjaqw2f+cHkqvuGEwANPMIK+BI/ks2IFM=; b=XDbDSozq35ZG0pXCbsCpOfO7iANG2I1G6CfJEwXUGwroSkox9wFFNPyOFGZlyR0ZN1 gwSR6q5IJz+JTmQ2+HbnA+FsJfFx//Cx7MDyGP6xqQj5pS8ePITVfiOwS4HaDpfwKMz2 qrjCJtX5x+LUmHqvD54lu8bxs6nUpC92QkmxBjeGksl1doJjDZznu3Vzzeblx66OHvKH 5xcZVJGN5LKzY4XzxMaV8KQpZU4unp00GP8BjzBvnfUcBFb+hViKs/Q8iXZ2UCqhgA2/ Ofv+d+6bfYkIhIr9u0Al34GR1epXqVgc+DLTVzoODWhDq0+huYQP16zih5ysaio9/66H pfQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688563923; x=1691155923; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BC1jdW44jTbjaqw2f+cHkqvuGEwANPMIK+BI/ks2IFM=; b=kBq1pYRHww1IdAKwXSktO9Rb7JYvY4AzWJgccX5DYACDsVj5XWpg4rZiEJWgY8dRPF 9l5hT4cEsJHAaCEfrqEykaPXQnVa5srVHJGWeVwc02KFMKnI8KG2NJibDsafYSLS865s z28Ibk4bl9FgXoteuWeO7nkUteHSdL4sIza/PA0ogK5XRKoFPsA8wqepJe0YHe0QWJaW xWq4ahmnJzS+h3vcOZYm7i9A56GbaJozlc65Jj6vMD46LdUr8NvVAa20ZnJ+0OB58UDD 9JbuUCUZslYZHt9l/dKbVU0tx404q1BahSLn18pKw8w5ghImAPO0aT6xUmoqmnt54Ils 5vYw== X-Gm-Message-State: ABy/qLabCZPcxNUjO2cbYoPGG/YMzuRjkpSXY6cAHwaMqjMut1aeetJ7 qFGKgv2gWjzTmbUEzw7kuxZG5fYoSFwHgAa3flk= X-Google-Smtp-Source: APBJJlE1s3AeW0n7XHE+gP/KuquZEt+wiurKiZM0MJJV2zqY+4ase25SCW25I0URuVRnEriRlVsLZQ== X-Received: by 2002:aa7:c158:0:b0:51d:9ddf:f0f6 with SMTP id r24-20020aa7c158000000b0051d9ddff0f6mr11671088edp.36.1688563923308; Wed, 05 Jul 2023 06:32:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Joel Stanley , Markus Armbruster , Alistair Francis , Laurent Vivier , "Edgar E. Iglesias" , Peter Maydell , "Dr. David Alan Gilbert" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Amit Shah , qemu-riscv@nongnu.org, "Michael S. Tsirkin" , Jason Wang , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/4] io/channel: Explicit QIOChannel doc is based on GLib's IOChannel Date: Wed, 5 Jul 2023 15:31:36 +0200 Message-Id: <20230705133139.54419-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230705133139.54419-1-philmd@linaro.org> References: <20230705133139.54419-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=philmd@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1688564004835100001 One can get lost looking for "public API docs". Explicit we are referring to GLib IOChannel documentation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/io/channel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/io/channel.h b/include/io/channel.h index 229bf36910..998718b470 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -97,7 +97,7 @@ struct QIOChannel { * The first five callbacks are mandatory to support, others * provide additional optional features. * - * Consult the corresponding public API docs for a description + * Consult the corresponding GLib IOChannel public API docs for a descript= ion * of the semantics of each callback. io_shutdown in particular * must be thread-safe, terminate quickly and must not block. */ --=20 2.38.1 From nobody Mon May 13 01:07:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1688564006; cv=none; d=zohomail.com; s=zohoarc; b=KSZSAK2KjZi6SVRVuifRKEbVRXbrnKwArLsV47QPHxBRD3MDgWBA6lMPUwJZh+BwaVgZzGcLfrbQei0ugS7zn7AfCKABriq0MaEWH2pK012XA8yFFRqCYATrjGC48vohsp/uZh0cShifIn+ZkSJ12SzbN1VL+z56Fgg6dNOMPT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688564006; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=W5L5O6YuXvA1gkJxg2X5z0QB/Yl+Zb8DVDs3tCRC3SE=; b=l3lX7fTD/NJ6i7iZnOMlqzGRNP6c6CWPHuNg47/pcBB3ZCfcPgmXgYkd0ykpDgJj+1ujsi797OeRwFNQB+SkB7ZbhF6JMvZdT2Y/T+N1rLfLgLiT/rXdRELdK+86/45i4f9g6UjpdH+ARUeOH/Suf/7ljzpCaxX6TyZBP8kREVU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168856400603849.188460496166044; Wed, 5 Jul 2023 06:33:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH2cl-0006TX-To; Wed, 05 Jul 2023 09:32:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH2cR-0006Mw-C4 for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:32:31 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qH2cM-00021D-91 for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:32:30 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-51e29964942so297423a12.2 for ; Wed, 05 Jul 2023 06:32:20 -0700 (PDT) Received: from m1x-phil.lan ([176.176.142.96]) by smtp.gmail.com with ESMTPSA id b5-20020aa7cd05000000b0051da8fd7570sm7823672edw.41.2023.07.05.06.32.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Jul 2023 06:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688563938; x=1691155938; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W5L5O6YuXvA1gkJxg2X5z0QB/Yl+Zb8DVDs3tCRC3SE=; b=smJuboJxZxqWVhq2qfGMiGBglMt5r/4wcLpj/V5ygXtpT/rzOyu7yFPnr1eNgVviIs TsOi44QXlc9o5XP5RWAdTuoOHEJVO7TOKcYfg4AY2cog87IDysIMMHSrz7d8wsoRCYOC p/rAm2IOKT45lVnnZecaGs6vUSBLz8O4Hu4Vo694upTmxMr4I30+J7fbqRzI26m26lvb OCo0quaefvK/laFKpXYv/2J/JueWU71eUBOy94O2MCzmfNA7fNoJJecLVNGeq1jIHoz/ x3n8GhqGfXhnTVusKa3ghhyqKp8jn+KUANJSDAjSQx3OS9201/pmOSFSc0FG0zhRTWSB StzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688563938; x=1691155938; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W5L5O6YuXvA1gkJxg2X5z0QB/Yl+Zb8DVDs3tCRC3SE=; b=C+7vR+A1X5XwTbdjhtUPcyu6feOcJCF5kFk3X+F6kyFn4w0ju6zAeEsXpfLU2lWwZl jFtAnDkPsiYRw84w3doJxVM6PZMXhIx1x10F6aTH2vDGAjVp2H+SHUyaSbgV2vMFjLzG K74PwCETJpXu2CrjKVeaD+gIWuu0FUJYR4s4SHRnHUs27RcEn0dJcQLN4wtgkZk+aWmO vbNUQni9h62yDtGFhUuPptZz9HnKxKFywAfi3YC+2Rgf28lnD95bZAkijFZIA4H2ePww yCSUaDRjZx0kmr08imsnjOo3bBMiF3X3idr4x9BNV56YEda3TGJM0Gchlybl5xFWCC9H ZmqA== X-Gm-Message-State: ABy/qLbYsSQRBCt/8IuURv8ii7IVWWFWc3wkYNfGqkGXpTZb2OdifHnv 4WKqUQoByMJSKPKEnroQ4bMSbJF5LST8AHBO4e0= X-Google-Smtp-Source: APBJJlHcEF944JFWKrYI+x3EBMMELL9ufOQEeTctIC13D6wloxn9B5IpbmO4fS8/6GNKGiToDJpF3A== X-Received: by 2002:aa7:c644:0:b0:51e:29e1:b6c7 with SMTP id z4-20020aa7c644000000b0051e29e1b6c7mr392572edr.33.1688563938463; Wed, 05 Jul 2023 06:32:18 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Joel Stanley , Markus Armbruster , Alistair Francis , Laurent Vivier , "Edgar E. Iglesias" , Peter Maydell , "Dr. David Alan Gilbert" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Amit Shah , qemu-riscv@nongnu.org, "Michael S. Tsirkin" , Jason Wang , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/4] chardev/char-fe: Clarify qemu_chr_fe_add_watch 'condition' arg is a mask Date: Wed, 5 Jul 2023 15:31:37 +0200 Message-Id: <20230705133139.54419-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230705133139.54419-1-philmd@linaro.org> References: <20230705133139.54419-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1688564007419100007 qemu_chr_fe_add_watch() can poll for multiple conditions. It's @cond argument is a combination of all the condition bits. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/chardev/char-fe.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index 8c420fa36e..309960046a 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -179,8 +179,8 @@ typedef gboolean (*FEWatchFunc)(void *do_not_use, GIOCo= ndition condition, void * =20 /** * qemu_chr_fe_add_watch: - * @cond: the condition to poll for - * @func: the function to call when the condition happens + * @cond: bitwise combination of conditions to poll for + * @func: the function to call when the conditions are satisfied * @user_data: the opaque pointer to pass to @func * * If the backend is connected, create and add a #GSource that fires --=20 2.38.1 From nobody Mon May 13 01:07:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1688564044; cv=none; d=zohomail.com; s=zohoarc; b=B/rnwuL+n+8nQLnK9BMO5uqHDUa1C3yJSP8ZCS6shfOzR36ju9KyylavwEQLROhNRk918CatSeAj4S7eFawc4VtKeuTMGAya3eL00wn9hqdImK/b61svsFWmYI+y96vWnP8TlPiaCiA1V/9u+5n00/9ktolqF6Mo5cchM/N6eg4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688564044; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hTQw0+m/TSUjm/E7y2FkWg7UcKy3q1iulYca/mbmODQ=; b=A6IEmckZgT81nt2RNeOkaRPG0f3pJjrcQHS00ec6JDv/1M5C/pUeZ9oamupbrZ9oMV2VTmC5CoZ5OwF5zF5hG2vzSVcJEvs2DUapAloeNFH0Et2Fh3ms9PCIBxO1G0V6YZmp08hQAQz/XlokS5j6ddm4RcMitKzsviLT+Vdy5Po= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1688564044470650.5981921724748; Wed, 5 Jul 2023 06:34:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH2co-0006XY-Fq; Wed, 05 Jul 2023 09:32:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH2cX-0006OZ-Kj for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:32:42 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qH2cV-00024a-OT for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:32:37 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5149aafef44so7677523a12.0 for ; Wed, 05 Jul 2023 06:32:35 -0700 (PDT) Received: from m1x-phil.lan ([176.176.142.96]) by smtp.gmail.com with ESMTPSA id n17-20020a1709065e1100b00991481e7c53sm12507910eju.206.2023.07.05.06.32.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Jul 2023 06:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688563953; x=1691155953; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hTQw0+m/TSUjm/E7y2FkWg7UcKy3q1iulYca/mbmODQ=; b=mgXBbAvoJ1d/4T84vYM7w9ALmPodsi78fAF8trS6HASjpjd+vvCvsUg98x6nHSmT5a l8GiM+pS/kcyjazWKzCtIuwBkHK/6u4cpLELSBpdkmbDPcFeCanwpP5tMRaqxnf2gnhX XQ1pvvnkgC6mQ8U2wXVw6qvikeSI4Tm+pi+2aQQywp6no31K+q0Kknyud979R+hE2b24 3xzJwbDquUDpIKKOebKsq4m6tWfG+UIFe5OTOzu1lnWt6fYoNxEXyg3prBYoFFpCvlfQ L38QIEQG/soeqypPOegcF1GlJ6HplJG2FalbawsxvzqZKwsIn03dEBFm+8Xn+a0Apau5 owgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688563953; x=1691155953; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hTQw0+m/TSUjm/E7y2FkWg7UcKy3q1iulYca/mbmODQ=; b=bN6f3g1b3dhMFawq4gF/lG0BaXXK1dA39tnP4jLCM1iEgHrkG7dHfwFChxoPSUnx9H 3BHcd67kUrv6QgBb9AFHEsBOzKZZCDyiTxPWLq59bqMhTZGypXNXS4NQUghzMu1PCutt Lp9+bPTiFTzLXjVcQum6y3Y8nzdET65raN6olUCdnMPqUGbGDGmDySqB6LZKQYP+N/Zj UB+7h5AMaVLPY1FLZTmKna2PtPTJ9Yg7pbJpOQyFejw9i2fSXvVQvvvLJjA7UCxJMnkK bayLukinySeAQV5WtOjbadznrV/Fv0HWNAv2/W6AHEwRfU/7eNcWDVQWqtS4nVjKuDRf 4ETg== X-Gm-Message-State: ABy/qLYQHp/UbD7mGQj55VOeF4zaSVRonb5DVq/YhhH1Gj2pbx1QtKqB 6BFTkzqw0DLugzIHJ/68+cRBdW71gNv6WhOiFe4= X-Google-Smtp-Source: APBJJlGqAdiV8A5xSfVdO6bx22twXoTcD3psqTpayoqOL9g/5EDDLn8iFch/1nZNLsBwohMjLTnPYw== X-Received: by 2002:a17:906:c408:b0:991:caa8:fc3a with SMTP id u8-20020a170906c40800b00991caa8fc3amr10944746ejz.72.1688563953770; Wed, 05 Jul 2023 06:32:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Joel Stanley , Markus Armbruster , Alistair Francis , Laurent Vivier , "Edgar E. Iglesias" , Peter Maydell , "Dr. David Alan Gilbert" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Amit Shah , qemu-riscv@nongnu.org, "Michael S. Tsirkin" , Jason Wang , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/4] chardev/char-fe: Document FEWatchFunc typedef Date: Wed, 5 Jul 2023 15:31:38 +0200 Message-Id: <20230705133139.54419-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230705133139.54419-1-philmd@linaro.org> References: <20230705133139.54419-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1688564045456100003 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Marc-Andr=C3=A9 Lureau --- include/chardev/char-fe.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index 309960046a..ec3f706a14 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -175,6 +175,20 @@ void qemu_chr_fe_printf(CharBackend *be, const char *f= mt, ...) G_GNUC_PRINTF(2, 3); =20 =20 +/** + * FEWatchFunc: a #GSourceFunc called when any conditions requested by + * qemu_chr_fe_add_watch() is satisfied. + * @do_not_use: depending on the underlying chardev, a GIOChannel or a + * QIOChannel. DO NOT USE! + * @cond: bitwise combination of conditions watched and satisfied + * before calling this callback. + * @data: user data passed at creation to qemu_chr_fe_add_watch(). Can + * be NULL. + * + * Returns: G_SOURCE_REMOVE if the GSource should be removed from the + * main loop, or G_SOURCE_CONTINUE to leave the GSource in + * the main loop. + */ typedef gboolean (*FEWatchFunc)(void *do_not_use, GIOCondition condition, = void *data); =20 /** --=20 2.38.1 From nobody Mon May 13 01:07:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1688564011; cv=none; d=zohomail.com; s=zohoarc; b=Lp2dymPOXhkwTHfTg9x5NGmyhwjbF+RBN9l5EIYv/AGNi56waN2zjTV85bkV0Yol7TwM+27IHZCtdgpv5EWMPyXRHEp/ZVL6Njex9qQHoGu+QDukrINrCr6Rb044GCe7mwehwkTafyDARTEL6GFPEUUP2OubqKhBRLLEB5r3E7Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688564011; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HbPpVNUF+2VtKxJIu33BIAkZvOsT1iQzIQdIxYzIzlM=; b=hf4fd3epeE4Z9NTRWiQuBXUOpC+Wivdf9CMKWkhHOSNYTSePVWmJ4IMTMWeR458dfg2RkU9Y8C9RVzcuOzp4ZeMPfCnTQ0vUGSuiNplyIE/zjuiVTs8lzxL+uVX5iQSQDkCkoDRLm1VZeK9G1wpZYto/CkAXMvsJyhaif3xniCk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1688564011876508.6703007505969; Wed, 5 Jul 2023 06:33:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH2cy-0006qu-0u; Wed, 05 Jul 2023 09:33:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qH2ct-0006cE-FW for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:33:00 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qH2cq-000279-0P for qemu-devel@nongnu.org; Wed, 05 Jul 2023 09:32:59 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-991fe70f21bso785512566b.3 for ; Wed, 05 Jul 2023 06:32:55 -0700 (PDT) Received: from m1x-phil.lan ([176.176.142.96]) by smtp.gmail.com with ESMTPSA id ot6-20020a170906ccc600b0098df7d0e096sm14299620ejb.54.2023.07.05.06.32.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Jul 2023 06:32:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688563974; x=1691155974; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HbPpVNUF+2VtKxJIu33BIAkZvOsT1iQzIQdIxYzIzlM=; b=Zs65T8lrpAsp7bPFCDIQITGy3XYVCr4pc2Ckgr3shVR6gqfoGdW3bYtQfs0X65ljgt Kb6n0Qs50ujvbyGuHtcyzv04HrvCNCluk1BweVB72QhUvOuiQitkK6XqArai7SY2xQdn 7g2RIek8fi6WEZwmkR5h6iVJSHwk83Ozz5BN59IDO+V/A4cQE2xfI7tgY9IMJ7HHxTvJ 5b4jly0w1duwswFIueRg1mdKdEtKINYIRQqb5Lhg89bNPsoC0C4/c3t8NwhIhnI3muQC shJvy0jN5zDrNsb42KuOn1HQg8/G2dPJpZhXSCjqpZgkmSjd9prfyGoQzLAi5XrvCXlT XgLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688563974; x=1691155974; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HbPpVNUF+2VtKxJIu33BIAkZvOsT1iQzIQdIxYzIzlM=; b=U/tIVSS2xOjTEwiv5bcU91eTUxUDN+fyo4YKwud7Bg1I87bO9vIEd+GVpgpbcbL0WA nON1bFKoEveL0hrPJRkNvp1nQsJ29peYHAC2pvqKm5r9W3q8wUrtQa/hhxSjdfJRo3yX JF9askJJLM8gjbnA1opisk8TJpRfBPG/kVdngqKuWiM2UuPc5yg0cCA6bud4Ui8W7TID WhhSO2Wr6nS8M2GzRMb6mbbbJVMa8VXOImRzPoF+KfieB7alDd1j0J2KnwotsAyTZb6f 2Y+SVHSry+HeThZuhJXXSOd4frvNqaWwHqaKdllws3VnDDj6pxZKKyZSZ4mqzV4iZqgA 5V5Q== X-Gm-Message-State: ABy/qLaN7bfndZ9rbSt6YKZpSaFOJlxVA29i3YjH1zhsSZ6F89X037l/ kFa+Vjhjh7f1KdgDJMYGXAn5+argmr/cbaM1mpI= X-Google-Smtp-Source: APBJJlFrCCE5HTIQmuwHovVYZynRCUNQpI/ETUER5sVmjRQ1zCfUrGPW8GECPf/KcxsnSwv4i4maEw== X-Received: by 2002:a17:906:113:b0:993:a37a:cb4c with SMTP id 19-20020a170906011300b00993a37acb4cmr1600571eje.9.1688563974377; Wed, 05 Jul 2023 06:32:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Joel Stanley , Markus Armbruster , Alistair Francis , Laurent Vivier , "Edgar E. Iglesias" , Peter Maydell , "Dr. David Alan Gilbert" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , Amit Shah , qemu-riscv@nongnu.org, "Michael S. Tsirkin" , Jason Wang , qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/4] hw/char: Have FEWatchFunc handlers return G_SOURCE_CONTINUE/REMOVE Date: Wed, 5 Jul 2023 15:31:39 +0200 Message-Id: <20230705133139.54419-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230705133139.54419-1-philmd@linaro.org> References: <20230705133139.54419-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1688564014217100003 GLib recommend to use G_SOURCE_REMOVE / G_SOURCE_CONTINUE for GSourceFunc callbacks. Our FEWatchFunc is a GSourceFunc returning such value. Use such definitions which are "more memorable" [*]. [*] https://docs.gtk.org/glib/callback.SourceFunc.html#return-value Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marc-Andr=C3=A9 Lureau --- hw/char/cadence_uart.c | 8 ++++---- hw/char/cmsdk-apb-uart.c | 6 +++--- hw/char/ibex_uart.c | 8 ++++---- hw/char/nrf51_uart.c | 4 ++-- hw/char/serial.c | 2 +- hw/char/virtio-console.c | 2 +- hw/usb/redirect.c | 2 +- monitor/monitor.c | 2 +- net/vhost-user.c | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index 807e398541..eff0304a18 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -307,11 +307,11 @@ static gboolean cadence_uart_xmit(void *do_not_use, G= IOCondition cond, /* instant drain the fifo when there's no back-end */ if (!qemu_chr_fe_backend_connected(&s->chr)) { s->tx_count =3D 0; - return FALSE; + return G_SOURCE_REMOVE; } =20 if (!s->tx_count) { - return FALSE; + return G_SOURCE_REMOVE; } =20 ret =3D qemu_chr_fe_write(&s->chr, s->tx_fifo, s->tx_count); @@ -326,12 +326,12 @@ static gboolean cadence_uart_xmit(void *do_not_use, G= IOCondition cond, cadence_uart_xmit, s); if (!r) { s->tx_count =3D 0; - return FALSE; + return G_SOURCE_REMOVE; } } =20 uart_update_status(s); - return FALSE; + return G_SOURCE_REMOVE; } =20 static void uart_write_tx_fifo(CadenceUARTState *s, const uint8_t *buf, diff --git a/hw/char/cmsdk-apb-uart.c b/hw/char/cmsdk-apb-uart.c index f8dc89ee3d..d466cd93de 100644 --- a/hw/char/cmsdk-apb-uart.c +++ b/hw/char/cmsdk-apb-uart.c @@ -199,7 +199,7 @@ static gboolean uart_transmit(void *do_not_use, GIOCond= ition cond, void *opaque) s->watch_tag =3D 0; =20 if (!(s->ctrl & R_CTRL_TX_EN_MASK) || !(s->state & R_STATE_TXFULL_MASK= )) { - return FALSE; + return G_SOURCE_REMOVE; } =20 ret =3D qemu_chr_fe_write(&s->chr, &s->txbuf, 1); @@ -215,7 +215,7 @@ static gboolean uart_transmit(void *do_not_use, GIOCond= ition cond, void *opaque) } /* Transmit pending */ trace_cmsdk_apb_uart_tx_pending(); - return FALSE; + return G_SOURCE_REMOVE; } =20 buffer_drained: @@ -227,7 +227,7 @@ buffer_drained: s->intstatus |=3D R_INTSTATUS_TX_MASK; } cmsdk_apb_uart_update(s); - return FALSE; + return G_SOURCE_REMOVE; } =20 static void uart_cancel_transmit(CMSDKAPBUART *s) diff --git a/hw/char/ibex_uart.c b/hw/char/ibex_uart.c index f70adb5308..51708c0836 100644 --- a/hw/char/ibex_uart.c +++ b/hw/char/ibex_uart.c @@ -147,7 +147,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCon= dition cond, /* instant drain the fifo when there's no back-end */ if (!qemu_chr_fe_backend_connected(&s->chr)) { s->tx_level =3D 0; - return FALSE; + return G_SOURCE_REMOVE; } =20 if (!s->tx_level) { @@ -156,7 +156,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCon= dition cond, s->uart_intr_state |=3D R_INTR_STATE_TX_EMPTY_MASK; s->uart_intr_state &=3D ~R_INTR_STATE_TX_WATERMARK_MASK; ibex_uart_update_irqs(s); - return FALSE; + return G_SOURCE_REMOVE; } =20 ret =3D qemu_chr_fe_write(&s->chr, s->tx_fifo, s->tx_level); @@ -171,7 +171,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCon= dition cond, ibex_uart_xmit, s); if (!r) { s->tx_level =3D 0; - return FALSE; + return G_SOURCE_REMOVE; } } =20 @@ -192,7 +192,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCon= dition cond, } =20 ibex_uart_update_irqs(s); - return FALSE; + return G_SOURCE_REMOVE; } =20 static void uart_write_tx_fifo(IbexUartState *s, const uint8_t *buf, diff --git a/hw/char/nrf51_uart.c b/hw/char/nrf51_uart.c index 3c6f982de9..dfe2276d71 100644 --- a/hw/char/nrf51_uart.c +++ b/hw/char/nrf51_uart.c @@ -93,13 +93,13 @@ static gboolean uart_transmit(void *do_not_use, GIOCond= ition cond, void *opaque) */ goto buffer_drained; } - return FALSE; + return G_SOURCE_REMOVE; } =20 buffer_drained: s->reg[R_UART_TXDRDY] =3D 1; s->pending_tx_byte =3D false; - return FALSE; + return G_SOURCE_REMOVE; } =20 static void uart_cancel_transmit(NRF51UARTState *s) diff --git a/hw/char/serial.c b/hw/char/serial.c index 270e1b1094..f3094f860f 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -226,7 +226,7 @@ static gboolean serial_watch_cb(void *do_not_use, GIOCo= ndition cond, SerialState *s =3D opaque; s->watch_tag =3D 0; serial_xmit(s); - return FALSE; + return G_SOURCE_REMOVE; } =20 static void serial_xmit(SerialState *s) diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c index dd5a02e339..dbe0b28e60 100644 --- a/hw/char/virtio-console.c +++ b/hw/char/virtio-console.c @@ -45,7 +45,7 @@ static gboolean chr_write_unblocked(void *do_not_use, GIO= Condition cond, =20 vcon->watch =3D 0; virtio_serial_throttle_port(VIRTIO_SERIAL_PORT(vcon), false); - return FALSE; + return G_SOURCE_REMOVE; } =20 /* Callback function that's called when the guest sends us data */ diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 39fbaaab16..4bbf8afb33 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -278,7 +278,7 @@ static gboolean usbredir_write_unblocked(void *do_not_u= se, GIOCondition cond, dev->watch =3D 0; usbredirparser_do_write(dev->parser); =20 - return FALSE; + return G_SOURCE_REMOVE; } =20 static int usbredir_write(void *priv, uint8_t *data, int count) diff --git a/monitor/monitor.c b/monitor/monitor.c index dc352f9e9d..941f87815a 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -144,7 +144,7 @@ static gboolean monitor_unblocked(void *do_not_use, GIO= Condition cond, QEMU_LOCK_GUARD(&mon->mon_lock); mon->out_watch =3D 0; monitor_flush_locked(mon); - return FALSE; + return G_SOURCE_REMOVE; } =20 /* Caller must hold mon->mon_lock */ diff --git a/net/vhost-user.c b/net/vhost-user.c index 5993e4afca..12555518e8 100644 --- a/net/vhost-user.c +++ b/net/vhost-user.c @@ -239,7 +239,7 @@ static gboolean net_vhost_user_watch(void *do_not_use, = GIOCondition cond, =20 qemu_chr_fe_disconnect(&s->chr); =20 - return TRUE; + return G_SOURCE_CONTINUE; } =20 static void net_vhost_user_event(void *opaque, QEMUChrEvent event); --=20 2.38.1