RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
39typedef struct {
40 const char *file;
41 int line;
42 const char *function;
43 const char *failed_expression;
45
50
56static inline void rtems_exception_frame_print(
57 const rtems_exception_frame *frame
58)
59{
61}
62
72 uint32_t the_error
74
84 rtems_fatal_source fatal_source,
85 rtems_fatal_code error_code
86)
87{
88 _Terminate( fatal_source, error_code );
89}
90
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 */
Basic Definitions.
User Extensions API.
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_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
CPU_Exception_frame rtems_exception_frame
Exception frame.
Definition: fatal.h:49
RTEMS_NO_RETURN void rtems_panic(const char *fmt,...) RTEMS_PRINTFLIKE(1
Prints the specified message via printk() and terminates the system.
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
#define RTEMS_NO_RETURN
Definition: basedefs.h:102
#define RTEMS_PRINTFLIKE(_format_pos, _ap_pos)
Tells the compiler that this function expects printf()-like arguments.
Definition: basedefs.h:249
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:45
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
This type lists the possible sources from which an error can be reported.
Definition: interr.h:47
The set of registers that specifies the complete processor state.
Definition: cpu.h:629
Definition: mongoose.c:442
Assert context.
Definition: fatal.h:39