APP_FEATURE_INIT 和 SYS_RUN区别?

基于鸿蒙设备开发,启动一个业务程序,最后使用APP_FEATURE_INIT(xxx)或SYS_RUN(xxx),效果貌似相同,请问这两个宏函数主要有哪些区别呢?

鸿蒙设备开发
Hi3861’
2021-09-23 16:26:47
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
红叶亦知秋
3

SYS_RUN是标识用于初始化和启动系统运行阶段的入口

APP_FEATURE_INIT标识用于初始化和启动应用层功能的入口

可以看一下源码中对于这两个函数的注解:

/**

 * @brief Identifies the entry for initializing and starting a system running phase by the

 * priority 2.

 *

 * This macro is used to identify the entry called at the priority 2 in the system startup

 * phase of the startup process. \n

 *

 * @param func Indicates the entry function for initializing and starting a system running phase.

 * The type is void (*)(void).

 */

#define SYS_RUN(func)

 

/**

 * @brief Identifies the entry for initializing and starting an application-layer feature by the

 * priority 2.

 *

 * This macro is used to identify the entry called at the priority 2 of the application-layer

 * feature phase of the startup process. \n

 *

 * @param func Indicates the entry function for initializing and starting an application-layer

 * feature. The type is void (*)(void).

 */

#define APP_FEATURE_INIT(func)

答复引用于:华为开发者联盟开发者支持团队

分享
微博
QQ
微信
回复1
2021-09-27 15:11:25
相关问题
关于HAP包的entryfeature类型
9138浏览 • 1回复 待解决
DevEco构建HapAPP有什么区别
12323浏览 • 1回复 待解决
wampserverapache的区别
1316浏览 • 1回复 待解决
多个feature模块的问题
489浏览 • 1回复 待解决
HVD ManagerDevice Manager区别
5589浏览 • 1回复 待解决
参数不识别(ohpm run
229浏览 • 1回复 待解决
Navigatorrouter.push有啥区别
2735浏览 • 1回复 待解决
烧录3516以后报/bin/init不可用
6820浏览 • 1回复 待解决
liteos-a 鸿蒙2.0有什么区别
7832浏览 • 1回复 已解决
getContext传入this不传入有什么区别
223浏览 • 1回复 待解决
多态多模的区别是什么?
4615浏览 • 2回复 已解决
exportexport default的区别
771浏览 • 1回复 待解决
/qemu-init 配置flash时出现错误
4101浏览 • 1回复 待解决
原子化服务卡片本质上的区别
601浏览 • 1回复 待解决
HARHAP的区别有哪些
719浏览 • 1回复 待解决
hilogconsole.log的区别
941浏览 • 1回复 待解决