|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [PATCH 6/6] coroutine-sleep: introduce qemu_co_sleep |
Date: | Mon, 10 May 2021 13:46:53 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
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 <pbonzini@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> -- Best regards, Vladimir
[Prev in Thread] | Current Thread | [Next in Thread] |