]> xenbits.xensource.com Git - people/pauldu/qemu.git/commit
block-copy: add coroutine_fn annotations
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Mon, 28 Nov 2022 14:23:25 +0000 (09:23 -0500)
committerKevin Wolf <kwolf@redhat.com>
Thu, 15 Dec 2022 15:07:43 +0000 (16:07 +0100)
commit43a0d4f08b7a7bae90c0753db2b49441ef3e7f6e
tree18d99119aa9b681b1062e103168502ab6f120a3a
parent7b52a921c12c01be3b2ce331081dd9accea99948
block-copy: add coroutine_fn annotations

These functions end up calling bdrv_common_block_status_above(), a
generated_co_wrapper function.
In addition, they also happen to be always called in coroutine context,
meaning all callers are coroutine_fn.
This means that the g_c_w function will enter the qemu_in_coroutine()
case and eventually suspend (or in other words call qemu_coroutine_yield()).
Therefore we can mark such functions coroutine_fn too.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20221128142337.657646-3-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/block-copy.c
include/block/block-copy.h