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
..
2021-05-11 04:11:14 -04:00
2021-04-30 12:27:47 +02:00
2021-05-10 13:55:28 +02:00
2020-12-10 17:16:44 +01:00
2020-09-22 15:42:23 +01:00
2021-05-06 18:56:17 +01:00
2021-04-30 12:27:47 +02:00
2021-04-01 15:27:44 +04:00