未验证 提交 3f8ca04a 编写于 作者: O openharmony_ci 提交者: Gitee

!868 GetBootStageHookMgr auto create HookMgr

Merge pull request !868 from handy/062722
......@@ -254,6 +254,15 @@ static HOOK_MGR *bootStageHookMgr = NULL;
HOOK_MGR *GetBootStageHookMgr()
{
if (bootStageHookMgr != NULL) {
return bootStageHookMgr;
}
/*
* Create bootstage hook manager for booting only.
* When boot completed, this manager will be destroyed.
*/
bootStageHookMgr = HookMgrCreate(INIT_BOOTSTAGE_HOOK_NAME);
return bootStageHookMgr;
}
......@@ -359,12 +368,6 @@ void SystemConfig(void)
options.preHook = InitPreHook;
options.postHook = InitPostHook;
/*
* Create bootstage hook manager for booting only.
* When boot completed, this manager will be destroyed.
*/
bootStageHookMgr = HookMgrCreate(INIT_BOOTSTAGE_HOOK_NAME);
HookMgrExecute(GetBootStageHookMgr(), INIT_GLOBAL_INIT, (void *)&timingStat, (void *)&options);
InitServiceSpace();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册