Message ID | 20200610100336.23451-1-vsementsov@virtuozzo.com |
---|---|
Headers | show |
Series | coroutines: generate wrapper code | expand |
On Wed, Jun 10, 2020 at 01:03:29PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 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 Please add documentation so others know when and how to use this. I suggest adding a docs/devel/coroutine-wrapper.rst document and adding a code comment to #define generated_co_wrapper pointing to the documentation. Please rename coroutine-wrapper.py to block-coroutine-wrapper.py since it is specific to the block layer. Stefan
27.07.2020 15:48, Stefan Hajnoczi wrote: > On Wed, Jun 10, 2020 at 01:03:29PM +0300, Vladimir Sementsov-Ogievskiy wrote: >> 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 > > Please add documentation so others know when and how to use this. > > I suggest adding a docs/devel/coroutine-wrapper.rst document and adding > a code comment to #define generated_co_wrapper pointing to the > documentation. > > Please rename coroutine-wrapper.py to block-coroutine-wrapper.py since > it is specific to the block layer. > OK, will do. Thanks for taking a look!
On 7/27/20 7:59 AM, Vladimir Sementsov-Ogievskiy wrote: > 27.07.2020 15:48, Stefan Hajnoczi wrote: >> On Wed, Jun 10, 2020 at 01:03:29PM +0300, Vladimir Sementsov-Ogievskiy >> wrote: >>> 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 >> >> Please add documentation so others know when and how to use this. >> >> I suggest adding a docs/devel/coroutine-wrapper.rst document and adding >> a code comment to #define generated_co_wrapper pointing to the >> documentation. >> >> Please rename coroutine-wrapper.py to block-coroutine-wrapper.py since >> it is specific to the block layer. >> > > OK, will do. Thanks for taking a look! As this series touched Makefile to add a generated .c, you'll also need to rebase that part to apply on top of Paolo's meson conversion (cc'ing him if you need help figuring it out)
On 20/08/20 03:33, Eric Blake wrote: >>> >> >> OK, will do. Thanks for taking a look! > > As this series touched Makefile to add a generated .c, you'll also need > to rebase that part to apply on top of Paolo's meson conversion (cc'ing > him if you need help figuring it out) It should be trivial to do so using custom_target. Paolo