03.05.2021 14:25, Paolo Bonzini wrote:
Allow using QemuCoSleep to sleep forever until woken by qemu_co_sleep_wake.
This makes the logic of qemu_co_sleep_ns_wakeable easy to understand.

In the future we could introduce an API that can work even if the
sleep and wake happen from different threads.  For now, initializing
w->to_wake after timer_mod is fine because the timer can only fire in
the same AioContext.

worth a comment inside qemu_co_sleep_ns_wakeable() ?


Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com>


--
Best regards,
Vladimir

Reply via email to