]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
37839358 A |
6 | * The contents of this file constitute Original Code as defined in and |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
1c79356b | 11 | * |
37839358 A |
12 | * This Original Code and all software distributed under the License are |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
37839358 A |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
1c79356b A |
19 | * |
20 | * @APPLE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | /* | |
23 | * @OSF_COPYRIGHT@ | |
24 | */ | |
25 | /* | |
26 | * Mach Operating System | |
27 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | |
28 | * All Rights Reserved. | |
29 | * | |
30 | * Permission to use, copy, modify and distribute this software and its | |
31 | * documentation is hereby granted, provided that both the copyright | |
32 | * notice and this permission notice appear in all copies of the | |
33 | * software, derivative works or modified versions, and any portions | |
34 | * thereof, and that both notices appear in supporting documentation. | |
35 | * | |
36 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
37 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
38 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
39 | * | |
40 | * Carnegie Mellon requests users of this software to return to | |
41 | * | |
42 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
43 | * School of Computer Science | |
44 | * Carnegie Mellon University | |
45 | * Pittsburgh PA 15213-3890 | |
46 | * | |
47 | * any improvements or extensions that they make and grant Carnegie Mellon | |
48 | * the rights to redistribute these changes. | |
49 | */ | |
50 | /* | |
51 | */ | |
52 | /* | |
53 | * File: h/kern_return.h | |
54 | * Author: Avadis Tevanian, Jr. | |
55 | * Date: 1985 | |
56 | * | |
57 | * Kernel return codes. | |
58 | * | |
59 | */ | |
60 | ||
61 | #ifndef _MACH_KERN_RETURN_H_ | |
62 | #define _MACH_KERN_RETURN_H_ | |
63 | ||
64 | #include <mach/machine/kern_return.h> | |
65 | ||
1c79356b A |
66 | #define KERN_SUCCESS 0 |
67 | ||
68 | #define KERN_INVALID_ADDRESS 1 | |
69 | /* Specified address is not currently valid. | |
70 | */ | |
71 | ||
72 | #define KERN_PROTECTION_FAILURE 2 | |
73 | /* Specified memory is valid, but does not permit the | |
74 | * required forms of access. | |
75 | */ | |
76 | ||
77 | #define KERN_NO_SPACE 3 | |
78 | /* The address range specified is already in use, or | |
79 | * no address range of the size specified could be | |
80 | * found. | |
81 | */ | |
82 | ||
83 | #define KERN_INVALID_ARGUMENT 4 | |
84 | /* The function requested was not applicable to this | |
85 | * type of argument, or an argument is invalid | |
86 | */ | |
87 | ||
88 | #define KERN_FAILURE 5 | |
89 | /* The function could not be performed. A catch-all. | |
90 | */ | |
91 | ||
92 | #define KERN_RESOURCE_SHORTAGE 6 | |
93 | /* A system resource could not be allocated to fulfill | |
94 | * this request. This failure may not be permanent. | |
95 | */ | |
96 | ||
97 | #define KERN_NOT_RECEIVER 7 | |
98 | /* The task in question does not hold receive rights | |
99 | * for the port argument. | |
100 | */ | |
101 | ||
102 | #define KERN_NO_ACCESS 8 | |
103 | /* Bogus access restriction. | |
104 | */ | |
105 | ||
106 | #define KERN_MEMORY_FAILURE 9 | |
107 | /* During a page fault, the target address refers to a | |
108 | * memory object that has been destroyed. This | |
109 | * failure is permanent. | |
110 | */ | |
111 | ||
112 | #define KERN_MEMORY_ERROR 10 | |
113 | /* During a page fault, the memory object indicated | |
114 | * that the data could not be returned. This failure | |
115 | * may be temporary; future attempts to access this | |
116 | * same data may succeed, as defined by the memory | |
117 | * object. | |
118 | */ | |
119 | ||
120 | #define KERN_ALREADY_IN_SET 11 | |
121 | /* The receive right is already a member of the portset. | |
122 | */ | |
123 | ||
124 | #define KERN_NOT_IN_SET 12 | |
125 | /* The receive right is not a member of a port set. | |
126 | */ | |
127 | ||
128 | #define KERN_NAME_EXISTS 13 | |
129 | /* The name already denotes a right in the task. | |
130 | */ | |
131 | ||
132 | #define KERN_ABORTED 14 | |
133 | /* The operation was aborted. Ipc code will | |
134 | * catch this and reflect it as a message error. | |
135 | */ | |
136 | ||
137 | #define KERN_INVALID_NAME 15 | |
138 | /* The name doesn't denote a right in the task. | |
139 | */ | |
140 | ||
141 | #define KERN_INVALID_TASK 16 | |
142 | /* Target task isn't an active task. | |
143 | */ | |
144 | ||
145 | #define KERN_INVALID_RIGHT 17 | |
146 | /* The name denotes a right, but not an appropriate right. | |
147 | */ | |
148 | ||
149 | #define KERN_INVALID_VALUE 18 | |
150 | /* A blatant range error. | |
151 | */ | |
152 | ||
153 | #define KERN_UREFS_OVERFLOW 19 | |
154 | /* Operation would overflow limit on user-references. | |
155 | */ | |
156 | ||
157 | #define KERN_INVALID_CAPABILITY 20 | |
158 | /* The supplied (port) capability is improper. | |
159 | */ | |
160 | ||
161 | #define KERN_RIGHT_EXISTS 21 | |
162 | /* The task already has send or receive rights | |
163 | * for the port under another name. | |
164 | */ | |
165 | ||
166 | #define KERN_INVALID_HOST 22 | |
167 | /* Target host isn't actually a host. | |
168 | */ | |
169 | ||
170 | #define KERN_MEMORY_PRESENT 23 | |
171 | /* An attempt was made to supply "precious" data | |
172 | * for memory that is already present in a | |
173 | * memory object. | |
174 | */ | |
175 | ||
176 | #define KERN_MEMORY_DATA_MOVED 24 | |
177 | /* A page was requested of a memory manager via | |
178 | * memory_object_data_request for an object using | |
179 | * a MEMORY_OBJECT_COPY_CALL strategy, with the | |
180 | * VM_PROT_WANTS_COPY flag being used to specify | |
181 | * that the page desired is for a copy of the | |
182 | * object, and the memory manager has detected | |
183 | * the page was pushed into a copy of the object | |
184 | * while the kernel was walking the shadow chain | |
185 | * from the copy to the object. This error code | |
186 | * is delivered via memory_object_data_error | |
187 | * and is handled by the kernel (it forces the | |
188 | * kernel to restart the fault). It will not be | |
189 | * seen by users. | |
190 | */ | |
191 | ||
192 | #define KERN_MEMORY_RESTART_COPY 25 | |
193 | /* A strategic copy was attempted of an object | |
194 | * upon which a quicker copy is now possible. | |
195 | * The caller should retry the copy using | |
196 | * vm_object_copy_quickly. This error code | |
197 | * is seen only by the kernel. | |
198 | */ | |
199 | ||
200 | #define KERN_INVALID_PROCESSOR_SET 26 | |
201 | /* An argument applied to assert processor set privilege | |
202 | * was not a processor set control port. | |
203 | */ | |
204 | ||
205 | #define KERN_POLICY_LIMIT 27 | |
206 | /* The specified scheduling attributes exceed the thread's | |
207 | * limits. | |
208 | */ | |
209 | ||
210 | #define KERN_INVALID_POLICY 28 | |
211 | /* The specified scheduling policy is not currently | |
212 | * enabled for the processor set. | |
213 | */ | |
214 | ||
215 | #define KERN_INVALID_OBJECT 29 | |
216 | /* The external memory manager failed to initialize the | |
217 | * memory object. | |
218 | */ | |
219 | ||
220 | #define KERN_ALREADY_WAITING 30 | |
221 | /* A thread is attempting to wait for an event for which | |
222 | * there is already a waiting thread. | |
223 | */ | |
224 | ||
225 | #define KERN_DEFAULT_SET 31 | |
226 | /* An attempt was made to destroy the default processor | |
227 | * set. | |
228 | */ | |
229 | ||
230 | #define KERN_EXCEPTION_PROTECTED 32 | |
231 | /* An attempt was made to fetch an exception port that is | |
232 | * protected, or to abort a thread while processing a | |
233 | * protected exception. | |
234 | */ | |
235 | ||
236 | #define KERN_INVALID_LEDGER 33 | |
237 | /* A ledger was required but not supplied. | |
238 | */ | |
239 | ||
240 | #define KERN_INVALID_MEMORY_CONTROL 34 | |
241 | /* The port was not a memory cache control port. | |
242 | */ | |
243 | ||
244 | #define KERN_INVALID_SECURITY 35 | |
245 | /* An argument supplied to assert security privilege | |
246 | * was not a host security port. | |
247 | */ | |
248 | ||
249 | #define KERN_NOT_DEPRESSED 36 | |
250 | /* thread_depress_abort was called on a thread which | |
251 | * was not currently depressed. | |
252 | */ | |
253 | ||
254 | #define KERN_TERMINATED 37 | |
255 | /* Object has been terminated and is no longer available | |
256 | */ | |
257 | ||
258 | #define KERN_LOCK_SET_DESTROYED 38 | |
259 | /* Lock set has been destroyed and is no longer available. | |
260 | */ | |
261 | ||
262 | #define KERN_LOCK_UNSTABLE 39 | |
263 | /* The thread holding the lock terminated before releasing | |
264 | * the lock | |
265 | */ | |
266 | ||
267 | #define KERN_LOCK_OWNED 40 | |
268 | /* The lock is already owned by another thread | |
269 | */ | |
270 | ||
271 | #define KERN_LOCK_OWNED_SELF 41 | |
272 | /* The lock is already owned by the calling thread | |
273 | */ | |
274 | ||
275 | #define KERN_SEMAPHORE_DESTROYED 42 | |
276 | /* Semaphore has been destroyed and is no longer available. | |
277 | */ | |
278 | ||
279 | #define KERN_RPC_SERVER_TERMINATED 43 | |
280 | /* Return from RPC indicating the target server was | |
281 | * terminated before it successfully replied | |
282 | */ | |
283 | ||
284 | #define KERN_RPC_TERMINATE_ORPHAN 44 | |
285 | /* Terminate an orphaned activation. | |
286 | */ | |
287 | ||
288 | #define KERN_RPC_CONTINUE_ORPHAN 45 | |
289 | /* Allow an orphaned activation to continue executing. | |
290 | */ | |
291 | ||
292 | #define KERN_NOT_SUPPORTED 46 | |
293 | /* Empty thread activation (No thread linked to it) | |
294 | */ | |
295 | ||
296 | #define KERN_NODE_DOWN 47 | |
297 | /* Remote node down or inaccessible. | |
298 | */ | |
299 | ||
300 | #define KERN_NOT_WAITING 48 | |
301 | /* A signalled thread was not actually waiting. */ | |
302 | ||
303 | #define KERN_OPERATION_TIMED_OUT 49 | |
304 | /* Some thread-oriented operation (semaphore_wait) timed out | |
305 | */ | |
306 | ||
307 | #define KERN_RETURN_MAX 0x100 | |
308 | /* Maximum return value allowable | |
309 | */ | |
310 | ||
311 | #endif /* _MACH_KERN_RETURN_H_ */ |