From patchwork Wed Jul 5 13:31:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 699238 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp2781368wrs; Wed, 5 Jul 2023 06:33:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMEv1EFWoPI2ag/7dtPKwAgC5sQ7P8T6MqFnUUIlWkv/zcjly+CyUyw2xnVQimijg+sCek X-Received: by 2002:a1f:60cf:0:b0:46e:85b8:c019 with SMTP id u198-20020a1f60cf000000b0046e85b8c019mr7693584vkb.1.1688564005648; Wed, 05 Jul 2023 06:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688564005; cv=none; d=google.com; s=arc-20160816; b=lCImJaKIcExm4VeD10WXBoYXVesKlG/Km+FEvCeVAgGOV9HdQ/OpG9wNTTL/l3nw8w JjqNWcqZN2ScnZ9mZkysvrxWMGz7TN9cIFAT7aLW2g8LOD2wrV0MimixkBewTSNMmGr1 MDf2d5uc9CCZVZvl1KRzWZhveb/eiKWAlCLo4lSm2fzL+zlbf5V2rD8kIbBmVItXXLUQ mNDxpz2BgjzQnTGz5UzXSOfnXxXoiqQD40vSYZI1DI7ef/KPtwXOzxPrq5MsC7SIA2mG 7PG0aSBhrw9o3fzMq1Rqef9WUgN5CYDKOB9MxU18R9POQJGTqm7eRI4q1VIk6ZcndbqK EAgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=W5L5O6YuXvA1gkJxg2X5z0QB/Yl+Zb8DVDs3tCRC3SE=; fh=QXqlxiHoBliGFMptr7ZMhDvY0ya7oCRNrlYjmpX9sZY=; b=0E8Q/6B7H0Btcz/7BlNSnU13/BnIPje2vOFoNJvLgewxEj4hhW8fN7xa/GY27pU4gE BnK0T0gAtMQ0oBqz+Z8aFcYyfQPl7AvuHgVxADd2I26SxAndAEHToBD35oqSbgmFDhJO 4LJzulaGhbQHheaR7BbRdCmT318Z2hIGb0oiECfbGkNwKUlQwqq1NvpXHA5nNPOMtexQ MKsqTnAdkQ+Z0FwxUkCnIua/1C4RRA8mHQdZ5983Bcd6VkBbY/HSOuLd1hAbE3OGnE9H 13l1wrcATfA79Ua0jqPLJEtkFAiwphZ8/vj8zIx7sGQIrxOU/FsQX+R5f0nM1TeojJKD B/rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=smJuboJx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r10-20020a05622a034a00b003e4e95ad986si14259840qtw.390.2023.07.05.06.33.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jul 2023 06:33:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=smJuboJx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-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_Lure?= =?utf-8?q?au?= , Paolo Bonzini , Amit Shah , qemu-riscv@nongnu.org, "Michael S. Tsirkin" , Jason Wang , qemu-arm@nongnu.org, =?utf-8?q?Daniel_P?= =?utf-8?q?=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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, GIOCondition condition, void * /** * 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