diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-14 09:28:06 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-28 19:25:51 +0200 |
| commit | d8bb00d6d72eba317f78501434fc37db4968fa31 (patch) | |
| tree | ff256818d8ffb51d20ba626db9a5f20f6e411c1f /hw/qdev.h | |
| parent | afd4030c16d290e460cc93f8f9e353516b5451a2 (diff) | |
| download | focaccia-qemu-d8bb00d6d72eba317f78501434fc37db4968fa31.tar.gz focaccia-qemu-d8bb00d6d72eba317f78501434fc37db4968fa31.zip | |
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>
Diffstat (limited to 'hw/qdev.h')
| -rw-r--r-- | hw/qdev.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/qdev.h b/hw/qdev.h index aa7ae36187..a7cc48b4dd 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -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; }; |