From patchwork Mon Jan 13 17:08:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11330615 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4FC514B4 for ; Mon, 13 Jan 2020 17:09:58 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E7C52084D for ; Mon, 13 Jan 2020 17:09:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="RN5MrMcN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E7C52084D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eu.citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir3D4-0008HP-C9; Mon, 13 Jan 2020 17:09:02 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ir3D3-0008Gy-G5 for xen-devel@lists.xenproject.org; Mon, 13 Jan 2020 17:09:01 +0000 X-Inumbo-ID: 5cf0b54a-3627-11ea-a985-bc764e2007e4 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5cf0b54a-3627-11ea-a985-bc764e2007e4; Mon, 13 Jan 2020 17:08:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1578935328; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=/5wulVWsdwFhm+h/O97CX626cu5GEU2I6i0AP03/ttE=; b=RN5MrMcN/opYZoSk6RmOMeRCMWvsKBWKLxum7uPIzijUk+rZ9Bh8Nu6r H0e29BiHrVMO66WJz4bBEjuhKLep5pv5ZiqFYEsaoY1UnkL8h6dwDJZHx UYfetF+zeP9RnHjzjuW78W1yzVdXNAP8HGHLb7vGKZtGJS7U5UwFOFkEF M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=Pass smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 8vpakQDzgTYjdI6sgOaQzkhS0mNiidFH3GC5iZWiffOqv4VTm5K7akuZpTP4rIRlkoeaEs07J4 Q8IChD4IlCwWWoCLSLH5J7wVvmkzIG3Qs/Bh9TCOXHS28VvNbEcc69Ak5ZL1rqmrsNjegpCVWk tueRfMHXe+nVAp3uJHhxG2rQnCLgrpEVs0eevooPtT3EXryYUc04h5U6WJo5wkeBjupzMDD97t 7svlv+nx0VBDz+ixqLc7tKKzdtFgEM7q0UTFyvQ68yBkYFAu2R5xmcQZm0id7ysxMssDxAvT4Y 74Y= X-SBRS: 2.7 X-MesageID: 10859012 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,429,1571716800"; d="scan'208";a="10859012" From: Ian Jackson To: Date: Mon, 13 Jan 2020 17:08:35 +0000 Message-ID: <20200113170843.21332-3-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200113170843.21332-1-ian.jackson@eu.citrix.com> References: <20200113170843.21332-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 02/10] libxl: event: Rename ctx.pollers_fd_changed to .pollers_active X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson , George Dunlap Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" We are going to use this a bit more widely. Make the name more general. Signed-off-by: Ian Jackson Reviewed-by: George Dunlap --- tools/libxl/libxl.c | 4 ++-- tools/libxl/libxl_event.c | 8 ++++---- tools/libxl/libxl_internal.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index a0d84281d0..f60fd3e4fd 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -48,7 +48,7 @@ int libxl_ctx_alloc(libxl_ctx **pctx, int version, ctx->poller_app = 0; LIBXL_LIST_INIT(&ctx->pollers_event); LIBXL_LIST_INIT(&ctx->pollers_idle); - LIBXL_LIST_INIT(&ctx->pollers_fds_changed); + LIBXL_LIST_INIT(&ctx->pollers_active); LIBXL_LIST_INIT(&ctx->efds); LIBXL_TAILQ_INIT(&ctx->etimes); @@ -177,7 +177,7 @@ int libxl_ctx_free(libxl_ctx *ctx) libxl__poller_put(ctx, ctx->poller_app); ctx->poller_app = NULL; assert(LIBXL_LIST_EMPTY(&ctx->pollers_event)); - assert(LIBXL_LIST_EMPTY(&ctx->pollers_fds_changed)); + assert(LIBXL_LIST_EMPTY(&ctx->pollers_active)); libxl__poller *poller, *poller_tmp; LIBXL_LIST_FOREACH_SAFE(poller, &ctx->pollers_idle, entry, poller_tmp) { libxl__poller_dispose(poller); diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index 1210c1bfb3..5b12a45e70 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -238,7 +238,7 @@ void libxl__ev_fd_deregister(libxl__gc *gc, libxl__ev_fd *ev) LIBXL_LIST_REMOVE(ev, entry); ev->fd = -1; - LIBXL_LIST_FOREACH(poller, &CTX->pollers_fds_changed, fds_changed_entry) + LIBXL_LIST_FOREACH(poller, &CTX->pollers_active, active_entry) poller->fds_deregistered = 1; out: @@ -1663,15 +1663,15 @@ libxl__poller *libxl__poller_get(libxl__gc *gc) } } - LIBXL_LIST_INSERT_HEAD(&CTX->pollers_fds_changed, p, - fds_changed_entry); + LIBXL_LIST_INSERT_HEAD(&CTX->pollers_active, p, + active_entry); return p; } void libxl__poller_put(libxl_ctx *ctx, libxl__poller *p) { if (!p) return; - LIBXL_LIST_REMOVE(p, fds_changed_entry); + LIBXL_LIST_REMOVE(p, active_entry); LIBXL_LIST_INSERT_HEAD(&ctx->pollers_idle, p, entry); } diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index c5b71d15f0..581d64b99c 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -629,13 +629,13 @@ struct libxl__poller { /* * We also use the poller to record whether any fds have been * deregistered since we entered poll. Each poller which is not - * idle is on the list pollers_fds_changed. fds_deregistered is + * idle is on the list pollers_active. fds_deregistered is * cleared by beforepoll, and tested by afterpoll. Whenever an fd * event is deregistered, we set the fds_deregistered of all non-idle * pollers. So afterpoll can tell whether any POLLNVAL is * plausibly due to an fd being closed and reopened. */ - LIBXL_LIST_ENTRY(libxl__poller) fds_changed_entry; + LIBXL_LIST_ENTRY(libxl__poller) active_entry; bool fds_deregistered; }; @@ -678,7 +678,7 @@ struct libxl__ctx { libxl__poller *poller_app; /* libxl_osevent_beforepoll and _afterpoll */ LIBXL_LIST_HEAD(, libxl__poller) pollers_event, pollers_idle; - LIBXL_LIST_HEAD(, libxl__poller) pollers_fds_changed; + LIBXL_LIST_HEAD(, libxl__poller) pollers_active; LIBXL_SLIST_HEAD(libxl__osevent_hook_nexi, libxl__osevent_hook_nexus) hook_fd_nexi_idle, hook_timeout_nexi_idle;