Hi all! After a long delay (~year) here is a v3.
The aim of the series is to reduce code-duplication and writing parameters structure-packing by hand around coroutine function wrappers. It's an alternative to "[PATCH v3] block: Factor out bdrv_run_co()" patch. Benefits: - no code duplication - less indirection Vladimir Sementsov-Ogievskiy (3): block/io: refactor coroutine wrappers block: declare some coroutine functions in block/coroutines.h block: generate coroutine-wrapper code Makefile | 6 + block/block-gen.h | 30 +++ block/coroutines.h | 44 ++++ include/block/block.h | 17 +- include/block/generated-co-wrapper.h | 11 + block.c | 78 +------ block/io.c | 295 ++------------------------- block/Makefile.objs | 1 + scripts/coroutine-wrapper.py | 169 +++++++++++++++ 9 files changed, 296 insertions(+), 355 deletions(-) create mode 100644 block/block-gen.h create mode 100644 block/coroutines.h create mode 100644 include/block/generated-co-wrapper.h create mode 100755 scripts/coroutine-wrapper.py -- 2.21.0