Received: from eggs.gnu.org ([2001:4830:134:3::10]:41309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfP79-0006tQ-P7 for qemu-devel@nongnu.org; Thu, 01 Sep 2016 06:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfP77-0003T4-S8 for qemu-devel@nongnu.org; Thu, 01 Sep 2016 06:20:54 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:33395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfP77-0003Sk-La for qemu-devel@nongnu.org; Thu, 01 Sep 2016 06:20:53 -0400 Received: by mail-wm0-x243.google.com with SMTP id w207so7697392wmw.0 for ; Thu, 01 Sep 2016 03:20:53 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 1 Sep 2016 12:20:20 +0200 Message-Id: <1472725227-10374-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1472725227-10374-1-git-send-email-pbonzini@redhat.com> References: <1472725227-10374-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/12] 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 , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Sergey Fedorov , "Emilio G. Cota" 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 12a5475..6195c68 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3788,6 +3788,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