aboutsummaryrefslogtreecommitdiff
path: root/target-m68k
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-12-16 02:17:02 +0100
committerAndreas Färber <afaerber@suse.de>2012-12-19 14:08:56 +0100
commit92a3136174f60ee45b113296cb2c2a5225b00369 (patch)
treeab686fdaa37845ea0551e725c706ab99c9c89885 /target-m68k
parent494342b35b55b3b126821141e15c8a49df122ff1 (diff)
downloadqemu-92a3136174f60ee45b113296cb2c2a5225b00369.zip
qemu-92a3136174f60ee45b113296cb2c2a5225b00369.tar.gz
qemu-92a3136174f60ee45b113296cb2c2a5225b00369.tar.bz2
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>
Diffstat (limited to 'target-m68k')
-rw-r--r--target-m68k/helper.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index a5d0100..875a71a 100644
--- a/target-m68k/helper.c
+++ b/target-m68k/helper.c
@@ -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,
};