WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
Kernel init
Kernel init 的协作图:

宏定义

#define SYS_INIT_LEVEL_EARLY   0 /* reserved before kernel init */
 
#define SYS_INIT_SYNC_0   s0
 
#define LOS_SYS_INIT(func, level, sync)   SYS_INITCALL(func, level, sync)
 Register a startup module to the startup process.
 

详细描述

宏定义说明

◆ LOS_SYS_INIT

#define LOS_SYS_INIT (   func,
  level,
  sync 
)    SYS_INITCALL(func, level, sync)

Register a startup module to the startup process.

Description:
This API is used to register a startup module to the startup process.
注意
  • Register a new module in the boot process of the kernel as part of the kernel capability component.
  • In the startup framework, within the same level, the startup sequence is sorted by the sync number
  • Using -u option can avoid linker to optimize symbol, otherwise the symbol may register failed!
  • The parameter func is not be NULL, otherwise the system maybe crash!
参数
func[IN] Type UINT32 (*)(VOID) Register function.
level[IN] Type UINT32 Init level in the kernel.
sync[IN] Type UINT32 Init sync in the kernel.
返回值
None
Dependency:
  • los_init.h: the header file that contains the API declaration.
参见

◆ SYS_INIT_LEVEL_EARLY

#define SYS_INIT_LEVEL_EARLY   0 /* reserved before kernel init */

Kernel module init level, used to describe the startup stage. Smaller level number, excute earlier. SYS_INIT_LEVEL_EARLY and SYS_INIT_LEVEL_RESERVE reserve for user and other level used for LiteOS.

◆ SYS_INIT_SYNC_0

#define SYS_INIT_SYNC_0   s0

Kernel Module Init sync, used to set up the priority in same level. Smaller sync number, excute earlier.