diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-21 11:29:01 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-22 09:40:23 +0100 |
commit | 15e19273b2a6ebda3b2d55b28d693e7b8a0740b2 (patch) | |
tree | 4fb0c67c21f6f9f947e5400fc0a40e03acff00eb /cpukit/sapi/include/rtems/fatal.h | |
parent | INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL (diff) | |
download | rtems-15e19273b2a6ebda3b2d55b28d693e7b8a0740b2.tar.bz2 |
sapi: New implementation of rtems_panic()
The previous rtems_panic() implementation was quite heavy weight. It
depended on _exit() which calls the global destructors. It used
fprintf(stderr, ...) for output which depends on an initialized console
device and the complex fprintf().
Introduce a new fatal source RTEMS_FATAL_SOURCE_PANIC for rtems_panic()
and output via vprintk().
Update #3244.
Diffstat (limited to '')
-rw-r--r-- | cpukit/sapi/include/rtems/fatal.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpukit/sapi/include/rtems/fatal.h b/cpukit/sapi/include/rtems/fatal.h index 80929cd274..291af42c6e 100644 --- a/cpukit/sapi/include/rtems/fatal.h +++ b/cpukit/sapi/include/rtems/fatal.h @@ -89,6 +89,18 @@ RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal( } /** + * @brief Prints the specified message via printk() and terminates the system. + * + * @param[in] fmt The message format. + * @param[in] ... The message parameters. + * + * @see _Terminate(). + */ +RTEMS_NO_RETURN void rtems_panic( + const char *fmt, ... +) RTEMS_PRINTFLIKE( 1, 2 ); + +/** * @brief Returns a text for a fatal source. * * The text for each fatal source is the enumerator constant. |