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>
This commit is contained in:
Patrik Flykt 2019-03-08 14:19:05 -07:00 committed by Anas Nashif
commit 4344e27c26
324 changed files with 2264 additions and 2263 deletions

View file

@ -120,7 +120,7 @@ typedef u32_t (*_k_syscall_handler_t)(u32_t arg1, u32_t arg2, u32_t arg3,
*
* @return true if the CPU is currently running with user permissions
*/
static inline bool _arch_is_user_context(void);
static inline bool z_arch_is_user_context(void);
/**
* Indicate whether the CPU is currently in user mode
@ -129,7 +129,7 @@ static inline bool _arch_is_user_context(void);
*/
static inline bool _is_user_context(void)
{
return _arch_is_user_context();
return z_arch_is_user_context();
}
/*
@ -166,28 +166,28 @@ struct _syscall_10_args {
* Interfaces for invoking system calls
*/
static inline u32_t _arch_syscall_invoke0(u32_t call_id);
static inline u32_t z_arch_syscall_invoke0(u32_t call_id);
static inline u32_t _arch_syscall_invoke1(u32_t arg1, u32_t call_id);
static inline u32_t z_arch_syscall_invoke1(u32_t arg1, u32_t call_id);
static inline u32_t _arch_syscall_invoke2(u32_t arg1, u32_t arg2,
static inline u32_t z_arch_syscall_invoke2(u32_t arg1, u32_t arg2,
u32_t call_id);
static inline u32_t _arch_syscall_invoke3(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_arch_syscall_invoke3(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t call_id);
static inline u32_t _arch_syscall_invoke4(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_arch_syscall_invoke4(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t call_id);
static inline u32_t _arch_syscall_invoke5(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_arch_syscall_invoke5(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5,
u32_t call_id);
static inline u32_t _arch_syscall_invoke6(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_arch_syscall_invoke6(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5, u32_t arg6,
u32_t call_id);
static inline u32_t _syscall_invoke7(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_syscall_invoke7(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5, u32_t arg6,
u32_t arg7, u32_t call_id) {
struct _syscall_7_args args = {
@ -195,11 +195,11 @@ static inline u32_t _syscall_invoke7(u32_t arg1, u32_t arg2, u32_t arg3,
.arg7 = arg7,
};
return _arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
return z_arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
call_id);
}
static inline u32_t _syscall_invoke8(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_syscall_invoke8(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5, u32_t arg6,
u32_t arg7, u32_t arg8, u32_t call_id)
{
@ -209,11 +209,11 @@ static inline u32_t _syscall_invoke8(u32_t arg1, u32_t arg2, u32_t arg3,
.arg8 = arg8,
};
return _arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
return z_arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
call_id);
}
static inline u32_t _syscall_invoke9(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_syscall_invoke9(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5, u32_t arg6,
u32_t arg7, u32_t arg8, u32_t arg9,
u32_t call_id)
@ -225,11 +225,11 @@ static inline u32_t _syscall_invoke9(u32_t arg1, u32_t arg2, u32_t arg3,
.arg9 = arg9,
};
return _arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
return z_arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
call_id);
}
static inline u32_t _syscall_invoke10(u32_t arg1, u32_t arg2, u32_t arg3,
static inline u32_t z_syscall_invoke10(u32_t arg1, u32_t arg2, u32_t arg3,
u32_t arg4, u32_t arg5, u32_t arg6,
u32_t arg7, u32_t arg8, u32_t arg9,
u32_t arg10, u32_t call_id)
@ -242,32 +242,32 @@ static inline u32_t _syscall_invoke10(u32_t arg1, u32_t arg2, u32_t arg3,
.arg10 = arg10
};
return _arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
return z_arch_syscall_invoke6(arg1, arg2, arg3, arg4, arg5, (u32_t)&args,
call_id);
}
static inline u64_t _syscall_ret64_invoke0(u32_t call_id)
static inline u64_t z_syscall_ret64_invoke0(u32_t call_id)
{
u64_t ret;
(void)_arch_syscall_invoke1((u32_t)&ret, call_id);
(void)z_arch_syscall_invoke1((u32_t)&ret, call_id);
return ret;
}
static inline u64_t _syscall_ret64_invoke1(u32_t arg1, u32_t call_id)
static inline u64_t z_syscall_ret64_invoke1(u32_t arg1, u32_t call_id)
{
u64_t ret;
(void)_arch_syscall_invoke2(arg1, (u32_t)&ret, call_id);
(void)z_arch_syscall_invoke2(arg1, (u32_t)&ret, call_id);
return ret;
}
static inline u64_t _syscall_ret64_invoke2(u32_t arg1, u32_t arg2,
static inline u64_t z_syscall_ret64_invoke2(u32_t arg1, u32_t arg2,
u32_t call_id)
{
u64_t ret;
(void)_arch_syscall_invoke3(arg1, arg2, (u32_t)&ret, call_id);
(void)z_arch_syscall_invoke3(arg1, arg2, (u32_t)&ret, call_id);
return ret;
}