From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNiEK-0003ZG-G7 for qemu-devel@nongnu.org; Thu, 14 Jul 2016 11:07:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNiEG-0005cV-3l for qemu-devel@nongnu.org; Thu, 14 Jul 2016 11:07:11 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:34919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNiEF-0005c3-T8 for qemu-devel@nongnu.org; Thu, 14 Jul 2016 11:07:08 -0400 Received: by mail-wm0-x231.google.com with SMTP id f65so69738683wmi.0 for ; Thu, 14 Jul 2016 08:07:07 -0700 (PDT) References: <1467839703-11733-1-git-send-email-sergey.fedorov@linaro.org> <1467839703-11733-9-git-send-email-sergey.fedorov@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1467839703-11733-9-git-send-email-sergey.fedorov@linaro.org> Date: Thu, 14 Jul 2016 16:07:09 +0100 Message-ID: <87d1mg45sy.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC v2 08/11] linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov Cc: qemu-devel@nongnu.org, MTTCG Devel , KONRAD =?utf-8?B?RnLDqWTDqXJpYw==?= , Alvise Rigo , "Emilio G. Cota" , Paolo Bonzini , Richard Henderson , Peter Maydell , Sergey Fedorov , Riku Voipio Sergey Fedorov writes: > From: Sergey Fedorov > > Signed-off-by: Sergey Fedorov > Signed-off-by: Sergey Fedorov > --- > linux-user/main.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) Reviewed-by: Alex Bennée > > diff --git a/linux-user/main.c b/linux-user/main.c > index 5ff0b20bad89..a8790ac63f68 100644 > --- a/linux-user/main.c > +++ b/linux-user/main.c > @@ -3785,6 +3785,16 @@ void cpu_loop(CPUTLGState *env) > > THREAD CPUState *thread_cpu; > > +bool qemu_cpu_is_self(CPUState *cpu) > +{ > + return thread_cpu == cpu; > +} > + > +void qemu_cpu_kick(CPUState *cpu) > +{ > + cpu_exit(cpu); > +} > + > void task_settid(TaskState *ts) > { > if (ts->ts_tid == 0) { -- Alex Bennée