summaryrefslogtreecommitdiffstats
path: root/c-user/fatal_error.rst
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-22 14:09:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-23 07:27:55 +0100
commit97c51c8bfbb875340941f492b6b32b5c88c1ec21 (patch)
tree9eb91e280bac8c67ad8d5c3a0e7cc67c56532bbe /c-user/fatal_error.rst
parentd1a824fd18a82da61edffce78bb9e8f943c96bd7 (diff)
downloadrtems-docs-97c51c8bfbb875340941f492b6b32b5c88c1ec21.tar.bz2
c-user: Document rtems_panic()
Close #3244.
Diffstat (limited to 'c-user/fatal_error.rst')
-rw-r--r--c-user/fatal_error.rst46
1 files changed, 42 insertions, 4 deletions
diff --git a/c-user/fatal_error.rst b/c-user/fatal_error.rst
index 320227b..b2fe4e1 100644
--- a/c-user/fatal_error.rst
+++ b/c-user/fatal_error.rst
@@ -21,6 +21,8 @@ provided by the fatal error manager are:
- rtems_fatal_ - Invoke the fatal error handler
+- rtems_panic_ - Print a message and invoke the fatal error handler
+
- rtems_shutdown_executive_ - Shutdown RTEMS
- rtems_exception_frame_print_ - Print the CPU exception frame
@@ -122,6 +124,9 @@ RTEMS_FATAL_SOURCE_EXCEPTION (9)
RTEMS_FATAL_SOURCE_SMP (10)
Fatal source of SMP domain. See :c:type:`SMP_Fatal_code`.
+RTEMS_FATAL_SOURCE_PANIC (11)
+ Fatal source of :c:func:`rtems_panic`, see :ref:`rtems_panic`.
+
.. _internal_errors:
Internal Error Codes
@@ -458,15 +463,15 @@ sequence, related constants, usage, and status codes.
.. _rtems_fatal:
-FATAL - Invoke the fatal error
-------------------------------
+FATAL - Invoke the fatal error handler
+--------------------------------------
CALLING SEQUENCE:
.. code-block:: c
void rtems_fatal(
- rtems_fatal_source fatal_source,
- rtems_fatal_code error_code
+ rtems_fatal_source fatal_source,
+ rtems_fatal_code error_code
) RTEMS_NO_RETURN;
DIRECTIVE STATUS CODES:
@@ -483,6 +488,39 @@ NOTE:
\clearpage
+.. index:: panic
+.. index:: rtems_panic
+
+.. _rtems_panic:
+
+PANIC - Print a message and invoke the fatal error handler
+----------------------------------------------------------
+
+CALLING SEQUENCE:
+ .. code-block:: c
+
+ void rtems_panic(
+ const char *fmt,
+ ...
+ ) RTEMS_NO_RETURN RTEMS_PRINTFLIKE( 1, 2 );
+
+DIRECTIVE STATUS CODES:
+ NONE - This function will not return to the caller.
+
+DESCRIPTION:
+ This directive prints a message via :c:func:`printk` specified by the
+ format and optional parameters and then terminates the system with the
+ :c:macro:`RTEMS_FATAL_SOURCE_PANIC` fatal source. The fatal code is set to
+ the format string address.
+
+NOTE:
+ Registered :c:func:`atexit()` or :c:func:`on_exit()` handlers are not
+ called. Use :c:func:`exit()` in case these handlers should be invoked.
+
+.. raw:: latex
+
+ \clearpage
+
.. index:: shutdown RTEMS
.. index:: rtems_shutdown_executive