]>
git.saurik.com Git - apple/xnu.git/blob - libkern/libkern/OSReturn.h
a001e3dce4b56334e4d569e706e975382aaa6507
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
31 * Core IOReturn values. Others may be family defined.
34 #ifndef __LIBKERN_OSRETURN_H
35 #define __LIBKERN_OSRETURN_H
37 #include <sys/cdefs.h>
41 #include <mach/error.h>
43 typedef kern_return_t OSReturn
;
46 #define sys_libkern err_system(0x37)
47 #endif /* sys_libkern */
49 #define sub_libkern_common err_sub(0)
50 #define sub_libkern_metaclass err_sub(1)
51 #define sub_libkern_reserved err_sub(-1)
53 #define libkern_common_err(return) \
54 (sys_libkern|sub_libkern_common|(return))
55 #define libkern_metaclass_err(return) \
56 (sys_libkern|sub_libkern_metaclass|(return))
58 #define kOSReturnSuccess KERN_SUCCESS // OK
59 #define kOSReturnError libkern_common_err(1) // general error
62 // OSMetaClass subsystem error's
63 #define kOSMetaClassInternal libkern_metaclass_err(1) // runtime internal error
64 #define kOSMetaClassHasInstances libkern_metaclass_err(2) // Can't unload outstanding instances
65 #define kOSMetaClassNoInit libkern_metaclass_err(3) // kmodInitializeLoad wasn't called, runtime internal error
66 #define kOSMetaClassNoTempData libkern_metaclass_err(4) // Allocation failure internal data
67 #define kOSMetaClassNoDicts libkern_metaclass_err(5) // Allocation failure for Metaclass internal dictionaries
68 #define kOSMetaClassNoKModSet libkern_metaclass_err(6) // Allocation failure for internal kmodule set
69 #define kOSMetaClassNoInsKModSet libkern_metaclass_err(7) // Can't insert the KMod set into the module dictionary
70 #define kOSMetaClassNoSuper libkern_metaclass_err(8) // Can't associate a class with its super class
71 #define kOSMetaClassInstNoSuper libkern_metaclass_err(9) // During instance construction can't find a super class
72 #define kOSMetaClassDuplicateClass libkern_metaclass_err(10) // Found class duplicate during module load
76 #endif /* ! __LIBKERN_OSRETURN_H */