From b7680cb6078bd7294a3dd86473d3f2fdee991dd0 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 12 Mar 2011 17:43:51 +0100 Subject: Refactor thread retrieval and check We have qemu_cpu_self and qemu_thread_self. The latter is retrieving the current thread, the former is checking for equality (using CPUState). We also have qemu_thread_equal which is only used like qemu_cpu_self. This refactors the interfaces, creating qemu_cpu_is_self and qemu_thread_is_self as well ass qemu_thread_get_self. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini Signed-off-by: Blue Swirl --- target-i386/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target-i386') diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 0aa0a410da..1f12cbf19e 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1355,7 +1355,7 @@ int kvm_arch_put_registers(CPUState *env, int level) { int ret; - assert(cpu_is_stopped(env) || qemu_cpu_self(env)); + assert(cpu_is_stopped(env) || qemu_cpu_is_self(env)); ret = kvm_getput_regs(env, 1); if (ret < 0) { @@ -1403,7 +1403,7 @@ int kvm_arch_get_registers(CPUState *env) { int ret; - assert(cpu_is_stopped(env) || qemu_cpu_self(env)); + assert(cpu_is_stopped(env) || qemu_cpu_is_self(env)); ret = kvm_getput_regs(env, 0); if (ret < 0) { -- cgit v1.2.3