]> git.proxmox.com Git - mirror_qemu.git/commit - block/block-copy.c
coroutine-sleep: replace QemuCoSleepState pointer with struct in the API
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 May 2021 10:05:47 +0000 (12:05 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 21 May 2021 17:22:33 +0000 (18:22 +0100)
commit29a6ea24eb85d8400df1607a9e11d0ef9ec5e88d
tree86dbfa59f1ceb9324ee7937f457ac906e6b81069
parent1485f0c24cfbef7a542ce13d49e9f68e285c57d8
coroutine-sleep: replace QemuCoSleepState pointer with struct in the API

Right now, users of qemu_co_sleep_ns_wakeable are simply passing
a pointer to QemuCoSleepState by reference to the function.  But
QemuCoSleepState really is just a Coroutine*; making the
content of the struct public is just as efficient and lets us
skip the user_state_pointer indirection.

Since the usage is changed, take the occasion to rename the
struct to QemuCoSleep.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20210517100548.28806-6-pbonzini@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/block-copy.c
block/nbd.c
include/qemu/coroutine.h
util/qemu-coroutine-sleep.c