Fixes :
test/x86/access.c:577: warning: passing argument 1 of 'smp_init' from
incompatible pointer type
Signed-off-by: Carlo Marcelo Arenas Belon <[EMAIL PROTECTED]>
---
user/test/x86/lib/smp.c | 4 ++--
user/test/x86/lib/smp.h | 2 +-
user/test/x86/smptest.c | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/user/test/x86/lib/smp.c b/user/test/x86/lib/smp.c
index a4cbe61..84ab163 100644
--- a/user/test/x86/lib/smp.c
+++ b/user/test/x86/lib/smp.c
@@ -125,7 +125,7 @@ void on_cpu(int cpu, void (*function)(void *data), void
*data)
spin_unlock(&ipi_lock);
}
-static void (*smp_main_func)(void);
+static int (*smp_main_func)(void);
static volatile int smp_main_running;
asm ("smp_init_entry: \n"
@@ -133,7 +133,7 @@ asm ("smp_init_entry: \n"
"sti \n"
"call *smp_main_func");
-void smp_init(void (*smp_main)(void))
+void smp_init(int (*smp_main)(void))
{
int i;
void smp_init_entry(void);
diff --git a/user/test/x86/lib/smp.h b/user/test/x86/lib/smp.h
index bcf76a3..1ee0cb0 100644
--- a/user/test/x86/lib/smp.h
+++ b/user/test/x86/lib/smp.h
@@ -5,7 +5,7 @@ struct spinlock {
int v;
};
-void smp_init(void (*smp_main)(void));
+void smp_init(int (*smp_main)(void));
int cpu_count(void);
int smp_id(void);
diff --git a/user/test/x86/smptest.c b/user/test/x86/smptest.c
index f6ef3e9..c16afd5 100644
--- a/user/test/x86/smptest.c
+++ b/user/test/x86/smptest.c
@@ -11,11 +11,12 @@ static void ipi_test(void *data)
printf("but wrong cpu %d\n", smp_id());
}
-static void smp_main(void)
+static int smp_main(void)
{
printf("smp main %d\n", smp_id());
while (1)
asm volatile ("hlt" : : : "memory");
+ return 0;
}
int main()
--
1.5.3.7
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel