all: Update reserved function names
Update reserved function names starting with one underscore, replacing
them as follows:
'_k_' with 'z_'
'_K_' with 'Z_'
'_handler_' with 'z_handl_'
'_Cstart' with 'z_cstart'
'_Swap' with 'z_swap'
This renaming is done on both global and those static function names
in kernel/include and include/. Other static function names in kernel/
are renamed by removing the leading underscore. Other function names
not starting with any prefix listed above are renamed starting with
a 'z_' or 'Z_' prefix.
Function names starting with two or three leading underscores are not
automatcally renamed since these names will collide with the variants
with two or three leading underscores.
Various generator scripts have also been updated as well as perf,
linker and usb files. These are
drivers/serial/uart_handlers.c
include/linker/kobject-text.ld
kernel/include/syscall_handler.h
scripts/gen_kobject_list.py
scripts/gen_syscall_header.py
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
diff --git a/scripts/gen_syscall_header.py b/scripts/gen_syscall_header.py
index cab36cd..fbf0176 100755
--- a/scripts/gen_syscall_header.py
+++ b/scripts/gen_syscall_header.py
@@ -70,15 +70,17 @@
# from gc-sections; these references will not consume space.
sys.stdout.write(
- "static _GENERIC_SECTION(hndlr_ref) __used void *href = (void *)&hdlr_##name; \\\n")
+ "static Z_GENERIC_SECTION(hndlr_ref) __used void *href = (void *)&hdlr_##name; \\\n")
tabs(tabcount)
if (ret != Retval.VOID):
sys.stdout.write("return (ret)")
else:
sys.stdout.write("return (void)")
if (argc <= 6 and ret != Retval.U64):
- sys.stdout.write("_arch")
- sys.stdout.write("_syscall%s_invoke%d(" %
+ sys.stdout.write("z_arch_syscall%s_invoke%d(" %
+ (("_ret64" if ret == Retval.U64 else ""), argc))
+ else:
+ sys.stdout.write("z_syscall%s_invoke%d(" %
(("_ret64" if ret == Retval.U64 else ""), argc))
for i in range(argc):
sys.stdout.write("(u32_t)p%d, " % (i))
@@ -88,7 +90,7 @@
def gen_call_impl(ret, argc):
if (ret != Retval.VOID):
sys.stdout.write("return ")
- sys.stdout.write("_impl_##name(")
+ sys.stdout.write("z_impl_##name(")
for i in range(argc):
sys.stdout.write("p%d" % (i))
if i != (argc - 1):
@@ -106,7 +108,7 @@
newline()
if not user_only:
- gen_fn(ret, argc, "_impl_##name", extern=True)
+ gen_fn(ret, argc, "z_impl_##name", extern=True)
sys.stdout.write(";")
newline()