From f481ee2d5e3d77c12a4c9a7756b8c2612aad84c6 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Dec 2018 11:56:15 +0100 Subject: qemu/queue.h: typedef QTAILQ heads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will be needed when we change the QTAILQ head and elem structs to unions. However, it is also consistent with the usage elsewhere in QEMU for other list head structs (see for example FsMountList). Note that most QTAILQs only need their name in order to do backwards walks. Those do not break with the struct->union change, and anyway the change will also remove the need to name heads when doing backwards walks, so those are not touched here. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Paolo Bonzini --- include/qom/cpu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/qom') diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 40acc54..16bbed1 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -436,8 +436,9 @@ struct CPUState { GArray *iommu_notifiers; }; -QTAILQ_HEAD(CPUTailQ, CPUState); -extern struct CPUTailQ cpus; +typedef QTAILQ_HEAD(CPUTailQ, CPUState) CPUTailQ; +extern CPUTailQ cpus; + #define first_cpu QTAILQ_FIRST_RCU(&cpus) #define CPU_NEXT(cpu) QTAILQ_NEXT_RCU(cpu, node) #define CPU_FOREACH(cpu) QTAILQ_FOREACH_RCU(cpu, &cpus, node) -- cgit v1.1