]>
git.saurik.com Git - apple/xnu.git/blob - libkern/libkern/OSReturn.h
d0e9aeb8b7c01195fe621f1e8dcda565347721a8
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
38 * Core IOReturn values. Others may be family defined.
41 #ifndef __LIBKERN_OSRETURN_H
42 #define __LIBKERN_OSRETURN_H
44 #include <sys/cdefs.h>
48 #include <mach/error.h>
50 typedef kern_return_t OSReturn
;
53 #define sys_libkern err_system(0x37)
54 #endif /* sys_libkern */
56 #define sub_libkern_common err_sub(0)
57 #define sub_libkern_metaclass err_sub(1)
58 #define sub_libkern_reserved err_sub(-1)
60 #define libkern_common_err(return) \
61 (sys_libkern|sub_libkern_common|(return))
62 #define libkern_metaclass_err(return) \
63 (sys_libkern|sub_libkern_metaclass|(return))
65 #define kOSReturnSuccess KERN_SUCCESS // OK
66 #define kOSReturnError libkern_common_err(1) // general error
69 // OSMetaClass subsystem error's
70 #define kOSMetaClassInternal libkern_metaclass_err(1) // runtime internal error
71 #define kOSMetaClassHasInstances libkern_metaclass_err(2) // Can't unload outstanding instances
72 #define kOSMetaClassNoInit libkern_metaclass_err(3) // kmodInitializeLoad wasn't called, runtime internal error
73 #define kOSMetaClassNoTempData libkern_metaclass_err(4) // Allocation failure internal data
74 #define kOSMetaClassNoDicts libkern_metaclass_err(5) // Allocation failure for Metaclass internal dictionaries
75 #define kOSMetaClassNoKModSet libkern_metaclass_err(6) // Allocation failure for internal kmodule set
76 #define kOSMetaClassNoInsKModSet libkern_metaclass_err(7) // Can't insert the KMod set into the module dictionary
77 #define kOSMetaClassNoSuper libkern_metaclass_err(8) // Can't associate a class with its super class
78 #define kOSMetaClassInstNoSuper libkern_metaclass_err(9) // During instance construction can't find a super class
79 #define kOSMetaClassDuplicateClass libkern_metaclass_err(10) // Found class duplicate during module load
83 #endif /* ! __LIBKERN_OSRETURN_H */