From 6700dfb1b8c2828aa0c851136892c4774de87c95 Mon Sep 17 00:00:00 2001 From: Emanuele Giuseppe Esposito Date: Mon, 28 Nov 2022 09:23:35 -0500 Subject: block-coroutine-wrapper.py: support also basic return types Extend the regex to cover also return type, pointers included. This implies that the value returned by the function cannot be a simple "int" anymore, but the custom return type. Therefore remove poll_state->ret and instead use a per-function custom "ret" field. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20221128142337.657646-13-eesposit@redhat.com> Signed-off-by: Kevin Wolf --- block/block-gen.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'block/block-gen.h') diff --git a/block/block-gen.h b/block/block-gen.h index 08d977f493..89b7daaa1f 100644 --- a/block/block-gen.h +++ b/block/block-gen.h @@ -32,18 +32,15 @@ typedef struct BdrvPollCo { AioContext *ctx; bool in_progress; - int ret; Coroutine *co; /* Keep pointer here for debugging */ } BdrvPollCo; -static inline int bdrv_poll_co(BdrvPollCo *s) +static inline void bdrv_poll_co(BdrvPollCo *s) { assert(!qemu_in_coroutine()); aio_co_enter(s->ctx, s->co); AIO_WAIT_WHILE(s->ctx, s->in_progress); - - return s->ret; } #endif /* BLOCK_BLOCK_GEN_H */ -- cgit v1.2.3