mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
exec: change RAM list to a TAILQ
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
0d6d3c87a2
commit
a3161038a1
6 changed files with 38 additions and 38 deletions
8
dump.c
8
dump.c
|
|
@ -427,7 +427,7 @@ static hwaddr get_offset(hwaddr phys_addr,
|
|||
}
|
||||
}
|
||||
|
||||
QLIST_FOREACH(block, &ram_list.blocks, next) {
|
||||
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
|
||||
if (s->has_filter) {
|
||||
if (block->offset >= s->begin + s->length ||
|
||||
block->offset + block->length <= s->begin) {
|
||||
|
|
@ -594,7 +594,7 @@ static int dump_completed(DumpState *s)
|
|||
static int get_next_block(DumpState *s, RAMBlock *block)
|
||||
{
|
||||
while (1) {
|
||||
block = QLIST_NEXT(block, next);
|
||||
block = QTAILQ_NEXT(block, next);
|
||||
if (!block) {
|
||||
/* no more block */
|
||||
return 1;
|
||||
|
|
@ -670,11 +670,11 @@ static ram_addr_t get_start_block(DumpState *s)
|
|||
RAMBlock *block;
|
||||
|
||||
if (!s->has_filter) {
|
||||
s->block = QLIST_FIRST(&ram_list.blocks);
|
||||
s->block = QTAILQ_FIRST(&ram_list.blocks);
|
||||
return 0;
|
||||
}
|
||||
|
||||
QLIST_FOREACH(block, &ram_list.blocks, next) {
|
||||
QTAILQ_FOREACH(block, &ram_list.blocks, next) {
|
||||
if (block->offset >= s->begin + s->length ||
|
||||
block->offset + block->length <= s->begin) {
|
||||
/* This block is out of the range */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue