[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 23/24] Refactor kvm&tcg function names in cpus.c
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH v2 23/24] Refactor kvm&tcg function names in cpus.c |
Date: |
Tue, 1 Feb 2011 22:16:03 +0100 |
From: Jan Kiszka <address@hidden>
Pure interface cosmetics: Ensure that only kvm core services (as
declared in kvm.h) start with "kvm_". Prepend "qemu_" to those that
violate this rule in cpus.c. Also rename the corresponding tcg functions
for the sake of consistency.
Signed-off-by: Jan Kiszka <address@hidden>
---
cpus.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/cpus.c b/cpus.c
index 9c50a34..0d11a20 100644
--- a/cpus.c
+++ b/cpus.c
@@ -778,7 +778,7 @@ static void qemu_kvm_wait_io_event(CPUState *env)
static int qemu_cpu_exec(CPUState *env);
-static void *kvm_cpu_thread_fn(void *arg)
+static void *qemu_kvm_cpu_thread_fn(void *arg)
{
CPUState *env = arg;
int r;
@@ -811,7 +811,7 @@ static void *kvm_cpu_thread_fn(void *arg)
return NULL;
}
-static void *tcg_cpu_thread_fn(void *arg)
+static void *qemu_tcg_cpu_thread_fn(void *arg)
{
CPUState *env = arg;
@@ -930,7 +930,7 @@ void resume_all_vcpus(void)
}
}
-static void tcg_init_vcpu(void *_env)
+static void qemu_tcg_init_vcpu(void *_env)
{
CPUState *env = _env;
/* share a single thread for all cpus with TCG */
@@ -938,7 +938,7 @@ static void tcg_init_vcpu(void *_env)
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
- qemu_thread_create(env->thread, tcg_cpu_thread_fn, env);
+ qemu_thread_create(env->thread, qemu_tcg_cpu_thread_fn, env);
while (env->created == 0)
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
tcg_cpu_thread = env->thread;
@@ -949,12 +949,12 @@ static void tcg_init_vcpu(void *_env)
}
}
-static void kvm_start_vcpu(CPUState *env)
+static void qemu_kvm_start_vcpu(CPUState *env)
{
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
- qemu_thread_create(env->thread, kvm_cpu_thread_fn, env);
+ qemu_thread_create(env->thread, qemu_kvm_cpu_thread_fn, env);
while (env->created == 0)
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
}
@@ -966,9 +966,9 @@ void qemu_init_vcpu(void *_env)
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
if (kvm_enabled())
- kvm_start_vcpu(env);
+ qemu_kvm_start_vcpu(env);
else
- tcg_init_vcpu(env);
+ qemu_tcg_init_vcpu(env);
}
void qemu_notify_event(void)
--
1.7.1
- [Qemu-devel] [PATCH v2 00/24] [uq/master] Patch queue, part II, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 11/24] kvm: Provide sigbus services arch-independently, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 04/24] Process vmstop requests in IO thread, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 23/24] Refactor kvm&tcg function names in cpus.c,
Jan Kiszka <=
- [Qemu-devel] [PATCH v2 17/24] kvm: Fix race between timer signals and vcpu entry under !IOTHREAD, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 18/24] kvm: Add MCE signal support for !CONFIG_IOTHREAD, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 01/24] kvm: x86: Fix build in absence of KVM_CAP_ASYNC_PF, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 21/24] kvm: Remove static return code of kvm_handle_io, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 22/24] kvm: Leave kvm_cpu_exec directly after KVM_EXIT_SHUTDOWN, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 07/24] Flatten the main loop, Jan Kiszka, 2011/02/01
- [Qemu-devel] [PATCH v2 13/24] kvm: Set up signal mask also for !CONFIG_IOTHREAD, Jan Kiszka, 2011/02/01