Skip to content

coroutines: generate wrapper code

Vladimir Sementsov-Ogievskiy qemu-devel 7 versions – Applied

Status from this message: Thanks, applied to my block tree with the encoding='utf-8' and

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest7 patches 6 repliesApplied
  2. v87 patches 26 repliesSuperseded
  3. v77 patches 5 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v67 patches4 repliesSuperseded
v57 patches3 repliesSuperseded
v45 patches9 repliesSuperseded
v33 patches3 repliesSuperseded

Patches in v9 Applied

#Subject and filesSizeRepliesApplied
1/7block: return error-code from bdrv_invalidate_cacheblock.c include/block/block.h+19 -150 replies
2/7block/io: refactor coroutine wrappersblock/io.c+32 -280 replies
3/7block: declare some coroutine functions in block/coroutines.hblock.c block/coroutines.h block/io.c+88 -210 replies
4/7scripts: add block-coroutine-wrapper.pyblock/block-gen.h block/meson.build docs/devel/block-coroutine-wrapper.rst +3 more+310 -02 replies
5/7block: generate coroutine-wrapper codeblock.c block/coroutines.h block/io.c +1 more+13 -2940 replies
6/7block: drop bdrv_prwvblock/coroutines.h block/io.c include/block/block.h +1 more+15 -480 replies
7/7block/io: refactor save/load vmstateblock/coroutines.h block/io.c include/block/block.h+43 -410 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric BlakePhilippe Mathieu-DaudéStefan Hajnoczi
SeriesR-b
1/7R-b R-b R-b
2/7R-b R-b R-b
3/7R-b R-b R-b
4/7R-b
5/7R-b R-b
6/7R-b R-b R-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v9 thread

Cover letter [PATCH v9 0/7] coroutines: generate wrapper code

Hi all!

The aim of the series is to reduce code-duplication and writing parameters structure-packing by hand around coroutine function wrappers.

Benefits:
- no code duplication
- less indirection

v9: Thanks to Eric, I used commit message tweaks and rebase-conflict solving from his git. 01: add Philippe's, Stefan's r-bs
02: - add Philippe's, Stefan's r-bs
- commit message tweaks stolen from Eric's git :)
03: add Philippe's, Stefan's r-bs
04: - wording/grammar by Eric (partly, stolen from repo)
- ref new file in docs/devel/index.rst
- use 644 rights and recommended header for python script
- call gen_header() once
- rename gen_wrappers_file to gen_wrappers
05: add Stefan's r-b
06: add Philippe's, Stefan's r-bs
07: Stefan's r-b

Vladimir Sementsov-Ogievskiy (7):
block: return error-code from bdrv_invalidate_cache block/io: refactor coroutine wrappers
block: declare some coroutine functions in block/coroutines.h
scripts: add block-coroutine-wrapper.py
block: generate coroutine-wrapper code
block: drop bdrv_prwv
block/io: refactor save/load vmstate

 docs/devel/block-coroutine-wrapper.rst |  54 ++++
 docs/devel/index.rst                   |   1 +
 block/block-gen.h                      |  49 ++++
 block/coroutines.h                     |  65 +++++
 include/block/block.h                  |  34 ++-
 block.c                                |  97 +------
 block/io.c                             | 337 ++++---------------------
 tests/test-bdrv-drain.c                |   2 +-
 block/meson.build                      |   8 +
 scripts/block-coroutine-wrapper.py     | 188 ++++++++++++++
 10 files changed, 454 insertions(+), 381 deletions(-)
 create mode 100644 docs/devel/block-coroutine-wrapper.rst
 create mode 100644 block/block-gen.h
 create mode 100644 block/coroutines.h
 create mode 100644 scripts/block-coroutine-wrapper.py
Signature · 1 line
2.21.3