mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qdev: switch children device list to QTAILQ
SCSI buses will need to read the children list first-to-last. This requires using a QTAILQ, because hell breaks loose if you just try inserting at the tail (thus reversing the order of all existing visits from last-to-first to first-to-tail). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
afd4030c16
commit
d8bb00d6d7
8 changed files with 28 additions and 28 deletions
|
@ -42,7 +42,7 @@ struct DeviceState {
|
|||
qemu_irq *gpio_in;
|
||||
QLIST_HEAD(, BusState) child_bus;
|
||||
int num_child_bus;
|
||||
QLIST_ENTRY(DeviceState) sibling;
|
||||
QTAILQ_ENTRY(DeviceState) sibling;
|
||||
int instance_id_alias;
|
||||
int alias_required_for_version;
|
||||
};
|
||||
|
@ -73,7 +73,7 @@ struct BusState {
|
|||
const char *name;
|
||||
int allow_hotplug;
|
||||
int qdev_allocated;
|
||||
QLIST_HEAD(, DeviceState) children;
|
||||
QTAILQ_HEAD(, DeviceState) children;
|
||||
QLIST_ENTRY(BusState) sibling;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue