source: rtems/cpukit/sapi/include/rtems/fatal.h @ e2e5b492

4.115
Last change on this file since e2e5b492 was e2e5b492, checked in by Sebastian Huber <sebastian.huber@…>, on 11/14/12 at 08:51:41

score: Add rtems_fatal()

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicFatal
5 *
6 * @brief Fatal API.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2011.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 */
17
18#ifndef _RTEMS_FATAL_H
19#define _RTEMS_FATAL_H
20
21#include <rtems/score/basedefs.h> /* RTEMS_COMPILER_NO_RETURN_ATTRIBUTE */
22#include <rtems/extension.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**
29 * @defgroup ClassicFatal Fatal
30 *
31 * @ingroup ClassicRTEMS
32 *
33 * @brief The Fatal Manager provides functions for fatal system states and or
34 * irrecoverable errors.
35 *
36 * @{
37 */
38
39/**
40 * @brief Invokes the internal error handler with a source of
41 * INTERNAL_ERROR_RTEMS_API and is internal set to false.
42 *
43 * @param[in] the_error A 32-bit fatal error code.
44 *
45 * @return This function will not return.
46 *
47 * @see _Internal_error_Occurred().
48 */
49void rtems_fatal_error_occurred(
50  uint32_t   the_error
51) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
52
53/**
54 * @brief Invokes the internal error handler with is internal set to false.
55 *
56 * @param[in] source The fatal source.
57 * @param[in] error The fatal code.
58 *
59 * @return This function will not return.
60 *
61 * @see _Internal_error_Occurred().
62 */
63void rtems_fatal(
64  rtems_fatal_source source,
65  rtems_fatal_code error
66) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
67
68/**
69 * @brief Returns a description for an internal error code.
70 *
71 * @param[in] error The error code.
72 *
73 * @return The error code description or "?" in case the passed error code is
74 * invalid.
75 */
76const char *rtems_internal_error_description( rtems_fatal_code error );
77
78/** @} */
79
80#ifdef __cplusplus
81}
82#endif
83
84#endif
85/* end of include file */
Note: See TracBrowser for help on using the repository browser.