From patchwork Sun Jan 30 08:43:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12729762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id ED927C433FE for ; Sun, 30 Jan 2022 08:43:59 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.262421.454658 (Exim 4.92) (envelope-from ) id 1nE5oM-0007Sl-FR; Sun, 30 Jan 2022 08:43:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 262421.454658; Sun, 30 Jan 2022 08:43:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nE5oM-0007Ru-6v; Sun, 30 Jan 2022 08:43:50 +0000 Received: by outflank-mailman (input) for mailman id 262421; Sun, 30 Jan 2022 08:43:49 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nE5oK-00074R-Uw for xen-devel@lists.xenproject.org; Sun, 30 Jan 2022 08:43:49 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bd142d6e-81a8-11ec-8f75-fffcc8bd4f1a; Sun, 30 Jan 2022 09:43:47 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BB1E821112; Sun, 30 Jan 2022 08:43:46 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 96A0513638; Sun, 30 Jan 2022 08:43:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OOaLI8JP9mHCRAAAMHmgww (envelope-from ); Sun, 30 Jan 2022 08:43:46 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bd142d6e-81a8-11ec-8f75-fffcc8bd4f1a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1643532226; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YFPXGko/iSk3OMZLQ303tNgEDkqNGWgFH9pl53U/bC8=; b=mU9vHHrKkhT+X3QYOqxzAmlK6+Dzik8Pf1g082/NE7MaDLNnIxE0dxkb6qRb9V2JRmuF+z tLzK8E9SNKh5TTVDrw7rZVt8YG7u81n3EZ/k1RHCep95a3vO+Wn1hRU5PtyFo2TUfYgAd2 AigMfzsHEIwELAFQkqCo+8x8xWGSKeI= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Anthony PERARD Subject: [PATCH 4/5] tools/libs/evtchn: use _xen_list.h Date: Sun, 30 Jan 2022 09:43:42 +0100 Message-Id: <20220130084343.19070-5-jgross@suse.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220130084343.19070-1-jgross@suse.com> References: <20220130084343.19070-1-jgross@suse.com> MIME-Version: 1.0 Instead of including xen-external/bsd-sys-queue.h use the header _xen_list.h in minios.c. Signed-off-by: Juergen Gross --- tools/libs/evtchn/minios.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/libs/evtchn/minios.c b/tools/libs/evtchn/minios.c index 30f98bc7e4..65cfccfd09 100644 --- a/tools/libs/evtchn/minios.c +++ b/tools/libs/evtchn/minios.c @@ -20,7 +20,7 @@ * Split off from xc_minios.c */ -#include "xen-external/bsd-sys-queue.h" +#include "_xen_list.h" #include #include #include @@ -38,10 +38,10 @@ #include "private.h" -LIST_HEAD(port_list, port_info); +XEN_LIST_HEAD(port_list, struct port_info); struct port_info { - LIST_ENTRY(port_info) list; + XEN_LIST_ENTRY(struct port_info) list; evtchn_port_t port; bool pending; bool bound; @@ -62,7 +62,7 @@ static struct port_info *port_alloc(xenevtchn_handle *xce) port_info->port = -1; port_info->bound = false; - LIST_INSERT_HEAD(port_list, port_info, list); + XEN_LIST_INSERT_HEAD(port_list, port_info, list); return port_info; } @@ -72,7 +72,7 @@ static void port_dealloc(struct port_info *port_info) if ( port_info->bound ) unbind_evtchn(port_info->port); - LIST_REMOVE(port_info, list); + XEN_LIST_REMOVE(port_info, list); free(port_info); } @@ -81,7 +81,7 @@ static int evtchn_close_fd(struct file *file) struct port_info *port_info, *tmp; struct port_list *port_list = file->dev; - LIST_FOREACH_SAFE(port_info, port_list, list, tmp) + XEN_LIST_FOREACH_SAFE(port_info, port_list, list, tmp) port_dealloc(port_info); free(port_list); @@ -126,7 +126,7 @@ int osdep_evtchn_open(xenevtchn_handle *xce, unsigned int flags) } file->dev = list; - LIST_INIT(list); + XEN_LIST_INIT(list); xce->fd = fd; printf("evtchn_open() -> %d\n", fd); @@ -173,7 +173,7 @@ static void evtchn_handler(evtchn_port_t port, struct pt_regs *regs, void *data) assert(file); port_list = file->dev; mask_evtchn(port); - LIST_FOREACH(port_info, port_list, list) + XEN_LIST_FOREACH(port_info, port_list, list) { if ( port_info->port == port ) goto found; @@ -257,7 +257,7 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port) struct port_info *port_info; struct port_list *port_list = file->dev; - LIST_FOREACH(port_info, port_list, list) + XEN_LIST_FOREACH(port_info, port_list, list) { if ( port_info->port == port ) { @@ -314,7 +314,7 @@ xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce) file->read = false; - LIST_FOREACH(port_info, port_list, list) + XEN_LIST_FOREACH(port_info, port_list, list) { if ( port_info->port != -1 && port_info->pending ) {