From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH 21/22] Refactor kvm&tcg function names in cpus.c Date: Thu, 27 Jan 2011 14:10:05 +0100 Message-ID: References: Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org To: Avi Kivity , Marcelo Tosatti Return-path: Received: from david.siemens.de ([192.35.17.14]:19780 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753006Ab1A0NK1 (ORCPT ); Thu, 27 Jan 2011 08:10:27 -0500 In-Reply-To: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org List-ID: 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 --- cpus.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 88bed4e..559ec55 100644 --- a/cpus.c +++ b/cpus.c @@ -751,7 +751,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; @@ -784,7 +784,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; @@ -903,7 +903,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 */ @@ -911,7 +911,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; @@ -922,12 +922,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); } @@ -939,9 +939,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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49383 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiRc9-0001Rw-Db for qemu-devel@nongnu.org; Thu, 27 Jan 2011 08:10:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiRc7-0000km-3i for qemu-devel@nongnu.org; Thu, 27 Jan 2011 08:10:17 -0500 Received: from david.siemens.de ([192.35.17.14]:19688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiRc6-0000j1-7W for qemu-devel@nongnu.org; Thu, 27 Jan 2011 08:10:14 -0500 From: Jan Kiszka Date: Thu, 27 Jan 2011 14:10:05 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 21/22] Refactor kvm&tcg function names in cpus.c List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity , Marcelo Tosatti Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org 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 --- cpus.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index 88bed4e..559ec55 100644 --- a/cpus.c +++ b/cpus.c @@ -751,7 +751,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; @@ -784,7 +784,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; @@ -903,7 +903,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 */ @@ -911,7 +911,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; @@ -922,12 +922,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); } @@ -939,9 +939,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