Re: [PATCH v6 4/7] scripts: add coroutine-wrapper.py

2020-06-09 Thread Vladimir Sementsov-Ogievskiy
10.06.2020 00:21, Eric Blake wrote: On 6/9/20 9:13 AM, Vladimir Sementsov-Ogievskiy wrote: We have a very frequent pattern of creating coroutine from function with several arguments:    - create structure to pack parameters    - create _entry function to call original function taking parameters

Re: [PATCH v6 4/7] scripts: add coroutine-wrapper.py

2020-06-09 Thread Eric Blake
On 6/9/20 9:13 AM, Vladimir Sementsov-Ogievskiy wrote: We have a very frequent pattern of creating coroutine from function with several arguments: - create structure to pack parameters - create _entry function to call original function taking parameters from struct - do different m

[PATCH v6 4/7] scripts: add coroutine-wrapper.py

2020-06-09 Thread Vladimir Sementsov-Ogievskiy
We have a very frequent pattern of creating coroutine from function with several arguments: - create 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 EINPROG