RTEMS: cpukit/include/rtems/fatal.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
fatal.h
Go to the documentation of this file.
1
7/*
8 * COPYRIGHT (c) 1989-2011.
9 * On-Line Applications Research Corporation (OAR).
10 *
11 * The license and distribution terms for this file may be
12 * found in the file LICENSE in this distribution or at
13 * http://www.rtems.org/license/LICENSE.
14 */
15
16#ifndef _RTEMS_FATAL_H
17#define _RTEMS_FATAL_H
18
19#include <rtems/score/basedefs.h> /* RTEMS_NO_RETURN */
20#include <rtems/extension.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
39 typedef struct {
40 const char *file;
41 int line;
42 const char *function;
43 const char *failed_expression;
44} rtems_assert_context;
45
49 typedef CPU_Exception_frame rtems_exception_frame;
50
56static inline void rtems_exception_frame_print(
57 const rtems_exception_frame *frame
58)
59{
60 _CPU_Exception_frame_print( frame );
61}
62
71void rtems_fatal_error_occurred(
72 uint32_t the_error
73) RTEMS_NO_RETURN;
74
83 RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal(
84 rtems_fatal_source fatal_source,
85 rtems_fatal_code error_code
86)
87{
88 _Terminate( fatal_source, error_code );
89}
90
99 RTEMS_NO_RETURN void rtems_panic(
100 const char *fmt, ...
101) RTEMS_PRINTFLIKE( 1, 2 );
102
113const char *rtems_fatal_source_text( rtems_fatal_source source );
114
125const char *rtems_internal_error_text( rtems_fatal_code error );
126
129#ifdef __cplusplus
130}
131#endif
132
133#endif
134/* end of include file */
basedefs.h
Basic Definitions.
extension.h
User Extensions API.
rtems_fatal_source_text
RTEMS_NO_RETURN void const char * rtems_fatal_source_text(rtems_fatal_source source)
Returns a text for a fatal source.
Definition: fatalsrctext.c:46
rtems_fatal
RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal(rtems_fatal_source fatal_source, rtems_fatal_code error_code)
Terminates the system.
Definition: fatal.h:83
rtems_exception_frame
CPU_Exception_frame rtems_exception_frame
Exception frame.
Definition: fatal.h:49
rtems_panic
RTEMS_NO_RETURN void rtems_panic(const char *fmt,...) RTEMS_PRINTFLIKE(1
Prints the specified message via printk() and terminates the system.
rtems_internal_error_text
const char * rtems_internal_error_text(rtems_fatal_code error)
Returns a text for an internal error code.
Definition: interrtext.c:73
rtems_fatal_error_occurred
void rtems_fatal_error_occurred(uint32_t the_error) RTEMS_NO_RETURN
Invokes the internal error handler with a source of INTERNAL_ERROR_RTEMS_API and is internal set to f...
Definition: fatal.c:28
RTEMS_NO_RETURN
#define RTEMS_NO_RETURN
Definition: basedefs.h:102
RTEMS_PRINTFLIKE
#define RTEMS_PRINTFLIKE(_format_pos, _ap_pos)
Tells the compiler that this function expects printf()-like arguments.
Definition: basedefs.h:249
RTEMS_INLINE_ROUTINE
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
_CPU_Exception_frame_print
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:45
_Terminate
void _Terminate(Internal_errors_Source the_source, Internal_errors_t the_error) RTEMS_NO_RETURN
Initiates system termination.
Definition: interr.c:31
Internal_errors_Source
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:47
CPU_Exception_frame
The set of registers that specifies the complete processor state.
Definition: cpu.h:629
file
Definition: mongoose.c:442
rtems_assert_context
Assert context.
Definition: fatal.h:39