aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Fedorov <serge.fdrv@gmail.com>2016-08-02 18:27:39 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-09-27 11:57:29 +0200
commit178f94297a23e68183ce08bb841cf5d209208b03 (patch)
tree568353455e7620202e4cff6334742c5593885b3a
parent959f593c0e010cc0ee2e47e7f45e66c0695683b7 (diff)
downloadqemu-arm-178f94297a23e68183ce08bb841cf5d209208b03.tar.gz
linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick()
Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <1470158864-17651-9-git-send-email-alex.bennee@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--linux-user/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 7a056fcfd6..6e14010229 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) {