RTEMS  5.0.0
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
23 extern "C" {
24 #endif
25 
39 typedef struct {
40  const char *file;
41  int line;
42  const char *function;
43  const char *failed_expression;
45 
50 
56 static inline void rtems_exception_frame_print(
57  const rtems_exception_frame *frame
58 )
59 {
61 }
62 
72  uint32_t the_error
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 
113 const char *rtems_fatal_source_text( rtems_fatal_source source );
114 
125 const char *rtems_internal_error_text( rtems_fatal_code error );
126 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif
134 /* end of include file */
const char * rtems_internal_error_text(rtems_fatal_code error)
Returns a text for an internal error code.
Definition: interrtext.c:73
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
Assert context.
Definition: fatal.h:39
RTEMS_NO_RETURN void rtems_panic(const char *fmt,...) RTEMS_PRINTFLIKE(1
Prints the specified message via printk() and terminates the system.
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
void _Terminate(Internal_errors_Source the_source, Internal_errors_t the_error) RTEMS_NO_RETURN
Initiates system termination.
Definition: interr.c:30
RTEMS_NO_RETURN void const char * rtems_fatal_source_text(rtems_fatal_source source)
Returns a text for a fatal source.
Definition: fatalsrctext.c:45
User Extensions API.
CPU_Exception_frame rtems_exception_frame
Exception frame.
Definition: fatal.h:49
#define RTEMS_NO_RETURN
Definition: basedefs.h:101
#define RTEMS_PRINTFLIKE(_format_pos, _ap_pos)
Tells the compiler that this function expects printf()-like arguments.
Definition: basedefs.h:237
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
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:45
Basic Definitions.
The set of registers that specifies the complete processor state.
Definition: cpu.h:635
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:42
Definition: mongoose.c:442