-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: include/: move misc/reboot.h to power/reboot.h
move misc/reboot.h to power/reboot.h and create a shim for backward-compatibility. No functional changes to the headers. A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES. Related to #16539 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- Loading branch information
Showing
12 changed files
with
56 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,15 @@ | ||
/* | ||
* Copyright (c) 2015 Wind River Systems, Inc. | ||
* Copyright (c) 2019 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* @file | ||
* @brief Common target reboot functionality | ||
* | ||
* @details See misc/Kconfig and the reboot help for details. | ||
*/ | ||
|
||
#ifndef ZEPHYR_INCLUDE_MISC_REBOOT_H_ | ||
#define ZEPHYR_INCLUDE_MISC_REBOOT_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#ifndef CONFIG_COMPAT_INCLUDES | ||
#warning "This header file has moved, include <power/reboot.h> instead." | ||
#endif | ||
|
||
#define SYS_REBOOT_WARM 0 | ||
#define SYS_REBOOT_COLD 1 | ||
|
||
/** | ||
* @brief Reboot the system | ||
* | ||
* Reboot the system in the manner specified by @a type. Not all architectures | ||
* or platforms support the various reboot types (SYS_REBOOT_COLD, | ||
* SYS_REBOOT_WARM). | ||
* | ||
* When successful, this routine does not return. | ||
* | ||
* @return N/A | ||
*/ | ||
|
||
extern void sys_reboot(int type); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#include <power/reboot.h> | ||
|
||
#endif /* ZEPHYR_INCLUDE_MISC_REBOOT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2015 Wind River Systems, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* @file | ||
* @brief Common target reboot functionality | ||
* | ||
* @details See misc/Kconfig and the reboot help for details. | ||
*/ | ||
|
||
#ifndef ZEPHYR_INCLUDE_POWER_REBOOT_H_ | ||
#define ZEPHYR_INCLUDE_POWER_REBOOT_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#define SYS_REBOOT_WARM 0 | ||
#define SYS_REBOOT_COLD 1 | ||
|
||
/** | ||
* @brief Reboot the system | ||
* | ||
* Reboot the system in the manner specified by @a type. Not all architectures | ||
* or platforms support the various reboot types (SYS_REBOOT_COLD, | ||
* SYS_REBOOT_WARM). | ||
* | ||
* When successful, this routine does not return. | ||
* | ||
* @return N/A | ||
*/ | ||
|
||
extern void sys_reboot(int type); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* ZEPHYR_INCLUDE_POWER_REBOOT_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters