RTEMS: cpukit/include/rtems/rtems/status.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
status.h
Go to the documentation of this file.
1
10/* COPYRIGHT (c) 1989-2013.
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.org/license/LICENSE.
16 */
17
18#ifndef _RTEMS_RTEMS_STATUS_H
19#define _RTEMS_RTEMS_STATUS_H
20
21#include <rtems/score/basedefs.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
43 typedef enum {
47 RTEMS_SUCCESSFUL = 0,
51 RTEMS_TASK_EXITTED = 1,
55 RTEMS_MP_NOT_CONFIGURED = 2,
59 RTEMS_INVALID_NAME = 3,
63 RTEMS_INVALID_ID = 4,
68 RTEMS_TOO_MANY = 5,
72 RTEMS_TIMEOUT = 6,
77 RTEMS_OBJECT_WAS_DELETED = 7,
81 RTEMS_INVALID_SIZE = 8,
85 RTEMS_INVALID_ADDRESS = 9,
89 RTEMS_INVALID_NUMBER = 10,
93 RTEMS_NOT_DEFINED = 11,
98 RTEMS_RESOURCE_IN_USE = 12,
102 RTEMS_UNSATISFIED = 13,
107 RTEMS_INCORRECT_STATE = 14,
111 RTEMS_ALREADY_SUSPENDED = 15,
116 RTEMS_ILLEGAL_ON_SELF = 16,
120 RTEMS_ILLEGAL_ON_REMOTE_OBJECT = 17,
125 RTEMS_CALLED_FROM_ISR = 18,
130 RTEMS_INVALID_PRIORITY = 19,
134 RTEMS_INVALID_CLOCK = 20,
138 RTEMS_INVALID_NODE = 21,
142 RTEMS_NOT_CONFIGURED = 22,
147 RTEMS_NOT_OWNER_OF_RESOURCE = 23,
154 RTEMS_NOT_IMPLEMENTED = 24,
159 RTEMS_INTERNAL_ERROR = 25,
164 RTEMS_NO_MEMORY = 26,
168 RTEMS_IO_ERROR = 27,
174 RTEMS_INTERRUPTED = 28,
183 RTEMS_PROXY_BLOCKING = 29
184} rtems_status_code;
185
189#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
190
194#define RTEMS_STATUS_CODES_LAST RTEMS_PROXY_BLOCKING
195
202 RTEMS_INLINE_ROUTINE bool rtems_is_status_successful(
203 rtems_status_code code
204)
205{
206 return (code == RTEMS_SUCCESSFUL);
207}
208
215 RTEMS_INLINE_ROUTINE bool rtems_are_statuses_equal(
216 rtems_status_code code1,
217 rtems_status_code code2
218)
219{
220 return (code1 == code2);
221}
222
246int rtems_status_code_to_errno(rtems_status_code sc);
247
258const char *rtems_status_text( rtems_status_code code );
259
262#ifdef __cplusplus
263}
264#endif
265
266#endif
267/* end of include file */
basedefs.h
Basic Definitions.
rtems_are_statuses_equal
RTEMS_INLINE_ROUTINE bool rtems_are_statuses_equal(rtems_status_code code1, rtems_status_code code2)
Checks if the status code1 is equal to code2.
Definition: status.h:215
rtems_status_code
rtems_status_code
Classic API Status.
Definition: status.h:43
rtems_is_status_successful
RTEMS_INLINE_ROUTINE bool rtems_is_status_successful(rtems_status_code code)
Checks if the status code is equal to RTEMS_SUCCESSFUL.
Definition: status.h:202
rtems_status_code_to_errno
int rtems_status_code_to_errno(rtems_status_code sc)
RTEMS Status Code to Errno Mapping Function.
Definition: statustoerrno.c:52
rtems_status_text
const char * rtems_status_text(rtems_status_code code)
Returns a text for a status code.
Definition: statustext.c:60
RTEMS_TASK_EXITTED
@ RTEMS_TASK_EXITTED
Definition: status.h:51
RTEMS_CALLED_FROM_ISR
@ RTEMS_CALLED_FROM_ISR
Definition: status.h:125
RTEMS_INVALID_CLOCK
@ RTEMS_INVALID_CLOCK
Definition: status.h:134
RTEMS_INVALID_SIZE
@ RTEMS_INVALID_SIZE
Definition: status.h:81
RTEMS_UNSATISFIED
@ RTEMS_UNSATISFIED
Definition: status.h:102
RTEMS_PROXY_BLOCKING
@ RTEMS_PROXY_BLOCKING
Definition: status.h:183
RTEMS_INVALID_PRIORITY
@ RTEMS_INVALID_PRIORITY
Definition: status.h:130
RTEMS_ALREADY_SUSPENDED
@ RTEMS_ALREADY_SUSPENDED
Definition: status.h:111
RTEMS_ILLEGAL_ON_SELF
@ RTEMS_ILLEGAL_ON_SELF
Definition: status.h:116
RTEMS_INTERRUPTED
@ RTEMS_INTERRUPTED
Definition: status.h:174
RTEMS_INTERNAL_ERROR
@ RTEMS_INTERNAL_ERROR
Definition: status.h:159
RTEMS_MP_NOT_CONFIGURED
@ RTEMS_MP_NOT_CONFIGURED
Definition: status.h:55
RTEMS_INCORRECT_STATE
@ RTEMS_INCORRECT_STATE
Definition: status.h:107
RTEMS_NOT_DEFINED
@ RTEMS_NOT_DEFINED
Definition: status.h:93
RTEMS_TIMEOUT
@ RTEMS_TIMEOUT
Definition: status.h:72
RTEMS_RESOURCE_IN_USE
@ RTEMS_RESOURCE_IN_USE
Definition: status.h:98
RTEMS_INVALID_NODE
@ RTEMS_INVALID_NODE
Definition: status.h:138
RTEMS_SUCCESSFUL
@ RTEMS_SUCCESSFUL
Definition: status.h:47
RTEMS_ILLEGAL_ON_REMOTE_OBJECT
@ RTEMS_ILLEGAL_ON_REMOTE_OBJECT
Definition: status.h:120
RTEMS_INVALID_ADDRESS
@ RTEMS_INVALID_ADDRESS
Definition: status.h:85
RTEMS_NOT_CONFIGURED
@ RTEMS_NOT_CONFIGURED
Definition: status.h:142
RTEMS_NOT_OWNER_OF_RESOURCE
@ RTEMS_NOT_OWNER_OF_RESOURCE
Definition: status.h:147
RTEMS_NO_MEMORY
@ RTEMS_NO_MEMORY
Definition: status.h:164
RTEMS_NOT_IMPLEMENTED
@ RTEMS_NOT_IMPLEMENTED
Definition: status.h:154
RTEMS_TOO_MANY
@ RTEMS_TOO_MANY
Definition: status.h:68
RTEMS_IO_ERROR
@ RTEMS_IO_ERROR
Definition: status.h:168
RTEMS_OBJECT_WAS_DELETED
@ RTEMS_OBJECT_WAS_DELETED
Definition: status.h:77
RTEMS_INVALID_NAME
@ RTEMS_INVALID_NAME
Definition: status.h:59
RTEMS_INVALID_ID
@ RTEMS_INVALID_ID
Definition: status.h:63
RTEMS_INVALID_NUMBER
@ RTEMS_INVALID_NUMBER
Definition: status.h:89
RTEMS_INLINE_ROUTINE
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
code
Definition: inftrees.h:24