Received: from eggs.gnu.org ([2001:4830:134:3::10]:35736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjPBq-0002CO-25 for qemu-devel@nongnu.org; Mon, 12 Sep 2016 07:14:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjPBn-0007kJ-Bg for qemu-devel@nongnu.org; Mon, 12 Sep 2016 07:14:16 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjPBn-0007d7-5s for qemu-devel@nongnu.org; Mon, 12 Sep 2016 07:14:15 -0400 Received: by mail-wm0-f68.google.com with SMTP id g141so2088150wmd.1 for ; Mon, 12 Sep 2016 04:13:53 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 12 Sep 2016 13:12:30 +0200 Message-Id: <1473678761-8885-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1473678761-8885-1-git-send-email-pbonzini@redhat.com> References: <1473678761-8885-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 05/16] linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: sergey.fedorov@linaro.org, alex.bennee@linaro.org, Sergey Fedorov From: Sergey Fedorov Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <1470158864-17651-9-git-send-email-alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini --- linux-user/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index a3af553..0f24d57 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3777,6 +3777,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) { -- 2.7.4