On Wed, May 31, 2017 at 3:22 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 31/05/2017 15:06, Stefan Hajnoczi wrote: >>> + >>> + while ((next = QSIMPLEQ_FIRST(&tmp_queue_wakeup))) { >>> + QSIMPLEQ_REMOVE_HEAD(&tmp_queue_wakeup, co_queue_next); >>> qemu_coroutine_enter(next); >>> } >>> } >> What happens if co remains alive and qemu_coroutine_enter(next) causes >> additional coroutines to add themselves to co->co_queue_wakeup? > > Wouldn't that happen only if co is entered again? Then it will also > reenter qemu_co_queue_run_restart, which may cause a different wakeup > order but not any missing wakeups.
Exactly, that what I tried to show with stupid arrows in another mail. I am not sure that I've succeeded :) -- Roman