arch posix: annotate posix_exit and nsi_exit as noreturn
Annotate posix_exit() and nsi_exit() as noreturn mainly to ease the life of static analysis tools. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
71db6550cd
commit
ab896ad6ef
2 changed files with 6 additions and 4 deletions
|
@ -13,6 +13,8 @@
|
|||
*/
|
||||
|
||||
#include <zephyr/arch/posix/posix_trace.h>
|
||||
#include <zephyr/toolchain.h>
|
||||
#include "posix_board_if.h"
|
||||
|
||||
void nsi_print_error_and_exit(const char *format, ...)
|
||||
{
|
||||
|
@ -41,9 +43,8 @@ void nsi_print_trace(const char *format, ...)
|
|||
va_end(variable_args);
|
||||
}
|
||||
|
||||
void nsi_exit(int exit_code)
|
||||
FUNC_NORETURN void nsi_exit(int exit_code)
|
||||
{
|
||||
extern void posix_exit(int exit_code);
|
||||
|
||||
posix_exit(exit_code);
|
||||
CODE_UNREACHABLE;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define _POSIX_CORE_BOARD_PROVIDED_IF_H
|
||||
|
||||
#include <zephyr/types.h>
|
||||
#include <zephyr/toolchain.h>
|
||||
|
||||
/*
|
||||
* This file lists the functions the posix "inf_clock" soc
|
||||
|
@ -22,7 +23,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
void posix_irq_handler(void);
|
||||
void posix_exit(int exit_code);
|
||||
FUNC_NORETURN void posix_exit(int exit_code);
|
||||
uint64_t posix_get_hw_cycle(void);
|
||||
void posix_cpu_hold(uint32_t usec_to_waste);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue