mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
cpu: Introduce CPUListState struct
This generalizes {ARM,M68k,Alpha}CPUListState to avoid declaring it for each target. Place it in cpu-common.h to avoid circular dependencies. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
494342b35b
commit
92a3136174
4 changed files with 18 additions and 21 deletions
|
@ -25,11 +25,6 @@
|
|||
|
||||
#define SIGNBIT (1u << 31)
|
||||
|
||||
typedef struct M68kCPUListState {
|
||||
fprintf_function cpu_fprintf;
|
||||
FILE *file;
|
||||
} M68kCPUListState;
|
||||
|
||||
/* Sort alphabetically, except for "any". */
|
||||
static gint m68k_cpu_list_compare(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
|
@ -51,7 +46,7 @@ static gint m68k_cpu_list_compare(gconstpointer a, gconstpointer b)
|
|||
static void m68k_cpu_list_entry(gpointer data, gpointer user_data)
|
||||
{
|
||||
ObjectClass *c = data;
|
||||
M68kCPUListState *s = user_data;
|
||||
CPUListState *s = user_data;
|
||||
|
||||
(*s->cpu_fprintf)(s->file, "%s\n",
|
||||
object_class_get_name(c));
|
||||
|
@ -59,7 +54,7 @@ static void m68k_cpu_list_entry(gpointer data, gpointer user_data)
|
|||
|
||||
void m68k_cpu_list(FILE *f, fprintf_function cpu_fprintf)
|
||||
{
|
||||
M68kCPUListState s = {
|
||||
CPUListState s = {
|
||||
.file = f,
|
||||
.cpu_fprintf = cpu_fprintf,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue