1 |
30 |
unneback |
/* status.h
|
2 |
|
|
*
|
3 |
|
|
* This include file contains the status codes returned from the
|
4 |
|
|
* executive directives.
|
5 |
|
|
*
|
6 |
|
|
* COPYRIGHT (c) 1989-1999.
|
7 |
|
|
* On-Line Applications Research Corporation (OAR).
|
8 |
|
|
*
|
9 |
|
|
* The license and distribution terms for this file may be
|
10 |
|
|
* found in the file LICENSE in this distribution or at
|
11 |
|
|
* http://www.OARcorp.com/rtems/license.html.
|
12 |
|
|
*
|
13 |
|
|
* $Id: status.h,v 1.2 2001-09-27 11:59:18 chris Exp $
|
14 |
|
|
*/
|
15 |
|
|
|
16 |
|
|
#ifndef __RTEMS_STATUS_h
|
17 |
|
|
#define __RTEMS_STATUS_h
|
18 |
|
|
|
19 |
|
|
#ifdef __cplusplus
|
20 |
|
|
extern "C" {
|
21 |
|
|
#endif
|
22 |
|
|
|
23 |
|
|
/* types */
|
24 |
|
|
|
25 |
|
|
/* enumerated constants */
|
26 |
|
|
|
27 |
|
|
typedef enum {
|
28 |
|
|
RTEMS_SUCCESSFUL = 0, /* successful completion */
|
29 |
|
|
RTEMS_TASK_EXITTED = 1, /* returned from a thread */
|
30 |
|
|
RTEMS_MP_NOT_CONFIGURED = 2, /* multiprocessing not configured */
|
31 |
|
|
RTEMS_INVALID_NAME = 3, /* invalid object name */
|
32 |
|
|
RTEMS_INVALID_ID = 4, /* invalid object id */
|
33 |
|
|
RTEMS_TOO_MANY = 5, /* too many */
|
34 |
|
|
RTEMS_TIMEOUT = 6, /* timed out waiting */
|
35 |
|
|
RTEMS_OBJECT_WAS_DELETED = 7, /* object deleted while waiting */
|
36 |
|
|
RTEMS_INVALID_SIZE = 8, /* specified size was invalid */
|
37 |
|
|
RTEMS_INVALID_ADDRESS = 9, /* address specified is invalid */
|
38 |
|
|
RTEMS_INVALID_NUMBER = 10, /* number was invalid */
|
39 |
|
|
RTEMS_NOT_DEFINED = 11, /* item has not been initialized */
|
40 |
|
|
RTEMS_RESOURCE_IN_USE = 12, /* resources still outstanding */
|
41 |
|
|
RTEMS_UNSATISFIED = 13, /* request not satisfied */
|
42 |
|
|
RTEMS_INCORRECT_STATE = 14, /* thread is in wrong state */
|
43 |
|
|
RTEMS_ALREADY_SUSPENDED = 15, /* thread already in state */
|
44 |
|
|
RTEMS_ILLEGAL_ON_SELF = 16, /* illegal on calling thread */
|
45 |
|
|
RTEMS_ILLEGAL_ON_REMOTE_OBJECT = 17, /* illegal for remote object */
|
46 |
|
|
RTEMS_CALLED_FROM_ISR = 18, /* called from wrong environment */
|
47 |
|
|
RTEMS_INVALID_PRIORITY = 19, /* invalid thread priority */
|
48 |
|
|
RTEMS_INVALID_CLOCK = 20, /* invalid date/time */
|
49 |
|
|
RTEMS_INVALID_NODE = 21, /* invalid node id */
|
50 |
|
|
RTEMS_NOT_CONFIGURED = 22, /* directive not configured */
|
51 |
|
|
RTEMS_NOT_OWNER_OF_RESOURCE = 23, /* not owner of resource */
|
52 |
|
|
RTEMS_NOT_IMPLEMENTED = 24, /* directive not implemented */
|
53 |
|
|
RTEMS_INTERNAL_ERROR = 25, /* RTEMS inconsistency detected */
|
54 |
|
|
RTEMS_NO_MEMORY = 26, /* could not get enough memory */
|
55 |
|
|
RTEMS_IO_ERROR = 27, /* driver IO error */
|
56 |
|
|
RTEMS_PROXY_BLOCKING = 28 /* internal error only */
|
57 |
|
|
} rtems_status_code;
|
58 |
|
|
|
59 |
|
|
#define RTEMS_STATUS_CODES_FIRST RTEMS_SUCCESSFUL
|
60 |
|
|
#define RTEMS_STATUS_CODES_LAST RTEMS_PROXY_BLOCKING
|
61 |
|
|
|
62 |
|
|
extern rtems_status_code _Status_Object_name_errors_to_status[];
|
63 |
|
|
|
64 |
|
|
#ifdef RTEMS_API_INIT
|
65 |
|
|
rtems_status_code _Status_Object_name_errors_to_status[] = {
|
66 |
|
|
RTEMS_SUCCESSFUL, /* OBJECTS_SUCCESSFUL */
|
67 |
|
|
RTEMS_INVALID_NAME, /* OBJECTS_INVALID_NAME */
|
68 |
|
|
RTEMS_INVALID_NODE /* OBJECTS_INVALID_NODE */
|
69 |
|
|
};
|
70 |
|
|
#endif
|
71 |
|
|
|
72 |
|
|
/*
|
73 |
|
|
* Applications are allowed to use the macros to compare status codes.
|
74 |
|
|
*/
|
75 |
|
|
|
76 |
|
|
#include <rtems/rtems/status.inl>
|
77 |
|
|
|
78 |
|
|
#ifdef __cplusplus
|
79 |
|
|
}
|
80 |
|
|
#endif
|
81 |
|
|
|
82 |
|
|
#endif
|
83 |
|
|
/* end of include file */
|