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
相关问题
DevEco构建HapAPP有什么区别
12761浏览 • 1回复 待解决
关于HAP包的entryfeature类型
9453浏览 • 1回复 待解决
多个xcompnent调用init时机
29浏览 • 1回复 待解决
wampserverapache的区别
1650浏览 • 1回复 待解决
参数不识别(ohpm run
321浏览 • 1回复 待解决
多个feature模块的问题
808浏览 • 1回复 待解决
HVD ManagerDevice Manager区别
5829浏览 • 1回复 待解决
exportexport default的区别
1104浏览 • 1回复 待解决
UIAbilityExtensionAbility有什么区别
72浏览 • 1回复 待解决
Navigatorrouter.push有啥区别
2991浏览 • 1回复 待解决
LocalStorageAppStorage有什么区别
107浏览 • 2回复 待解决
hilogconsole.log的区别
1245浏览 • 1回复 待解决
HARHAP的区别有哪些
961浏览 • 1回复 待解决
ArkTS文件TS文件的区别
1213浏览 • 1回复 待解决
Stage模型FA模型的区别
1632浏览 • 1回复 待解决
eTS文件ts文件的区别
1197浏览 • 1回复 待解决
/qemu-init 配置flash时出现错误
4421浏览 • 1回复 待解决
烧录3516以后报/bin/init不可用
7105浏览 • 1回复 待解决
getContext传入this不传入有什么区别
311浏览 • 1回复 待解决