[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 44/48] cpus: lockstep execution support
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [RFC 44/48] cpus: lockstep execution support |
Date: |
Wed, 14 Nov 2018 16:43:22 +0000 |
User-agent: |
mu4e 1.1.0; emacs 26.1.50 |
Emilio G. Cota <address@hidden> writes:
> Signed-off-by: Emilio G. Cota <address@hidden>
> ---
<snip>
>
> void cpu_interrupt(CPUState *cpu, int mask);
> diff --git a/cpus.c b/cpus.c
> index 3efe89354d..a446632a5c 100644
> --- a/cpus.c
> +++ b/cpus.c
<snip>
> +
> +static void cpu_lockstep_init(CPUState *cpu)
> +{
> + if (!lockstep_enabled) {
> + return;
> + }
> + qemu_mutex_lock(&lockstep_lock);
> + /*
> + * HACK: avoid racing with a wakeup, which would miss the addition
> + * of this CPU; just wait until no wakeup is ongoing.
> + */
> + while (unlikely(lockstep_ongoing_wakeup)) {
> + qemu_mutex_unlock(&lockstep_lock);
> + sched_yield();
This breaks Windows builds. I suspect if we do want to this sort of
functionality we'll need to expose a utility function in
oslib-posix/oslib-win32
--
Alex Bennée
- Re: [Qemu-devel] [RFC 44/48] cpus: lockstep execution support,
Alex Bennée <=