add noreturn attribute for LOS_Panic

Change-Id: Id2c76e3282d72bce18cf0925e12afaa0c3b06a90
This commit is contained in:
Caoruihong 2021-04-16 18:46:05 +08:00
parent 098da53afe
commit ea794ac751
2 changed files with 2 additions and 1 deletions

View File

@ -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 */

View File

@ -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