Lines Matching +full:- +full:- +full:with +full:- +full:coroutine
2 block-coroutine-wrapper
6 called in coroutine context. Such functions are normally marked by the
8 non-coroutine context; for this we need to start a coroutine, run the
9 needed function from it and wait for the coroutine to finish in a
10 BDRV_POLL_WHILE() loop. To run a coroutine we need a function with one
12 non-coroutine interface, we should define a structure to pack the
15 with same list of arguments as original one, which will pack the
16 parameters into a struct, create a coroutine, run it and wait in
24 ``bdrv_co_foo(<some args>)`` and need a non-coroutine interface for it,
29 ``block/coroutines.h``) with the ``co_wrapper`` mark,
32 .. code-block:: c
36 2. You need to feed this declaration to block-coroutine-wrapper script.
37 For this, add the .h (or .c) file with the declaration to the
41 You are done. During the build, coroutine wrappers will be generated in
42 ``<BUILD_DIR>/block/block-gen.c``.
47 1. The script location is ``scripts/block-coroutine-wrapper.py``.
53 3. The core API of generated coroutine wrappers is placed in
54 (not generated) ``block/block-gen.h``