From d8bb00d6d72eba317f78501434fc37db4968fa31 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 14 Sep 2011 09:28:06 +0200 Subject: 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 Signed-off-by: Kevin Wolf --- hw/qdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/qdev.h') 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; }; -- cgit v1.2.1