Paolo Bonzini 0a6f0c76a0 coroutine-sleep: introduce qemu_co_sleep
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 will 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.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20210517100548.28806-7-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2021-05-21 18:22:33 +01:00
..
2020-11-03 09:42:52 -05:00
2020-12-10 12:15:18 -05:00
2020-10-15 16:06:27 +02:00
2021-02-18 07:48:22 -08:00
2021-05-11 04:11:14 -04:00
2020-12-10 17:16:44 +01:00
2021-05-04 14:15:35 +02:00
2021-04-30 12:27:47 +02:00
2021-04-01 15:27:44 +04:00