qemu-e2k/docs
Vladimir Sementsov-Ogievskiy aaaa20b69b scripts: add block-coroutine-wrapper.py
We have a very frequent pattern of creating a coroutine from a function
with several arguments:

  - create a structure to pack parameters
  - create _entry function to call original function taking parameters
    from struct
  - do different magic to handle completion: set ret to NOT_DONE or
    EINPROGRESS or use separate bool field
  - fill the struct and create coroutine from _entry function with this
    struct as a parameter
  - do coroutine enter and BDRV_POLL_WHILE loop

Let's reduce code duplication by generating coroutine wrappers.

This patch adds scripts/block-coroutine-wrapper.py together with some
friends, which will generate functions with declared prototypes marked
by the 'generated_co_wrapper' specifier.

The usage of new code generation is as follows:

    1. define the coroutine function somewhere

        int coroutine_fn bdrv_co_NAME(...) {...}

    2. declare in some header file

        int generated_co_wrapper bdrv_NAME(...);

       with same list of parameters (generated_co_wrapper is
       defined in "include/block/block.h").

    3. Make sure the block_gen_c declaration in block/meson.build
       mentions the file with your marker function.

Still, no function is now marked, this work is for the following
commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200924185414.28642-5-vsementsov@virtuozzo.com>
[Added encoding='utf-8' to open() calls as requested by Vladimir. Fixed
typo and grammar issues pointed out by Eric Blake. Removed clang-format
dependency that caused build test issues.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2020-10-05 10:59:06 +01:00
..
config
devel scripts: add block-coroutine-wrapper.py 2020-10-05 10:59:06 +01:00
interop docs/interop: Convert qemu-qmp-ref to rST 2020-09-29 17:55:39 +02:00
specs docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
sphinx docs/sphinx: Add new qapi-doc Sphinx extension 2020-09-29 17:55:39 +02:00
spin
system nbd: Deprecate nbd-server-add/remove 2020-10-02 15:46:40 +02:00
tools virtiofsd: document cache=auto default 2020-09-25 12:45:58 +01:00
user
amd-memory-encryption.txt docs: Fix broken links 2020-09-01 09:31:33 +02:00
barrier.txt
block-replication.txt
bootindex.txt
can.txt hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation. 2020-09-30 19:11:37 +02:00
ccid.txt
COLO-FT.txt docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
colo-proxy.txt
conf.py configure: Bump the minimum required Python version to 3.6 2020-10-02 12:29:23 +01:00
cpu-hotplug.rst
defs.rst.inc
generic-loader.txt
hyperv.txt i386/kvm: correct the meaning of '0xffffffff' value for hv-spinlocks 2020-09-18 13:49:54 -04:00
igd-assign.txt
image-fuzzer.txt
index.html.in docs/interop: Convert qemu-qmp-ref to rST 2020-09-29 17:55:39 +02:00
index.rst
memory-hotplug.txt
meson.build meson.build: Make manuals depend on source to Sphinx extensions 2020-09-29 17:55:39 +02:00
microvm.rst
multi-thread-compression.txt
multiseat.txt
nvdimm.txt
pci_expander_bridge.txt
pcie_pci_bridge.txt
pcie.txt
pr-manager.rst
pvrdma.txt docs: Fix broken links 2020-09-01 09:31:33 +02:00
qcow2-cache.txt qcow2: Document the Extended L2 Entries feature 2020-08-25 08:33:20 +02:00
qdev-device-use.txt docs/qdev-device-use: Don't suggest -drive and -net can do USB 2020-09-03 09:58:39 +02:00
qemu_logo.pdf
qemu-option-trace.rst.inc
qemupciserial.inf
rdma.txt docs/: fix some comment spelling errors 2020-09-17 20:37:13 +02:00
replay.txt
spice-port-fqdn.txt
throttle.txt docs: Document the throttle block filter 2020-10-02 15:46:40 +02:00
u2f.txt hw/usb: Add U2F device autoscan to passthru mode 2020-08-31 08:23:39 +02:00
usb2.txt
usb-storage.txt
virtio-balloon-stats.txt
virtio-net-failover.rst
virtio-pmem.rst
xbzrle.txt
xen-save-devices-state.txt