Anas Nashif | 5b0aa79 | 2019-06-26 10:44:43 -0400 | [diff] [blame] | 1 | /* |
| 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-Paretas | f163bdb | 2021-04-27 11:56:39 +0200 | [diff] [blame] | 11 | * @details See subsys/os/Kconfig and the reboot help for details. |
Anas Nashif | 5b0aa79 | 2019-06-26 10:44:43 -0400 | [diff] [blame] | 12 | */ |
| 13 | |
Gerard Marull-Paretas | f163bdb | 2021-04-27 11:56:39 +0200 | [diff] [blame] | 14 | #ifndef ZEPHYR_INCLUDE_SYS_REBOOT_H_ |
| 15 | #define ZEPHYR_INCLUDE_SYS_REBOOT_H_ |
Anas Nashif | 5b0aa79 | 2019-06-26 10:44:43 -0400 | [diff] [blame] | 16 | |
Christoph Thurnheer | ef97121 | 2021-08-11 13:43:31 +0200 | [diff] [blame] | 17 | #include <toolchain.h> |
| 18 | |
Anas Nashif | 5b0aa79 | 2019-06-26 10:44:43 -0400 | [diff] [blame] | 19 | #ifdef __cplusplus |
| 20 | extern "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 Nashif | 5b0aa79 | 2019-06-26 10:44:43 -0400 | [diff] [blame] | 34 | */ |
Christoph Thurnheer | ef97121 | 2021-08-11 13:43:31 +0200 | [diff] [blame] | 35 | extern FUNC_NORETURN void sys_reboot(int type); |
Anas Nashif | 5b0aa79 | 2019-06-26 10:44:43 -0400 | [diff] [blame] | 36 | |
| 37 | #ifdef __cplusplus |
| 38 | } |
| 39 | #endif |
| 40 | |
Gerard Marull-Paretas | f163bdb | 2021-04-27 11:56:39 +0200 | [diff] [blame] | 41 | #endif /* ZEPHYR_INCLUDE_SYS_REBOOT_H_ */ |