diff --git a/core/include/kernel.h b/core/include/kernel.h index 8e70f1a469..f8f0789d14 100644 --- a/core/include/kernel.h +++ b/core/include/kernel.h @@ -13,6 +13,8 @@ * @file kernel.h * @brief Kernel compile time configuration * + * A reboot() function is also provided (and used by panic() when needed). + * * @author Freie Universität Berlin, Computer Systems & Telematics * @author Kaspar Schleiser */ @@ -86,5 +88,22 @@ extern volatile int lpm_prevent_sleep; extern config_t sysconfig; +/* ------------------------------------------------------------------------- */ + +#ifdef __GNUC__ +#define NORETURN __attribute__((noreturn)) +#else +#define NORETURN /* insert other compiler attributes/pragmas/whatever here */ +#endif + +/** + * @brief Immediately reboots the system. + * + * This function is used by panic() when the DEVELHELP macro is not defined. + * + * @return WARNING: this function NEVER returns! + */ +NORETURN void reboot(void); + /** @} */ #endif /* KERNEL_H_ */