From patchwork Fri Oct 12 01:26:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 191038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2C7D92C0089 for ; Fri, 12 Oct 2012 12:40:41 +1100 (EST) Received: from localhost ([::1]:48633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMU2M-0003Ty-Jy for incoming@patchwork.ozlabs.org; Thu, 11 Oct 2012 21:27:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMU1k-0001f7-Lb for qemu-devel@nongnu.org; Thu, 11 Oct 2012 21:27:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMU1j-0005Rf-Lq for qemu-devel@nongnu.org; Thu, 11 Oct 2012 21:27:00 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52722 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMU1j-0005RZ-GD for qemu-devel@nongnu.org; Thu, 11 Oct 2012 21:26:59 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 15E92A2BD5 for ; Fri, 12 Oct 2012 03:26:59 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Fri, 12 Oct 2012 03:26:41 +0200 Message-Id: <1350005203-15405-6-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350005203-15405-1-git-send-email-afaerber@suse.de> References: <1350005203-15405-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH qom-cpu v2 5/7] cpus: Pass CPUState to qemu_cpu_kick_thread() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org CPUArchState is no longer needed there. Signed-off-by: Andreas Färber Reviewed-by: Igor Mammedov --- cpus.c | 9 ++++----- 1 Datei geändert, 4 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-) diff --git a/cpus.c b/cpus.c index 849ea8a..54b765e 100644 --- a/cpus.c +++ b/cpus.c @@ -844,9 +844,8 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) return NULL; } -static void qemu_cpu_kick_thread(CPUArchState *env) +static void qemu_cpu_kick_thread(CPUState *cpu) { - CPUState *cpu = ENV_GET_CPU(env); #ifndef _WIN32 int err; @@ -871,7 +870,7 @@ void qemu_cpu_kick(void *_env) qemu_cond_broadcast(env->halt_cond); if (!tcg_enabled() && !cpu->thread_kicked) { - qemu_cpu_kick_thread(env); + qemu_cpu_kick_thread(cpu); cpu->thread_kicked = true; } } @@ -883,7 +882,7 @@ void qemu_cpu_kick_self(void) CPUState *cpu_single_cpu = ENV_GET_CPU(cpu_single_env); if (!cpu_single_cpu->thread_kicked) { - qemu_cpu_kick_thread(cpu_single_env); + qemu_cpu_kick_thread(cpu_single_cpu); cpu_single_cpu->thread_kicked = true; } #else @@ -903,7 +902,7 @@ void qemu_mutex_lock_iothread(void) } else { iothread_requesting_mutex = true; if (qemu_mutex_trylock(&qemu_global_mutex)) { - qemu_cpu_kick_thread(first_cpu); + qemu_cpu_kick_thread(ENV_GET_CPU(first_cpu)); qemu_mutex_lock(&qemu_global_mutex); } iothread_requesting_mutex = false;