RTEMS
fatal.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
11 /*
12  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
13  * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /*
38  * Do not manually edit this file. It is part of the RTEMS quality process
39  * and was automatically generated.
40  *
41  * If you find something that needs to be fixed or worded better please
42  * post a report to an RTEMS mailing list or raise a bug report:
43  *
44  * https://docs.rtems.org/branches/master/user/support/bugs.html
45  *
46  * For information on updating and regenerating please refer to:
47  *
48  * https://docs.rtems.org/branches/master/eng/req/howto.html
49  */
50 
51 /* Generated from spec:/rtems/fatal/if/header */
52 
53 #ifndef _RTEMS_FATAL_H
54 #define _RTEMS_FATAL_H
55 
56 #include <stdint.h>
57 #include <rtems/extension.h>
58 #include <rtems/score/basedefs.h>
59 #include <rtems/score/cpu.h>
60 #include <rtems/score/interr.h>
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
66 /* Generated from spec:/rtems/fatal/if/group */
67 
78 /* Generated from spec:/rtems/fatal/if/exception-frame */
79 
86 
87 /* Generated from spec:/rtems/fatal/if/assert-context */
88 
94 typedef struct {
100  const char *file;
101 
107  int line;
108 
114  const char *function;
115 
121  const char *failed_expression;
123 
124 /* Generated from spec:/rtems/fatal/if/error-occurred */
125 
133 RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t the_error );
134 
135 /* Generated from spec:/rtems/fatal/if/exception-frame-print */
136 
144 static inline void rtems_exception_frame_print(
145  const rtems_exception_frame *frame
146 )
147 {
148  _CPU_Exception_frame_print( frame );
149 }
150 
151 /* Generated from spec:/rtems/fatal/if/fatal */
152 
162 static inline RTEMS_NO_RETURN void rtems_fatal(
163  rtems_fatal_source fatal_source,
164  rtems_fatal_code error_code
165 )
166 {
167  _Terminate( fatal_source, error_code );
168 }
169 
170 /* Generated from spec:/rtems/fatal/if/internal-error-text */
171 
179 const char *rtems_internal_error_text( rtems_fatal_code error );
180 
181 /* Generated from spec:/rtems/fatal/if/panic */
182 
192 RTEMS_NO_RETURN RTEMS_PRINTFLIKE( 1, 2 ) void rtems_panic(
193  const char *fmt,
194  ...
195 );
196 
197 /* Generated from spec:/rtems/fatal/if/source-text */
198 
206 const char *rtems_fatal_source_text( rtems_fatal_source source );
207 
208 #ifdef __cplusplus
209 }
210 #endif
211 
212 #endif /* _RTEMS_FATAL_H */
Constants and Prototypes Related to the Internal Error Handler.
static void rtems_exception_frame_print(const rtems_exception_frame *frame)
%
Definition: fatal.h:144
static RTEMS_NO_RETURN void rtems_fatal(rtems_fatal_source fatal_source, rtems_fatal_code error_code)
%
Definition: fatal.h:162
const char * failed_expression
This member is.
Definition: fatal.h:121
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
const char * rtems_internal_error_text(rtems_fatal_code error)
%
#define RTEMS_NO_RETURN
Tells the compiler in a function declaration that this function does not return.
Definition: basedefs.h:207
This header file defines the User Extensions Manager API.
SPARC CPU Department Source.
RTEMS_NO_RETURN RTEMS_PRINTFLIKE(1, 2) void rtems_panic(const char *fmt
%
CPU_Exception_frame rtems_exception_frame
%
Definition: fatal.h:85
Internal_errors_t rtems_fatal_code
%
Definition: extension.h:132
RTEMS_NO_RETURN const char * rtems_fatal_source_text(rtems_fatal_source source)
%
const char * file
This member is.
Definition: fatal.h:100
This header file provides basic definitions used by the API and the implementation.
RTEMS_NO_RETURN void rtems_fatal_error_occurred(uint32_t the_error)
%
int line
This member is.
Definition: fatal.h:107