blob: 5652fc58dbcfef85b9e91c35d59d159ce7809732 [file] [log] [blame]
Anas Nashif5b0aa792019-06-26 10:44:43 -04001/*
2 * Copyright (c) 2015 Wind River Systems, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/**
8 * @file
9 * @brief Common target reboot functionality
10 *
Gerard Marull-Paretasf163bdb2021-04-27 11:56:39 +020011 * @details See subsys/os/Kconfig and the reboot help for details.
Anas Nashif5b0aa792019-06-26 10:44:43 -040012 */
13
Gerard Marull-Paretasf163bdb2021-04-27 11:56:39 +020014#ifndef ZEPHYR_INCLUDE_SYS_REBOOT_H_
15#define ZEPHYR_INCLUDE_SYS_REBOOT_H_
Anas Nashif5b0aa792019-06-26 10:44:43 -040016
Christoph Thurnheeref971212021-08-11 13:43:31 +020017#include <toolchain.h>
18
Anas Nashif5b0aa792019-06-26 10:44:43 -040019#ifdef __cplusplus
20extern "C" {
21#endif
22
23#define SYS_REBOOT_WARM 0
24#define SYS_REBOOT_COLD 1
25
26/**
27 * @brief Reboot the system
28 *
29 * Reboot the system in the manner specified by @a type. Not all architectures
30 * or platforms support the various reboot types (SYS_REBOOT_COLD,
31 * SYS_REBOOT_WARM).
32 *
33 * When successful, this routine does not return.
Anas Nashif5b0aa792019-06-26 10:44:43 -040034 */
Christoph Thurnheeref971212021-08-11 13:43:31 +020035extern FUNC_NORETURN void sys_reboot(int type);
Anas Nashif5b0aa792019-06-26 10:44:43 -040036
37#ifdef __cplusplus
38}
39#endif
40
Gerard Marull-Paretasf163bdb2021-04-27 11:56:39 +020041#endif /* ZEPHYR_INCLUDE_SYS_REBOOT_H_ */