From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMft-0008VZ-Je for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTMfo-0005Of-V1 for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52412 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMfo-0005NZ-Ox for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:48 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 31 Oct 2012 01:59:54 +0100 Message-Id: <1351645206-3041-24-git-send-email-afaerber@suse.de> In-Reply-To: <1351645206-3041-1-git-send-email-afaerber@suse.de> References: <1351645206-3041-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 23/35] cpus: Pass CPUState to qemu_wait_io_event_common() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws CPUArchState is no longer needed there. Signed-off-by: Andreas F=C3=A4rber --- cpus.c | 12 +++++------- 1 Datei ge=C3=A4ndert, 5 Zeilen hinzugef=C3=BCgt(+), 7 Zeilen entfernt(-= ) diff --git a/cpus.c b/cpus.c index e40823c..6baf2bc 100644 --- a/cpus.c +++ b/cpus.c @@ -687,10 +687,8 @@ static void flush_queued_work(CPUState *cpu) qemu_cond_broadcast(&qemu_work_cond); } =20 -static void qemu_wait_io_event_common(CPUArchState *env) +static void qemu_wait_io_event_common(CPUState *cpu) { - CPUState *cpu =3D ENV_GET_CPU(env); - if (cpu->stop) { cpu->stop =3D false; cpu->stopped =3D true; @@ -716,7 +714,7 @@ static void qemu_tcg_wait_io_event(void) } =20 for (env =3D first_cpu; env !=3D NULL; env =3D env->next_cpu) { - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(ENV_GET_CPU(env)); } } =20 @@ -729,7 +727,7 @@ static void qemu_kvm_wait_io_event(CPUArchState *env) } =20 qemu_kvm_eat_signals(env); - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(cpu); } =20 static void *qemu_kvm_cpu_thread_fn(void *arg) @@ -804,7 +802,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg) } qemu_mutex_lock_iothread(); cpu_single_env =3D env; - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(cpu); } =20 return NULL; @@ -836,7 +834,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) =20 /* process any pending work */ for (env =3D first_cpu; env !=3D NULL; env =3D env->next_cpu) { - qemu_wait_io_event_common(env); + qemu_wait_io_event_common(ENV_GET_CPU(env)); } } =20 --=20 1.7.10.4