OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rtems-20020807/] [doc/] [new_chapters/] [error.t] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@c
2
@c  COPYRIGHT (c) 1988-2002.
3
@c  On-Line Applications Research Corporation (OAR).
4
@c  All rights reserved.
5
@c
6
@c  error.t,v 1.3 2002/01/17 21:47:45 joel Exp
7
@c
8
 
9
@chapter Error Reporting Support
10
 
11
@section Introduction
12
 
13
These error reporting facilities are an RTEMS support
14
component that provide convenient facilities for handling
15
error conditions in an RTEMS application.
16
of each task using a period.  The services provided by the error
17
reporting support component are:
18
 
19
@itemize @bullet
20
@item @code{rtems_error} - Report an Error
21
@item @code{rtems_panic} - Report an Error and Panic
22
@item @code{rtems_status_text} - ASCII Version of RTEMS Status
23
@end itemize
24
 
25
@section Background
26
 
27
@subsection Error Handling in an Embedded System
28
 
29
Error handling in an embedded system is a difficult problem.  If the error
30
is severe, then the only recourse is to shut the system down in a safe
31
manner.  Other errors can be detected and compensated for.  The
32
error reporting routines in this support component -- @code{rtems_error}
33
and @code{rtems_panic} assume that if the error is severe enough,
34
then the system should be shutdown.  If a simple shutdown with
35
some basic diagnostic information is not sufficient, then
36
these routines should not be used in that particular system.  In this case,
37
use the @code{rtems_status_text} routine to construct an application
38
specific error reporting routine.
39
 
40
@section Operations
41
 
42
@subsection Reporting an Error
43
 
44
The @code{rtems_error} and @code{rtems_panic} routines
45
can be used to print some diagnostic information and
46
shut the system down.  The @code{rtems_error} routine
47
is invoked with a user specified error level indicator.
48
This error indicator is used to determine if the system
49
should be shutdown after reporting this error.
50
 
51
@section Routines
52
 
53
This section details the error reporting support compenent's routine.
54
A subsection is dedicated to each of this manager's routines
55
and describes the calling sequence, related constants, usage,
56
and status codes.
57
 
58
@page
59
@subsection rtems_status_text - ASCII Version of RTEMS Status
60
 
61
@subheading CALLING SEQUENCE:
62
 
63
@ifset is-C
64
@example
65
const char *rtems_status_text(
66
  rtems_status_code status
67
);
68
@end example
69
@end ifset
70
 
71
@ifset is-Ada
72
@example
73
An Ada interface is not currently available.
74
@end example
75
@end ifset
76
 
77
@subheading STATUS CODES:
78
 
79
Returns a pointer to a constant string that describes the given
80
RTEMS status code.
81
 
82
@subheading DESCRIPTION:
83
 
84
This routine returns a pointer to a string that describes
85
the RTEMS status code specified by @code{status}.
86
 
87
@subheading NOTES:
88
 
89
NONE
90
 
91
@page
92
@subsection rtems_error - Report an Error
93
 
94
@subheading CALLING SEQUENCE:
95
 
96
@ifset is-C
97
@example
98
int rtems_error(
99
  int         error_code,
100
  const char *printf_format,
101
  ...
102
);
103
@end example
104
@end ifset
105
 
106
@ifset is-Ada
107
@example
108
An Ada interface is not currently available.
109
@end example
110
@end ifset
111
 
112
@subheading STATUS CODES:
113
 
114
Returns the number of characters written.
115
 
116
@subheading DESCRIPTION:
117
 
118
This routine prints the requested information as specified by the
119
@code{printf_format} parameter and the zero or more optional arguments
120
following that parameter.  The @code{error_code} parameter is an error
121
number with either @code{RTEMS_ERROR_PANIC} or @code{RTEMS_ERROR_ABORT}
122
bitwise or'ed with it.  If the @code{RTEMS_ERROR_PANIC} bit is set, then
123
then the system is system is shutdown via a call to @code{_exit}.
124
If the @code{RTEMS_ERROR_ABORT} bit is set, then
125
then the system is system is shutdown via a call to @code{abort}.
126
 
127
@subheading NOTES:
128
 
129
NONE
130
 
131
@page
132
@subsection rtems_panic - Report an Error and Panic
133
 
134
@subheading CALLING SEQUENCE:
135
 
136
@ifset is-C
137
@example
138
int rtems_panic(
139
   const char *printf_format,
140
   ...
141
);
142
@end example
143
@end ifset
144
 
145
@ifset is-Ada
146
@example
147
An Ada interface is not currently available.
148
@end example
149
@end ifset
150
 
151
@subheading STATUS CODES:
152
 
153
Returns the number of characters written.
154
 
155
@subheading DESCRIPTION:
156
 
157
This routine is a wrapper for the @code{rtems_error} routine with
158
an implied error level of @code{RTEMS_ERROR_PANIC}.  See
159
@code{rtems_error} for more information.
160
 
161
@subheading NOTES:
162
 
163
NONE
164
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.