[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/50] memory: Rename queue to mrqueue (memory region
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 23/50] memory: Rename queue to mrqueue (memory region queue) |
Date: |
Tue, 19 Sep 2017 14:29:12 +0200 |
From: Kamil Rytarowski <address@hidden>
SunOS declares struct queue in <netinet/in.h>.
This fixes build on SmartOS (Joyent).
Patch cherry-picked from pkgsrc by jperkin (Joyent).
Signed-off-by: Kamil Rytarowski <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
memory.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/memory.c b/memory.c
index c0adc35..b9920a6 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);
}
}
--
1.8.3.1
- [Qemu-devel] [PULL 30/50] kvm: kvm_log_start/stop are only called with known sections, (continued)
- [Qemu-devel] [PULL 30/50] kvm: kvm_log_start/stop are only called with known sections, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 28/50] kvm: use start + size for memory ranges, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 21/50] i386/kvm: advertise Hyper-V frequency MSRs, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 22/50] MAINTAINERS: update email, add missing test entry for megasas, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 24/50] scsi/esp: Rename the ESP macro to ESP_STATE, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 27/50] kvm: factor out alignment of memory section, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 31/50] kvm: kvm_log_sync() is only called with known memory sections, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 25/50] multiboot: validate multiboot header address values, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 32/50] test-qga: add missing qemu-ga tool dependency, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 26/50] kvm: require JOIN_MEMORY_REGIONS_WORKS, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 23/50] memory: Rename queue to mrqueue (memory region queue),
Paolo Bonzini <=
- [Qemu-devel] [PULL 13/50] scsi: move non-emulation specific code to scsi/, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 33/50] hw/i386: Improve some of the warning messages, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 35/50] Convert single line fprintf(.../n) to warn_report(), Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 38/50] target/mips: Convert VM clock update prints to warn_report, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 36/50] Convert multi-line fprintf() to warn_report(), Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 34/50] Convert remaining error_report() to warn_report(), Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 42/50] hyperv: add header with protocol definitions, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 37/50] General warn report fixups, Paolo Bonzini, 2017/09/19
- [Qemu-devel] [PULL 43/50] update-linux-headers: prepare for hyperv.h removal, Paolo Bonzini, 2017/09/19