[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] do proper cpu_self check
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] do proper cpu_self check |
Date: |
Mon, 28 Sep 2009 22:58:34 +0400 (MSD) |
On Mon, 28 Sep 2009, Glauber Costa wrote:
> From: Glauber Costa <address@hidden>
>
> Currently, our check for qemu_cpu_self only checks if there is a cpu
> currently in execution (represented by cpu_single_env being set). While
> this might be okay for tcg, it is certainly not okay for kvm, since multiple
> cpus might be executing.
>
> Instead, I propose we use pthread primitives to test if the caller thread is
> the same as env->thread.
>
> For tcg, it will have the same semantics as before, since all CPUStates will
> point to the same thread, and we'll only have one in execution at a time.
>
> Signed-off-by: Glauber Costa <address@hidden>
Nice signoff
[..snip..]
--
mailto:address@hidden