From patchwork Sun Sep 3 16:33:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Rytarowski X-Patchwork-Id: 9936437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C17D4601D7 for ; Sun, 3 Sep 2017 16:46:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0C7428657 for ; Sun, 3 Sep 2017 16:46:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9557F286B3; Sun, 3 Sep 2017 16:46:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 31ED828657 for ; Sun, 3 Sep 2017 16:46:47 +0000 (UTC) Received: from localhost ([::1]:59684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doY2B-0001cN-4K for patchwork-qemu-devel@patchwork.kernel.org; Sun, 03 Sep 2017 12:46:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doY1W-0001Yb-OL for qemu-devel@nongnu.org; Sun, 03 Sep 2017 12:45:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doY1R-0000zx-W4 for qemu-devel@nongnu.org; Sun, 03 Sep 2017 12:45:26 -0400 Received: from mout.gmx.net ([212.227.17.21]:50561) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doY1R-0000z6-KE for qemu-devel@nongnu.org; Sun, 03 Sep 2017 12:45:21 -0400 Received: from localhost.localdomain ([185.58.161.191]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0LoaCE-1dIEKz0Xs2-00gaIM; Sun, 03 Sep 2017 18:45:11 +0200 From: Kamil Rytarowski To: pbonzini@redhat.com Date: Sun, 3 Sep 2017 18:33:04 +0200 Message-Id: <20170903163304.17919-1-n54@gmx.com> X-Mailer: git-send-email 2.14.1 X-Provags-ID: V03:K0:q9PSGxqBkEYBmx0qoJL0Qa2icX93SnKHPsdk6Ls5CK7LyZA+Fiq npxOQZbw7+567ybBF7ImqoZd3YTSjWDqwE1R3Wfe29Q2Zh5yL+mXfEnYSr7QaU8hjBLINWg 5gnzuhVd1D4RKrExxN9QxxlpXlkY/eHySsbpDp7cvnKVIbaY0V6xTM7vfGa9uOatRvWRcyM 4C+lTaeYYIsQrbr4+6PkQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:XZ/l6jbdscA=:NARGj9PWQzEW9EZFFY1r7C rejdxt7rDi361PRrjEaOqZ8SfKhlPzJxOf0i2nW8wLDZbIo7rBSTLmMdP1e/E99hEqCfHZtxR 1nsB9YqDRdb7yeGBXwzMTQLjutpxN/xkGTbluIvyYiZ2MsDY2m3GklvOsuYh1IED22WvqCH79 ZX1aravHs3dYoR7WrDNKOUK0WZ3wk/KbHi335Tg41UrceJxsJUNC0LPb81tvgI1WS37fX+81L 4jy1QHe3Gr2fMm/3ZVZs0drzga0Cq326BJJByqCA3ETY0EsKSJ7sWUkF7IcLm6RTWIWi5L5oe 6HFfhSqAfA87ZO96PGLrOTESJzuOyhNKA2NGAuYjscM3kydlsFljLcB32cM85O2cyRKNEXKT5 Daku+VfLpXdmj3R3E3JyRspNwKyxToTDKjiKRm5CcSuxneNF68FF6+tb0udddsnLwA58VnzsZ PmgvrSs78cI9xrXMCU0qKsC1cKepIJOTlW4cQOkvHM3ZfuyoRK/RC2GO1aGioTc4j/2mO1yem qolKEqnb16a6KpYcL4/F/dynBEKyO7JaamcpEkM8sV6g2xBHEk++RxUCT5cnuU/AQQTFZiZfB Zkp80y66yYjkdQgfSQ9imQwaVp//5qtLpU21AbB5ccRmiPf198JubYGc/UBGlq5WRqsGsVrdi OoA7GTE93KoM893VDu9WnGhMYDVlVHWWYTVqh3W/Cn3jfQ9dXiDt3/WPjFUj/GzRl7KRXpJa4 e9msnAQVzydoWOUGscRp3S/FcnlNEqb6wRsnq3MR4Z9VGAN8XO+Vi5MAZp1/5U0p2Yh5M0f7H 0s8XBZbsK7kaM80fV6x/Ey/h92lVw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.21 Subject: [Qemu-devel] [PATCH] memory: Rename queue to mrqueue (memory region queue) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kamil Rytarowski , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP SunOS declares struct queue in . This fixes build on SmartOS (Joyent). Patch cherry-picked from pkgsrc by jperkin (Joyent). Signed-off-by: Kamil Rytarowski --- memory.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/memory.c b/memory.c index c0adc35410..b9920a6540 100644 --- a/memory.c +++ b/memory.c @@ -2701,10 +2701,10 @@ typedef struct MemoryRegionList MemoryRegionList; struct MemoryRegionList { const MemoryRegion *mr; - QTAILQ_ENTRY(MemoryRegionList) queue; + QTAILQ_ENTRY(MemoryRegionList) mrqueue; }; -typedef QTAILQ_HEAD(queue, MemoryRegionList) MemoryRegionListHead; +typedef QTAILQ_HEAD(mrqueue, MemoryRegionList) MemoryRegionListHead; #define MR_SIZE(size) (int128_nz(size) ? (hwaddr)int128_get64( \ int128_sub((size), int128_one())) : 0) @@ -2746,7 +2746,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f, bool found = false; /* check if the alias is already in the queue */ - QTAILQ_FOREACH(ml, alias_print_queue, queue) { + QTAILQ_FOREACH(ml, alias_print_queue, mrqueue) { if (ml->mr == mr->alias) { found = true; } @@ -2755,7 +2755,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f, if (!found) { ml = g_new(MemoryRegionList, 1); ml->mr = mr->alias; - QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue); + QTAILQ_INSERT_TAIL(alias_print_queue, ml, mrqueue); } mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx " (prio %d, %s): alias %s @%s " TARGET_FMT_plx @@ -2783,26 +2783,26 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f, QTAILQ_FOREACH(submr, &mr->subregions, subregions_link) { new_ml = g_new(MemoryRegionList, 1); new_ml->mr = submr; - QTAILQ_FOREACH(ml, &submr_print_queue, queue) { + QTAILQ_FOREACH(ml, &submr_print_queue, mrqueue) { if (new_ml->mr->addr < ml->mr->addr || (new_ml->mr->addr == ml->mr->addr && new_ml->mr->priority > ml->mr->priority)) { - QTAILQ_INSERT_BEFORE(ml, new_ml, queue); + QTAILQ_INSERT_BEFORE(ml, new_ml, mrqueue); new_ml = NULL; break; } } if (new_ml) { - QTAILQ_INSERT_TAIL(&submr_print_queue, new_ml, queue); + QTAILQ_INSERT_TAIL(&submr_print_queue, new_ml, mrqueue); } } - QTAILQ_FOREACH(ml, &submr_print_queue, queue) { + QTAILQ_FOREACH(ml, &submr_print_queue, mrqueue) { mtree_print_mr(mon_printf, f, ml->mr, level + 1, cur_start, alias_print_queue); } - QTAILQ_FOREACH_SAFE(ml, &submr_print_queue, queue, next_ml) { + QTAILQ_FOREACH_SAFE(ml, &submr_print_queue, mrqueue, next_ml) { g_free(ml); } } @@ -2872,13 +2872,13 @@ void mtree_info(fprintf_function mon_printf, void *f, bool flatview) } /* print aliased regions */ - QTAILQ_FOREACH(ml, &ml_head, queue) { + QTAILQ_FOREACH(ml, &ml_head, mrqueue) { mon_printf(f, "memory-region: %s\n", memory_region_name(ml->mr)); mtree_print_mr(mon_printf, f, ml->mr, 1, 0, &ml_head); mon_printf(f, "\n"); } - QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) { + QTAILQ_FOREACH_SAFE(ml, &ml_head, mrqueue, ml2) { g_free(ml); } }