RTEMS 6.1-rc7
Loading...
Searching...
No Matches
fatal.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
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 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/fatal/if/header */
55
56#ifndef _RTEMS_FATAL_H
57#define _RTEMS_FATAL_H
58
59#include <stdint.h>
60#include <rtems/extension.h>
62#include <rtems/score/cpu.h>
63#include <rtems/score/interr.h>
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69/* Generated from spec:/rtems/fatal/if/group */
70
81/* Generated from spec:/rtems/fatal/if/assert-context */
82
88typedef struct {
93 const char *file;
94
99 int line;
100
105 const char *function;
106
111 const char *failed_expression;
113
114/* Generated from spec:/rtems/fatal/if/exception-frame */
115
122
123/* Generated from spec:/rtems/fatal/if/fatal */
124
155RTEMS_NO_RETURN static inline void rtems_fatal(
156 rtems_fatal_source fatal_source,
157 rtems_fatal_code fatal_code
158)
159{
160 _Terminate( fatal_source, fatal_code );
161}
162
163/* Generated from spec:/rtems/fatal/if/panic */
164
196RTEMS_NO_RETURN RTEMS_PRINTFLIKE( 1, 2 ) void rtems_panic(
197 const char *fmt,
198 ...
199);
200
201/* Generated from spec:/rtems/fatal/if/exception-frame-print */
202
213static inline void rtems_exception_frame_print(
214 const rtems_exception_frame *frame
215)
216{
218}
219
220/* Generated from spec:/rtems/fatal/if/source-text */
221
241const char *rtems_fatal_source_text( rtems_fatal_source fatal_source );
242
243/* Generated from spec:/rtems/fatal/if/internal-error-text */
244
265const char *rtems_internal_error_text( rtems_fatal_code internal_error_code );
266
267/* Generated from spec:/rtems/fatal/if/error-occurred */
268
302RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t fatal_code );
303
304#ifdef __cplusplus
305}
306#endif
307
308#endif /* _RTEMS_FATAL_H */
This header file provides basic definitions used by the API and the implementation.
This header file defines the User Extensions Manager API.
#define RTEMS_NO_RETURN
Tells the compiler in a function declaration that this function does not return.
Definition: basedefs.h:386
#define RTEMS_PRINTFLIKE(_format_pos, _ap_pos)
Tells the compiler in a declaration that this function expects printf()-like arguments.
Definition: basedefs.h:772
const char * rtems_fatal_source_text(rtems_fatal_source fatal_source)
Returns a descriptive text for the fatal source.
Definition: fatalsrctext.c:61
RTEMS_NO_RETURN void rtems_fatal_error_occurred(uint32_t fatal_code)
Invokes the fatal error handler.
Definition: fatal.c:47
CPU_Exception_frame rtems_exception_frame
This structure represents an architecture-dependent exception frame.
Definition: fatal.h:121
const char * rtems_internal_error_text(rtems_fatal_code internal_error_code)
Returns a descriptive text for the internal error code.
Definition: interrtext.c:92
Internal_errors_t rtems_fatal_code
This integer type represents system termination codes.
Definition: extension.h:162
void _CPU_Exception_frame_print(const CPU_Exception_frame *frame)
Prints the exception frame via printk().
Definition: vectorexceptions.c:64
Internal_errors_Source
This type lists the possible sources from which an error can be reported.
Definition: interr.h:63
RTEMS_NO_RETURN void _Terminate(Internal_errors_Source the_source, Internal_errors_t the_error)
Initiates the system termination.
Definition: interr.c:51
This header file provides the interfaces of the Internal Error Handler.
The set of registers that specifies the complete processor state.
Definition: cpu.h:446
This structure provides the context in which an assertion failed.
Definition: fatal.h:88
const char * file
This member provides the file name of the source code file containing the failed assertion statement.
Definition: fatal.h:93
int line
This member provides the line number in the source code file containing the failed assertion statemen...
Definition: fatal.h:99
const char * function
This member provides the function name containing the failed assertion statement.
Definition: fatal.h:105
const char * failed_expression
This member provides the expression of the failed assertion statement.
Definition: fatal.h:111