zephyr/boards/native/native_sim/reboot.c
Adrian Friedli ffdc50c4bf boards: native_sim: add reboot for native_sim
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>
2025-04-29 17:54:26 +02:00

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);
}