From patchwork Fri Jan 10 13:28:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11327391 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 2DBAD13A0 for ; Fri, 10 Jan 2020 13:30:15 +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 0AAAA2077C for ; Fri, 10 Jan 2020 13:30:14 +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="YlMoGHfC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AAAA2077C 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 1ipuLm-0001zj-Nj; Fri, 10 Jan 2020 13:29:18 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ipuLl-0001zU-U6 for xen-devel@lists.xenproject.org; Fri, 10 Jan 2020 13:29:17 +0000 X-Inumbo-ID: 2e49e148-33ad-11ea-a2eb-bc764e2007e4 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2e49e148-33ad-11ea-a2eb-bc764e2007e4; Fri, 10 Jan 2020 13:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1578662949; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=/5wulVWsdwFhm+h/O97CX626cu5GEU2I6i0AP03/ttE=; b=YlMoGHfCWl2o9lCZ9FBlLBZ23mLtrcBFcWfHFuJLMiG8e/hjrKttOr3y +ke6apri8SJq8+LJu9fILO/jtz4rXtmTikfhdxKlULO8XDjZIjHFJwQZh T65dsQBYA4c12nxPOerb/k+PiO5sbsYapcW2XjcQUyWNaOYkuzEKCdOk/ s=; Authentication-Results: esa4.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 (esa4.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=esa4.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.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=esa4.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 (esa4.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=esa4.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: IKy6Nyk/8Fx+S2F7zYzFqRDH7h+GE9KehlE3Wvl8ePE41polCiXy6loGRnYu7jsMlk336e+tsO pY1SE6KEU0+tL8CR7gatkSo8ic1RYj7PjKnGzv5IEnwgIRNJVXmTvUuIEoK4OwZt9RS0W4VgEW QjxgefYBTu/6DS0n8aO/nLAljSv2wjyg4F9KsxOtS4MeV5Y1tCnIVO5KZDfJ4KD4pSlOKetWmb gEYD/ubeOwZ9ldp/011w99+lHqQXOilV/jsI0556Fdpy0/ZyhKfT8hKk4BapVf94jVqHMKOl6e ZLs= X-SBRS: 2.7 X-MesageID: 11329924 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,417,1571716800"; d="scan'208";a="11329924" From: Ian Jackson To: Date: Fri, 10 Jan 2020 13:28:56 +0000 Message-ID: <20200110132902.29295-3-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200110132902.29295-1-ian.jackson@eu.citrix.com> References: <20200110132902.29295-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 2/8] 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: Anthony PERARD , Ian Jackson , George Dunlap , Wei Liu 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 --- 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;