add noreturn attribute for LOS_Panic LOS_Reboot and HalSysExit
Change-Id: I65bbdd3d60aa754a389f9371649a96483d2a6f8a
This commit is contained in:
parent
530b738dec
commit
6bf6efdc7e
|
@ -82,7 +82,7 @@ extern VOID *HalTskStackInit(UINT32 taskID, UINT32 stackSize, VOID *topStack);
|
||||||
* <ul><li>los_hw.h: the header file that contains the API declaration.</li></ul>
|
* <ul><li>los_hw.h: the header file that contains the API declaration.</li></ul>
|
||||||
* @see None.
|
* @see None.
|
||||||
*/
|
*/
|
||||||
LITE_OS_SEC_TEXT_MINOR VOID HalSysExit(VOID);
|
LITE_OS_SEC_TEXT_MINOR VOID HalSysExit(VOID) NORETURN;
|
||||||
|
|
||||||
/* *
|
/* *
|
||||||
* @ingroup los_context
|
* @ingroup los_context
|
||||||
|
|
|
@ -501,8 +501,8 @@ extern VOID LOS_Msleep(UINT32 mSecs);
|
||||||
* @see
|
* @see
|
||||||
*/
|
*/
|
||||||
extern UINT32 LOS_Start(VOID);
|
extern UINT32 LOS_Start(VOID);
|
||||||
extern VOID LOS_Reboot(VOID);
|
extern VOID LOS_Reboot(VOID) NORETURN;
|
||||||
extern VOID LOS_Panic(const CHAR *fmt, ...);
|
extern VOID LOS_Panic(const CHAR *fmt, ...) NORETURN;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -70,6 +70,10 @@ extern "C" {
|
||||||
#define CLZ __iar_builtin_CLZ
|
#define CLZ __iar_builtin_CLZ
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NORETURN
|
||||||
|
#define NORETURN __attribute__ ((__noreturn__))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* for ARM Compiler */
|
/* for ARM Compiler */
|
||||||
#elif defined(__CC_ARM)
|
#elif defined(__CC_ARM)
|
||||||
|
|
||||||
|
@ -97,6 +101,10 @@ extern "C" {
|
||||||
#define CLZ __clz
|
#define CLZ __clz
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NORETURN
|
||||||
|
#define NORETURN __declspec(noreturn)
|
||||||
|
#endif
|
||||||
|
|
||||||
#pragma anon_unions
|
#pragma anon_unions
|
||||||
|
|
||||||
/* for GNU Compiler */
|
/* for GNU Compiler */
|
||||||
|
@ -126,6 +134,10 @@ extern "C" {
|
||||||
#define CLZ __builtin_clz
|
#define CLZ __builtin_clz
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NORETURN
|
||||||
|
#define NORETURN __attribute__ ((__noreturn__))
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error Unknown compiler.
|
#error Unknown compiler.
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue