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有什么区别
8320浏览 • 1回复 待解决
关于HAP包的entryfeature类型
7020浏览 • 1回复 待解决
wampserverapache的区别
410浏览 • 1回复 待解决
HVD ManagerDevice Manager区别
4908浏览 • 1回复 待解决
请问AbilitySliceFraction有什么区别
7537浏览 • 3回复 已解决
Navigatorrouter.push有啥区别
1941浏览 • 1回复 待解决
鸿蒙1.0鸿蒙2.0有什么区别
12386浏览 • 3回复 待解决
鸿蒙系统预装升级有什么区别
9064浏览 • 2回复 待解决
liteos-a 鸿蒙2.0有什么区别
6686浏览 • 1回复 已解决
多态多模的区别是什么?
3731浏览 • 2回复 已解决
云数据库专属集群MyBasePolarDB区别?
541浏览 • 1回复 待解决
鸿蒙系统安卓系统的区别有哪些呢?
13004浏览 • 2回复 已解决
鸿蒙2.0,欧拉C++20,有何区别
3598浏览 • 1回复 待解决
鸿蒙手表Android手机app同步数据
8620浏览 • 1回复 待解决
/qemu-init 配置flash时出现错误
3260浏览 • 1回复 待解决
烧录3516以后报/bin/init不可用
5826浏览 • 1回复 待解决