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:
Alberto Escolar Piedras 2023-11-20 11:39:12 +01:00 committed by Carles Cufí
commit 71db6550cd
3 changed files with 8 additions and 2 deletions

View file

@ -7,6 +7,8 @@
#ifndef NSI_COMMON_SRC_INCL_NSI_MAIN_H
#define NSI_COMMON_SRC_INCL_NSI_MAIN_H
#include "nsi_utils.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -31,7 +33,7 @@ int nsi_exit_inner(int exit_code);
* Note that other components may have requested a different
* 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
}

View file

@ -25,4 +25,8 @@
#define NSI_ARG_UNUSED(x) (void)(x)
#endif
#define NSI_CODE_UNREACHABLE __builtin_unreachable()
#define NSI_FUNC_NORETURN __attribute__((__noreturn__))
#endif /* NSI_COMMON_SRC_INCL_NSI_UTILS_H */

View file

@ -44,7 +44,7 @@ int nsi_exit_inner(int 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));
}