1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef NSI_COMMON_SRC_INCL_NSI_MAIN_H
8 #define NSI_COMMON_SRC_INCL_NSI_MAIN_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /**
15  * @brief Like nsi_exit(), do all cleanup required to terminate the
16  *        execution of the native_simulator, but instead of exiting,
17  *        return to the caller what would have been passed to exit()
18  *
19  * @param[in] exit_code: Requested exit code to the shell
20  *            Note that other components may have requested a different
21  *            exit code which may have precedence if it was !=0
22  *
23  * @returns Code which would have been passed to exit()
24  */
25 int nsi_exit_inner(int exit_code);
26 
27 /**
28  * @brief Terminate the execution of the native simulator
29  *
30  * @param[in] exit_code: Requested exit code to the shell
31  *            Note that other components may have requested a different
32  *            exit code which may have precedence if it was !=0
33  */
34 void nsi_exit(int exit_code);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif /* NSI_COMMON_SRC_INCL_NSI_MAIN_H */
41