From aa80636629afa295507b45b6af7459cb87f28f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=BA=E5=B0=8F=E5=B8=85?= Date: Mon, 11 Dec 2023 01:10:01 +0000 Subject: [PATCH] =?UTF-8?q?Add=20init=20modules=20first=20stage=20hook=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0init=E6=A8=A1=E5=9D=97=20=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E9=98=B6=E6=AE=B5hook=20=E6=AF=94=E5=A6=82=E5=9C=A8=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E9=98=B6=E6=AE=B5=E5=8A=A0=E8=BD=BD=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 贺小帅 --- interfaces/innerkits/init_module_engine/include/bootstage.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interfaces/innerkits/init_module_engine/include/bootstage.h b/interfaces/innerkits/init_module_engine/include/bootstage.h index 538c1de26..d024dca2a 100755 --- a/interfaces/innerkits/init_module_engine/include/bootstage.h +++ b/interfaces/innerkits/init_module_engine/include/bootstage.h @@ -54,6 +54,11 @@ enum INIT_BOOTSTAGE { HOOK_MGR *GetBootStageHookMgr(); +__attribute__((always_inline)) inline int InitAddFirstStageHook(int prio, OhosHook hook) +{ + return HookMgrAdd(GetBootStageHookMgr(), INIT_FIRST_STAGE, prio, hook); +} + __attribute__((always_inline)) inline int InitAddGlobalInitHook(int prio, OhosHook hook) { return HookMgrAdd(GetBootStageHookMgr(), INIT_GLOBAL_INIT, prio, hook); -- Gitee