Emilio G. Cota <c...@braap.org> writes:
> Signed-off-by: Emilio G. Cota <c...@braap.org> > --- <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