Add a reboot implementation for the native_sim target which restarts the current executable keeping the command line arguments after closing all open file descriptors. Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com> Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no> Co-authored-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
17 lines
282 B
C
17 lines
282 B
C
/*
|
|
* Copyright (c) 2025 GARDENA GmbH
|
|
* Copyright (c) 2025 Nordic Semiconductor ASA
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include "reboot_bottom.h"
|
|
#include "posix_board_if.h"
|
|
|
|
void sys_arch_reboot(int type)
|
|
{
|
|
(void)type;
|
|
native_set_reboot_on_exit();
|
|
posix_exit(0);
|
|
}
|