kernel: consolidate error handling code
* z_NanoFatalErrorHandler() is now moved to common kernel code and renamed z_fatal_error(). Arches dump arch-specific info before calling. * z_SysFatalErrorHandler() is now moved to common kernel code and renamed k_sys_fatal_error_handler(). It is now much simpler; the default policy is simply to lock interrupts and halt the system. If an implementation of this function returns, then the currently running thread is aborted. * New arch-specific APIs introduced: - z_arch_system_halt() simply powers off or halts the system. * We now have a standard set of fatal exception reason codes, namespaced under K_ERR_* * CONFIG_SIMPLE_FATAL_ERROR_HANDLER deleted * LOG_PANIC() calls moved to k_sys_fatal_error_handler() Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
81245a0193
commit
71ce8ceb18
53 changed files with 397 additions and 1183 deletions
|
@ -44,6 +44,8 @@ extern "C" {
|
|||
/* FIXME: Properly integrate with Zephyr's arch specific code */
|
||||
#define CONFIG_X86 1
|
||||
#define CONFIG_PRINTK 1
|
||||
struct esf;
|
||||
typedef struct esf NANO_ESF;
|
||||
#endif
|
||||
|
||||
#include <sys/printk.h>
|
||||
|
|
|
@ -48,7 +48,7 @@ void ztest_test_fail(void);
|
|||
*
|
||||
* Normally a test passes just by returning without an assertion failure.
|
||||
* However, if the success case for your test involves a fatal fault,
|
||||
* you can call this function from z_SysFatalErrorHandler to indicate that
|
||||
* you can call this function from k_sys_fatal_error_handler to indicate that
|
||||
* the test passed before aborting the thread.
|
||||
*/
|
||||
void ztest_test_pass(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue