diff --git a/kernel/microkernel/global.c b/kernel/microkernel/global.c index adda48da527..47ad7d26778 100644 --- a/kernel/microkernel/global.c +++ b/kernel/microkernel/global.c @@ -41,8 +41,8 @@ #include #endif -extern void init_node(void); /* defined by sysgen */ -extern void init_drivers(void); /* defined by sysgen */ +extern void _k_init_node(void); /* defined by sysgen */ +extern void _k_init_drivers(void); /* defined by sysgen */ char __noinit __stack _k_server_stack[CONFIG_MICROKERNEL_SERVER_STACK_SIZE]; @@ -60,7 +60,7 @@ struct nano_stack _k_command_stack = {NULL, extern void K_swapper(int i1, int i2); -void kernel_init(void) +void _k_kernel_init(void) { #ifdef CONFIG_BOOT_TIME_MEASUREMENT /* @@ -77,7 +77,7 @@ void kernel_init(void) * Note: most variables & data structure are globally initialized in * kernel_main.c */ - init_node(); + _k_init_node(); #ifdef CONFIG_INIT_STACKS memset((char *)_k_server_command_stack_storage, 0xaa, @@ -92,7 +92,7 @@ void kernel_init(void) CONFIG_MICROKERNEL_SERVER_PRIORITY, 0); - init_drivers(); + _k_init_drivers(); #ifdef CONFIG_WORKLOAD_MONITOR _k_workload_monitor_calibrate(); diff --git a/kernel/microkernel/idle.c b/kernel/microkernel/idle.c index 0abdff0c8ad..a2046ccaa3c 100644 --- a/kernel/microkernel/idle.c +++ b/kernel/microkernel/idle.c @@ -400,7 +400,7 @@ static inline int32_t _get_next_timer_expiry(void) * * If the BSP sets the _sys_power_save_flag flag, this routine will call the * _sys_power_save_idle() routine in an infinite loop. If the flag is not set, -* this routine will fall through and kernel_idle() will try the next idling +* this routine will fall through and _k_kernel_idle() will try the next idling * mechanism. * * RETURNS: N/A @@ -446,7 +446,7 @@ static void _power_save(void) /******************************************************************************* * -* kernel_idle - microkernel idle task +* _k_kernel_idle - microkernel idle task * * If power save is on, we sleep; if power save is off, we "busy wait". * @@ -454,7 +454,7 @@ static void _power_save(void) * */ -int kernel_idle(void) +int _k_kernel_idle(void) { _power_save(); /* never returns if power saving is enabled */ @@ -470,7 +470,7 @@ int kernel_idle(void) } /* - * Code analyzers may complain that kernel_idle() uses an infinite loop + * Code analyzers may complain that _k_kernel_idle() uses an infinite loop * unless we indicate that this is intentional */ diff --git a/kernel/microkernel/include/kernel_main.h b/kernel/microkernel/include/kernel_main.h index 917a5bc7381..0c132bf6378 100644 --- a/kernel/microkernel/include/kernel_main.h +++ b/kernel/microkernel/include/kernel_main.h @@ -48,11 +48,11 @@ extern int _k_ticker(int event); /* APIs referenced by generated routines */ -extern void _pipe_init(void); -extern void _mem_map_init(void); -extern void _mem_pools_init(void); -extern void kernel_init(void); -extern int kernel_idle(void); +extern void _k_pipe_init(void); +extern void _k_mem_map_init(void); +extern void _k_mem_pool_init(void); +extern void _k_kernel_init(void); +extern int _k_kernel_idle(void); /* Format of routines invoked by microkernel server */ diff --git a/kernel/microkernel/k_memmap.c b/kernel/microkernel/k_memmap.c index a22a838ff28..d2385c2717a 100644 --- a/kernel/microkernel/k_memmap.c +++ b/kernel/microkernel/k_memmap.c @@ -35,14 +35,14 @@ /******************************************************************************* * -* _mem_map_init - initialize kernel memory map subsystem +* _k_mem_map_init - initialize kernel memory map subsystem * * Perform any initialization of memory maps that wasn't done at build time. * * RETURNS: N/A */ -void _mem_map_init(void) +void _k_mem_map_init(void) { int i, j, w; struct map_struct *M; diff --git a/kernel/microkernel/k_mempool.c b/kernel/microkernel/k_mempool.c index 197a15232e8..7fc0109c848 100644 --- a/kernel/microkernel/k_mempool.c +++ b/kernel/microkernel/k_mempool.c @@ -45,14 +45,14 @@ /******************************************************************************* * -* _mem_pools_init - initialize kernel memory pool subsystem +* _k_mem_pool_init - initialize kernel memory pool subsystem * * Perform any initialization of memory pool that wasn't done at build time. * * RETURNS: N/A */ -void _mem_pools_init(void) +void _k_mem_pool_init(void) { int i, j, k; struct pool_struct *P; diff --git a/kernel/microkernel/k_pipe.c b/kernel/microkernel/k_pipe.c index f757df2b71f..8f21738e149 100644 --- a/kernel/microkernel/k_pipe.c +++ b/kernel/microkernel/k_pipe.c @@ -37,7 +37,7 @@ /******************************************************************************* * -* _pipe_init - initialize kernel pipe subsystem +* _k_pipe_init - initialize kernel pipe subsystem * * Performs any initialization of statically-defined pipes that wasn't done * at build time. (Note: most pipe structure fields are set to zero by sysgen.) @@ -45,7 +45,7 @@ * RETURNS: N/A */ -void _pipe_init(void) +void _k_pipe_init(void) { int i; struct pipe_struct *pPipe; diff --git a/scripts/sysgen.py b/scripts/sysgen.py index 4aa0121f2b8..0c80c3e60aa 100755 --- a/scripts/sysgen.py +++ b/scripts/sysgen.py @@ -981,7 +981,7 @@ def kernel_main_c_driver_init(): """ Generate driver initialization routine """ kernel_main_c_out("\n" + - "void init_drivers(void)\n" + + "void _k_init_drivers(void)\n" + "{\n") for driver_call in driver_list: kernel_main_c_out(" " + driver_call + ";\n") @@ -992,13 +992,13 @@ def kernel_main_c_node_init(): """ Generate node initialization routine """ kernel_main_c_out("\n" + - "void init_node(void)\n{\n") + "void _k_init_node(void)\n{\n") if (len(pipe_list) > 0): - kernel_main_c_out(" _pipe_init();\n") + kernel_main_c_out(" _k_pipe_init();\n") if (len(map_list) > 0): - kernel_main_c_out(" _mem_map_init();\n") + kernel_main_c_out(" _k_mem_map_init();\n") if (len(pool_list) > 0): - kernel_main_c_out(" _mem_pools_init();\n") + kernel_main_c_out(" _k_mem_pool_init();\n") kernel_main_c_out("}\n") @@ -1008,9 +1008,9 @@ def kernel_main_c_main(): kernel_main_c_out("\n" + "void main(void)\n" + "{\n" + - " kernel_init();\n" + + " _k_kernel_init();\n" + " task_group_start(EXE);\n" + - " kernel_idle();\n" + + " _k_kernel_idle();\n" + "}\n")