native simulator: Get latest from upstream
Align with native_simulator's upstream main 7d652dbfb313260cf07d595ccf26638f2b3c2959 Which includes: * 7d652db Provide macros for noreturn and unreachable & annotate Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
5e10cd9aee
commit
71db6550cd
3 changed files with 8 additions and 2 deletions
|
@ -7,6 +7,8 @@
|
||||||
#ifndef NSI_COMMON_SRC_INCL_NSI_MAIN_H
|
#ifndef NSI_COMMON_SRC_INCL_NSI_MAIN_H
|
||||||
#define NSI_COMMON_SRC_INCL_NSI_MAIN_H
|
#define NSI_COMMON_SRC_INCL_NSI_MAIN_H
|
||||||
|
|
||||||
|
#include "nsi_utils.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,7 +33,7 @@ int nsi_exit_inner(int exit_code);
|
||||||
* Note that other components may have requested a different
|
* Note that other components may have requested a different
|
||||||
* exit code which may have precedence if it was !=0
|
* exit code which may have precedence if it was !=0
|
||||||
*/
|
*/
|
||||||
void nsi_exit(int exit_code);
|
NSI_FUNC_NORETURN void nsi_exit(int exit_code);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,4 +25,8 @@
|
||||||
#define NSI_ARG_UNUSED(x) (void)(x)
|
#define NSI_ARG_UNUSED(x) (void)(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define NSI_CODE_UNREACHABLE __builtin_unreachable()
|
||||||
|
|
||||||
|
#define NSI_FUNC_NORETURN __attribute__((__noreturn__))
|
||||||
|
|
||||||
#endif /* NSI_COMMON_SRC_INCL_NSI_UTILS_H */
|
#endif /* NSI_COMMON_SRC_INCL_NSI_UTILS_H */
|
||||||
|
|
|
@ -44,7 +44,7 @@ int nsi_exit_inner(int exit_code)
|
||||||
return max_exit_code;
|
return max_exit_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsi_exit(int exit_code)
|
NSI_FUNC_NORETURN void nsi_exit(int exit_code)
|
||||||
{
|
{
|
||||||
exit(nsi_exit_inner(exit_code));
|
exit(nsi_exit_inner(exit_code));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue