1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: kern_return.h,v $
29 * Revision 2.6 93/01/14 17:43:03 danner
30 * Cleanup.
31 * [92/06/10 pds]
32 *
33 * Revision 2.5 91/05/14 16:54:08 mrt
34 * Correcting copyright
35 *
36 * Revision 2.4 91/02/05 17:33:06 mrt
37 * Changed to new Mach copyright
38 * [91/02/01 17:17:20 mrt]
39 *
40 * Revision 2.3 90/08/07 18:00:17 rpd
41 * Added KERN_MEMORY_PRESENT (not used yet).
42 * [90/08/06 rpd]
43 *
44 * Revision 2.2 90/06/02 14:58:03 rpd
45 * Added codes for new IPC.
46 * [90/03/26 22:30:08 rpd]
47 *
48 * Revision 2.1 89/08/03 16:02:22 rwd
49 * Created.
50 *
51 * Revision 2.6 89/02/25 18:13:36 gm0w
52 * Changes for cleanup.
53 *
54 * Revision 2.5 89/02/07 00:52:16 mwyoung
55 * Relocated from sys/kern_return.h
56 *
57 * Revision 2.4 88/08/24 02:31:47 mwyoung
58 * Adjusted include file references.
59 * [88/08/17 02:15:07 mwyoung]
60 *
61 * Revision 2.3 88/07/20 16:48:31 rpd
62 * Added KERN_NAME_EXISTS.
63 * Added KERN_ALREADY_IN_SET, KERN_NOT_IN_SET.
64 * Made comments legible.
65 *
66 * 3-Feb-88 Michael Young (mwyoung) at Carnegie-Mellon University
67 * Added memory management error conditions.
68 * Documented.
69 *
70 * 23-Feb-87 Avadis Tevanian (avie) at Carnegie-Mellon University
71 * Deleted kern_return_t casts on error codes so that they may be
72 * used in assembly code.
73 *
74 * 17-Sep-85 Avadis Tevanian (avie) at Carnegie-Mellon University
75 * Created.
76 */
77 /*
78 * File: h/kern_return.h
79 * Author: Avadis Tevanian, Jr.
80 * Date: 1985
81 *
82 * Kernel return codes.
83 *
84 */
85
86 #ifndef _MACH_KERN_RETURN_H_
87 #define _MACH_KERN_RETURN_H_
88
89 #include <mach/machine/kern_return.h>
90
91 #define KERN_SUCCESS 0
92
93 #define KERN_INVALID_ADDRESS 1
94 /* Specified address is not currently valid.
95 */
96
97 #define KERN_PROTECTION_FAILURE 2
98 /* Specified memory is valid, but does not permit the
99 * required forms of access.
100 */
101
102 #define KERN_NO_SPACE 3
103 /* The address range specified is already in use, or
104 * no address range of the size specified could be
105 * found.
106 */
107
108 #define KERN_INVALID_ARGUMENT 4
109 /* The function requested was not applicable to this
110 * type of argument, or an argument
111 */
112
113 #define KERN_FAILURE 5
114 /* The function could not be performed. A catch-all.
115 */
116
117 #define KERN_RESOURCE_SHORTAGE 6
118 /* A system resource could not be allocated to fulfill
119 * this request. This failure may not be permanent.
120 */
121
122 #define KERN_NOT_RECEIVER 7
123 /* The task in question does not hold receive rights
124 * for the port argument.
125 */
126
127 #define KERN_NO_ACCESS 8
128 /* Bogus access restriction.
129 */
130
131 #define KERN_MEMORY_FAILURE 9
132 /* During a page fault, the target address refers to a
133 * memory object that has been destroyed. This
134 * failure is permanent.
135 */
136
137 #define KERN_MEMORY_ERROR 10
138 /* During a page fault, the memory object indicated
139 * that the data could not be returned. This failure
140 * may be temporary; future attempts to access this
141 * same data may succeed, as defined by the memory
142 * object.
143 */
144
145 /* KERN_ALREADY_IN_SET 11 obsolete */
146
147 #define KERN_NOT_IN_SET 12
148 /* The receive right is not a member of a port set.
149 */
150
151 #define KERN_NAME_EXISTS 13
152 /* The name already denotes a right in the task.
153 */
154
155 #define KERN_ABORTED 14
156 /* The operation was aborted. Ipc code will
157 * catch this and reflect it as a message error.
158 */
159
160 #define KERN_INVALID_NAME 15
161 /* The name doesn't denote a right in the task.
162 */
163
164 #define KERN_INVALID_TASK 16
165 /* Target task isn't an active task.
166 */
167
168 #define KERN_INVALID_RIGHT 17
169 /* The name denotes a right, but not an appropriate right.
170 */
171
172 #define KERN_INVALID_VALUE 18
173 /* A blatant range error.
174 */
175
176 #define KERN_UREFS_OVERFLOW 19
177 /* Operation would overflow limit on user-references.
178 */
179
180 #define KERN_INVALID_CAPABILITY 20
181 /* The supplied (port) capability is improper.
182 */
183
184 #define KERN_RIGHT_EXISTS 21
185 /* The task already has send or receive rights
186 * for the port under another name.
187 */
188
189 #define KERN_INVALID_HOST 22
190 /* Target host isn't actually a host.
191 */
192
193 #define KERN_MEMORY_PRESENT 23
194 /* An attempt was made to supply "precious" data
195 * for memory that is already present in a
196 * memory object.
197 */
198
199 #endif /* _MACH_KERN_RETURN_H_ */
Cache object: f4ecaea03b936ff0553eff75206a07ca
|