block: rename generated_co_wrapper in co_wrapper_mixed

In preparation to the incoming new function specifiers,
rename g_c_w with a more meaningful name and document it.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20221128142337.657646-10-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Emanuele Giuseppe Esposito 2022-11-28 09:23:32 -05:00 committed by Kevin Wolf
parent 2475a0d0f4
commit 1bd542016c
6 changed files with 71 additions and 68 deletions

View file

@ -2,7 +2,7 @@
"""Generate coroutine wrappers for block subsystem.
The program parses one or several concatenated c files from stdin,
searches for functions with the 'generated_co_wrapper' specifier
searches for functions with the 'co_wrapper_mixed' specifier
and generates corresponding wrappers on stdout.
Usage: block-coroutine-wrapper.py generated-file.c FILE.[ch]...
@ -74,8 +74,8 @@ class FuncDecl:
return '\n'.join(format.format_map(arg.__dict__) for arg in self.args)
# Match wrappers declared with a generated_co_wrapper mark
func_decl_re = re.compile(r'^int\s*generated_co_wrapper\s*'
# Match wrappers declared with a co_wrapper_mixed mark
func_decl_re = re.compile(r'^int\s*co_wrapper_mixed\s*'
r'(?P<wrapper_name>[a-z][a-z0-9_]*)'
r'\((?P<args>[^)]*)\);$', re.MULTILINE)