From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF4X3-00032s-Cx for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF4Wt-0006fb-EV for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:48:41 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36090 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF4Wt-0006fP-8C for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:48:31 -0400 Message-ID: <505C7E3B.3060004@suse.de> Date: Fri, 21 Sep 2012 16:48:27 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1348217255-22441-1-git-send-email-quintela@redhat.com> <1348217255-22441-42-git-send-email-quintela@redhat.com> <505C638F.7050306@redhat.com> In-Reply-To: <505C638F.7050306@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 41/41] cpus: create qemu_cpu_is_vcpu() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Juan Quintela Am 21.09.2012 14:54, schrieb Paolo Bonzini: > Il 21/09/2012 10:47, Juan Quintela ha scritto: >> Old code used !io_thread to know if a thread was an vcpu or not. That >> fails when we introduce the iothread. >> >> Signed-off-by: Juan Quintela >> --- >> cpus.c | 9 +++++++-- >> 1 file changed, 7 insertions(+), 2 deletions(-) >> >> diff --git a/cpus.c b/cpus.c >> index e476a3c..1b7061a 100644 >> --- a/cpus.c >> +++ b/cpus.c >> @@ -902,6 +902,11 @@ int qemu_cpu_is_self(void *_env) >> return qemu_thread_is_self(cpu->thread); >> } >> >> +static bool qemu_cpu_is_vcpu(void) >> +{ >> + return cpu_single_env && qemu_cpu_is_self(&cpu_single_env); >=20 > Should be "cpu_single_env && qemu_cpu_is_self(&cpu_single_env)". "cpu_single_env && qemu_cpu_is_self(cpu_single_env)" maybe? > Please named the function qemu_in_vcpu_thread. Seconded, it does not take a CPU argument. Thanks, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg