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>2020-09-22 10:06:05 +0200
commit24e6580eda34425bc6ab5a8d207eacfcacc6d003 (patch)
tree85eac944824e982a0cb18aebdefe881d73098f7a
parent05cd043cb6835e0cea010da86c7d04eb7ca49a1c (diff)
Generate <rtems/fatal.h>
-rw-r--r--cpukit/include/rtems/fatal.h167
1 files changed, 110 insertions, 57 deletions
diff --git a/cpukit/include/rtems/fatal.h b/cpukit/include/rtems/fatal.h
index 3fc6a89a78..0d644cfbd7 100644
--- a/cpukit/include/rtems/fatal.h
+++ b/cpukit/include/rtems/fatal.h
@@ -1,57 +1,128 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
- * @brief Fatal API.
+ * @ingroup RTEMSAPIClassicFatal
+ *
+ * @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 was automatically generated. Do not edit it manually.
+ * Please have a look at
+ *
+ * https://docs.rtems.org/branches/master/eng/req/howto.html
*
- * 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.
+ * for information how to maintain and re-generate this file.
*/
#ifndef _RTEMS_FATAL_H
#define _RTEMS_FATAL_H
-#include <rtems/score/basedefs.h> /* RTEMS_NO_RETURN */
+#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
/**
- * @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.
*/
-/**@{**/
/**
- * @brief Assert context.
+ * @ingroup RTEMSAPIClassicFatal
+ *
+ * @brief %
+ */
+typedef CPU_Exception_frame rtems_exception_frame;
+
+/**
+ * @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;
/**
- * @brief Exception frame.
+ * @ingroup RTEMSAPIClassicFatal
+ *
+ * @brief %
+ *
+ * @param the_error %
*/
-typedef CPU_Exception_frame rtems_exception_frame;
+RTEMS_NO_RETURN void rtems_fatal_error_occurred( uint32_t the_error );
/**
- * @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
@@ -61,26 +132,15 @@ static inline void rtems_exception_frame_print(
}
/**
- * @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.
+ * @ingroup RTEMSAPIClassicFatal
*
- * @see _Terminate().
- */
-void rtems_fatal_error_occurred(
- uint32_t the_error
-) RTEMS_NO_RETURN;
-
-/**
- * @brief Terminates the system.
+ * @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(
+static inline RTEMS_NO_RETURN void rtems_fatal(
rtems_fatal_source fatal_source,
rtems_fatal_code error_code
)
@@ -89,46 +149,39 @@ RTEMS_NO_RETURN RTEMS_INLINE_ROUTINE void rtems_fatal(
}
/**
- * @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 );
/**
- * @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,
+ ...
+);
/**
- * @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 */