mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 15:07:03 +08:00
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.
This commit is contained in:
@@ -88,6 +88,18 @@ RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal(
|
||||
_Terminate( fatal_source, error_code );
|
||||
}
|
||||
|
||||
/**
|
||||
* @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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user