From patchwork Mon Feb 7 11:19:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 82244 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 16D08B7043 for ; Tue, 8 Feb 2011 10:47:46 +1100 (EST) Received: from localhost ([127.0.0.1]:40073 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmPAJ-0006vp-F9 for incoming@patchwork.ozlabs.org; Mon, 07 Feb 2011 06:21:55 -0500 Received: from [140.186.70.92] (port=45781 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmP82-0006q5-Ix for qemu-devel@nongnu.org; Mon, 07 Feb 2011 06:19:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmP7y-0007x8-9b for qemu-devel@nongnu.org; Mon, 07 Feb 2011 06:19:34 -0500 Received: from thoth.sbs.de ([192.35.17.2]:17919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmP7x-0007vK-NW for qemu-devel@nongnu.org; Mon, 07 Feb 2011 06:19:30 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p17BJRKi011425; Mon, 7 Feb 2011 12:19:27 +0100 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p17BJQKI027537; Mon, 7 Feb 2011 12:19:27 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Mon, 7 Feb 2011 12:19:12 +0100 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.2 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 01/15] Refactor kvm&tcg function names in cpus.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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 6a85dc8..d54ec7d 100644 --- a/cpus.c +++ b/cpus.c @@ -774,7 +774,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; @@ -807,7 +807,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; @@ -926,7 +926,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 */ @@ -934,7 +934,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; @@ -945,12 +945,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); } @@ -962,9 +962,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)