RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions
Fatal Error Manager

The Fatal Error Manager processes all fatal or irrecoverable errors and other sources of system termination (for example after exit()). Fatal errors are identified by the fatal source and code pair. More...

Data Structures

struct  rtems_assert_context
 This structure provides the context in which an assertion failed. More...
 

Typedefs

typedef CPU_Exception_frame rtems_exception_frame
 This structure represents an architecture-dependent exception frame.
 

Functions

RTEMS_NO_RETURN RTEMS_PRINTFLIKE (1, 2) void rtems_panic(const char *fmt
 Prints the message and invokes the fatal error handler.
 
const char * rtems_fatal_source_text (rtems_fatal_source fatal_source)
 Returns a descriptive text for the fatal source.
 
const char * rtems_internal_error_text (rtems_fatal_code internal_error_code)
 Returns a descriptive text for the internal error code.
 
RTEMS_NO_RETURN void rtems_fatal_error_occurred (uint32_t fatal_code)
 Invokes the fatal error handler.
 
RTEMS_NO_RETURN void rtems_shutdown_executive (uint32_t fatal_code)
 Invokes the fatal error handler.
 

Detailed Description

The Fatal Error Manager processes all fatal or irrecoverable errors and other sources of system termination (for example after exit()). Fatal errors are identified by the fatal source and code pair.

Function Documentation

◆ rtems_fatal_error_occurred()

RTEMS_NO_RETURN void rtems_fatal_error_occurred ( uint32_t  fatal_code)

Invokes the fatal error handler.

Parameters
fatal_codeis the fatal code.

This directive processes fatal errors. The fatal source is set to INTERNAL_ERROR_RTEMS_API. The fatal code is set to the value of the fatal_code parameter.

Notes
This directive is deprecated and should not be used in new code. It is recommended to not use this directive since error locations cannot be uniquely identified. A recommended alternative directive is rtems_fatal().
Constraints

The following constraints apply to this directive:

  • The directive may be called from within any runtime context.
  • The directive will not return to the caller.
  • The directive invokes the fatal error extensions in extension forward order.
  • The directive does not invoke handlers registered by atexit() or on_exit().
  • The directive may terminate the system.

◆ rtems_fatal_source_text()

const char * rtems_fatal_source_text ( rtems_fatal_source  fatal_source)

Returns a descriptive text for the fatal source.

Parameters
fatal_sourceis the fatal source.
Return values
?The fatal_source parameter value was not a fatal source.
Returns
Returns a descriptive text for the fatal source. The text for the fatal source is the enumerator constant name.
Constraints

The following constraints apply to this directive:

  • The directive may be called from within any runtime context.

◆ rtems_internal_error_text()

const char * rtems_internal_error_text ( rtems_fatal_code  internal_error_code)

Returns a descriptive text for the internal error code.

Parameters
internal_error_codeis the internal error code.
Return values
?The internal_error_code parameter value was not an internal error code.
Returns
Returns a descriptive text for the internal error code. The text for the internal error code is the enumerator constant name.
Constraints

The following constraints apply to this directive:

  • The directive may be called from within any runtime context.

◆ RTEMS_PRINTFLIKE()

RTEMS_NO_RETURN RTEMS_PRINTFLIKE ( ,
 
) const

Prints the message and invokes the fatal error handler.

Parameters
fmtis the message format.
...is a list of optional parameters required by the message format.

This directive prints a message via printk() specified by the fmt parameter and optional parameters and then invokes the fatal error handler. The fatal source is set to RTEMS_FATAL_SOURCE_PANIC. The fatal code is set to the value of the fmt parameter value.

Constraints

The following constraints apply to this directive:

  • The directive may be called from within any runtime context.
  • The directive will not return to the caller.
  • The directive invokes the fatal error extensions in extension forward order.
  • The directive does not invoke handlers registered by atexit() or on_exit().
  • The directive may terminate the system.

◆ rtems_shutdown_executive()

RTEMS_NO_RETURN void rtems_shutdown_executive ( uint32_t  fatal_code)

Invokes the fatal error handler.

Parameters
fatal_codeis the fatal code.

This directive processes fatal errors. The fatal source is set to RTEMS_FATAL_SOURCE_EXIT. The fatal code is set to the value of the fatal_code parameter.

Constraints

The following constraints apply to this directive:

  • The directive may be called from within any runtime context.
  • The directive will not return to the caller.
  • The directive invokes the fatal error extensions in extension forward order.
  • The directive does not invoke handlers registered by atexit() or on_exit().
  • The directive may terminate the system.