From: Sergey Fedorov Date: Tue, 2 Aug 2016 17:27:39 +0000 (+0100) Subject: linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=178f94297a23e68183ce08bb841cf5d209208b03;p=qemu.git linux-user: Add qemu_cpu_is_self() and qemu_cpu_kick() 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> Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- 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) {