summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-22 11:41:37 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-03-09 16:34:15 +0100
commit17681fbd3df300b73bedb85711c6eb9ff8fa22ad (patch)
tree323a1abe0c3063c07bb82d80370896c38c8ba676
parent30290ca9d03f58f28e4fde63bf15dcc656f221a3 (diff)
rtems: Generate <rtems/fatal.h>
Change license to BSD-2-Clause according to file histories and documentation re-licensing agreement. Update #3899. Update #3993.
-rw-r--r--cpukit/include/rtems/fatal.h189
1 files changed, 135 insertions, 54 deletions
diff --git a/cpukit/include/rtems/fatal.h b/cpukit/include/rtems/fatal.h
index 228e7462e0..aa8ceec4c7 100644
--- a/cpukit/include/rtems/fatal.h
+++ b/cpukit/include/rtems/fatal.h
@@ -1,57 +1,146 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
- * @brief Fatal API.
+ * @brief This header file defines the Fatal Error Manager API.
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
/*
- * COPYRIGHT (c) 1989-2011.
- * On-Line Applications Research Corporation (OAR).
+ * This file is part of the RTEMS quality process and was automatically
+ * generated. If you find something that needs to be fixed or
+ * worded better please post a report or patch to an RTEMS mailing list
+ * or raise a bug report:
+ *
+ * https://www.rtems.org/bugs.html
+ *
+ * For information on updating and regenerating please refer to the How-To
+ * section in the Software Requirements Engineering chapter of the
+ * RTEMS Software Engineering manual. The manual is provided as a part of
+ * a release. For development sources please refer to the online
+ * documentation at:
*
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
+ * https://docs.rtems.org
*/
+/* Generated from spec:/rtems/fatal/if/header */
+
#ifndef _RTEMS_FATAL_H
#define _RTEMS_FATAL_H
-#include <rtems/score/basedefs.h>
+#include <stdint.h>
#include <rtems/extension.h>
+#include <rtems/score/basedefs.h>
+#include <rtems/score/cpu.h>
+#include <rtems/score/interr.h>
#ifdef __cplusplus
extern "C" {
#endif
+/* Generated from spec:/rtems/fatal/if/group */
+
/**
- * @defgroup ClassicFatal Fatal
+ * @defgroup RTEMSAPIClassicFatal Fatal Error Manager
*
* @ingroup RTEMSAPIClassic
*
- * @brief The Fatal Manager provides functions for fatal system states and or
- * irrecoverable errors.
+ * @brief The Fatal Error Manager processes all fatal or irrecoverable errors
+ * and other sources of system termination (for example after ``exit()``).
+ * Fatal errors are identified by the fatal source and error code pair.
*/
-/**@{**/
+
+/* Generated from spec:/rtems/fatal/if/assert-context */
/**
- * @brief Assert context.
+ * @ingroup RTEMSAPIClassicFatal
+ *
+ * @brief %
*/
typedef struct {
+ /**
+ * @brief This member is
+ *
+ * %
+ */
const char *file;
- int line;
+
+ /**
+ * @brief This member is
+ *
+ * %
+ */
+ int line;
+
+ /**
+ * @brief This member is
+ *
+ * %
+ */
const char *function;
+
+ /**
+ * @brief This member is
+ *
+ * %
+ */
const char *failed_expression;
} rtems_assert_context;
+/* Generated from spec:/rtems/fatal/if/error-occurred */
+
/**
- * @brief Exception frame.
+ * @ingroup RTEMSAPIClassicFatal
+ *
+ * @brief %
+ *
+ * @param the_error %
+ */
+RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t the_error );
+
+/* Generated from spec:/rtems/fatal/if/exception-frame */
+
+/**
+ * @ingroup RTEMSAPIClassicFatal
+ *
+ * @brief %
*/
typedef CPU_Exception_frame rtems_exception_frame;
+/* Generated from spec:/rtems/fatal/if/exception-frame-print */
+
/**
- * @brief Prints the exception frame via printk().
+ * @ingroup RTEMSAPIClassicFatal
*
- * @see rtems_fatal() and RTEMS_FATAL_SOURCE_EXCEPTION.
+ * @brief %
+ *
+ * @param frame %
*/
static inline void rtems_exception_frame_print(
const rtems_exception_frame *frame
@@ -60,25 +149,18 @@ static inline void rtems_exception_frame_print(
_CPU_Exception_frame_print( frame );
}
-/**
- * @brief Invokes the internal error handler with a source of
- * INTERNAL_ERROR_RTEMS_API and is internal set to false.
- *
- * @param[in] the_error is a 32-bit fatal error code.
- *
- * @see _Terminate().
- */
-RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t the_error );
+/* Generated from spec:/rtems/fatal/if/fatal */
/**
- * @brief Terminates the system.
+ * @ingroup RTEMSAPIClassicFatal
+ *
+ * @brief %
*
- * @param[in] fatal_source The fatal source.
- * @param[in] error_code The error code.
+ * @param fatal_source %
*
- * @see _Terminate().
+ * @param error_code %
*/
-RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal(
+RTEMS_NO_RETURN static inline void rtems_fatal(
rtems_fatal_source fatal_source,
rtems_fatal_code error_code
)
@@ -86,47 +168,46 @@ RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal(
_Terminate( fatal_source, error_code );
}
+/* Generated from spec:/rtems/fatal/if/internal-error-text */
+
/**
- * @brief Prints the specified message via printk() and terminates the system.
+ * @ingroup RTEMSAPIClassicFatal
*
- * @param[in] fmt The message format.
- * @param[in] ... The message parameters.
+ * @brief %
*
- * @see _Terminate().
+ * @param error %
*/
-RTEMS_NO_RETURN void rtems_panic(
- const char *fmt, ...
-) RTEMS_PRINTFLIKE( 1, 2 );
+const char *rtems_internal_error_text( rtems_fatal_code error );
+
+/* Generated from spec:/rtems/fatal/if/panic */
/**
- * @brief Returns a text for a fatal source.
+ * @ingroup RTEMSAPIClassicFatal
*
- * The text for each fatal source is the enumerator constant.
+ * @brief %
*
- * @param[in] source is the fatal source.
+ * @param fmt %
*
- * @retval text The fatal source text.
- * @retval "?" The passed fatal source is invalid.
+ * @param ... %
*/
-const char *rtems_fatal_source_text( rtems_fatal_source source );
+RTEMS_NO_RETURN RTEMS_PRINTFLIKE( 1, 2 ) void rtems_panic(
+ const char *fmt,
+ ...
+);
+
+/* Generated from spec:/rtems/fatal/if/source-text */
/**
- * @brief Returns a text for an internal error code.
+ * @ingroup RTEMSAPIClassicFatal
*
- * The text for each internal error code is the enumerator constant.
+ * @brief %
*
- * @param[in] error is the error code.
- *
- * @retval text The error code text.
- * @retval "?" The passed error code is invalid.
+ * @param source %
*/
-const char *rtems_internal_error_text( rtems_fatal_code error );
-
-/** @} */
+const char *rtems_fatal_source_text( rtems_fatal_source source );
#ifdef __cplusplus
}
#endif
-#endif
-/* end of include file */
+#endif /* _RTEMS_FATAL_H */