mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/cpu: Clean up global variable shadowing
Fix: hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const CPUArchId *cpus = possible_cpus->cpus; ^ hw/core/numa.c:69:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] uint16List *cpus = NULL; ^ hw/acpi/aml-build.c:2005:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] CPUArchIdList *cpus = ms->possible_cpus; ^ hw/core/machine-smp.c:77:14: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] unsigned cpus = config->has_cpus ? config->cpus : 0; ^ include/hw/core/cpu.h:589:17: note: previous declaration is here extern CPUTailQ cpus; ^ Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ani Sinha <anisinha@redhat.com> Message-Id: <20231010115048.11856-2-philmd@linaro.org>
This commit is contained in:
parent
79a99091c1
commit
3c55dd5896
5 changed files with 10 additions and 10 deletions
|
@ -586,13 +586,13 @@ static inline CPUArchState *cpu_env(CPUState *cpu)
|
|||
}
|
||||
|
||||
typedef QTAILQ_HEAD(CPUTailQ, CPUState) CPUTailQ;
|
||||
extern CPUTailQ cpus;
|
||||
extern CPUTailQ cpus_queue;
|
||||
|
||||
#define first_cpu QTAILQ_FIRST_RCU(&cpus)
|
||||
#define first_cpu QTAILQ_FIRST_RCU(&cpus_queue)
|
||||
#define CPU_NEXT(cpu) QTAILQ_NEXT_RCU(cpu, node)
|
||||
#define CPU_FOREACH(cpu) QTAILQ_FOREACH_RCU(cpu, &cpus, node)
|
||||
#define CPU_FOREACH(cpu) QTAILQ_FOREACH_RCU(cpu, &cpus_queue, node)
|
||||
#define CPU_FOREACH_SAFE(cpu, next_cpu) \
|
||||
QTAILQ_FOREACH_SAFE_RCU(cpu, &cpus, node, next_cpu)
|
||||
QTAILQ_FOREACH_SAFE_RCU(cpu, &cpus_queue, node, next_cpu)
|
||||
|
||||
extern __thread CPUState *current_cpu;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue