提交 b684b0c8 编写于 作者: O openharmony_ci 提交者: Gitee

!148 为LOS_Panic添加noreturn属性

Merge pull request !148 from Caoruihong/los_panic
......@@ -1138,6 +1138,7 @@ __attribute__((noinline)) VOID LOS_Panic(const CHAR *fmt, ...)
UartVprintf(fmt, ap);
va_end(ap);
__asm__ __volatile__("swi 0");
while (1);
}
/* stack protector */
......
......@@ -183,7 +183,7 @@ extern UINT32 LOS_ExcRegHook(EXC_PROC_FUNC excHook);
* los_exc.h: the header file that contains the API declaration.
* @see None.
*/
VOID LOS_Panic(const CHAR *fmt, ...);
VOID LOS_Panic(const CHAR *fmt, ...) __attribute__ ((noreturn));
/**
* @ingroup los_exc
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册