]>
git.saurik.com Git - apple/xnu.git/blob - libkern/libkern/OSReturn.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
26 * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
33 * Core IOReturn values. Others may be family defined.
36 #ifndef __LIBKERN_OSRETURN_H
37 #define __LIBKERN_OSRETURN_H
39 #include <sys/cdefs.h>
43 #include <mach/error.h>
45 typedef kern_return_t OSReturn
;
48 #define sys_libkern err_system(0x37)
49 #endif /* sys_libkern */
51 #define sub_libkern_common err_sub(0)
52 #define sub_libkern_metaclass err_sub(1)
53 #define sub_libkern_reserved err_sub(-1)
55 #define libkern_common_err(return) \
56 (sys_libkern|sub_libkern_common|(return))
57 #define libkern_metaclass_err(return) \
58 (sys_libkern|sub_libkern_metaclass|(return))
60 #define kOSReturnSuccess KERN_SUCCESS // OK
61 #define kOSReturnError libkern_common_err(1) // general error
64 // OSMetaClass subsystem error's
65 #define kOSMetaClassInternal libkern_metaclass_err(1) // runtime internal error
66 #define kOSMetaClassHasInstances libkern_metaclass_err(2) // Can't unload outstanding instances
67 #define kOSMetaClassNoInit libkern_metaclass_err(3) // kmodInitializeLoad wasn't called, runtime internal error
68 #define kOSMetaClassNoTempData libkern_metaclass_err(4) // Allocation failure internal data
69 #define kOSMetaClassNoDicts libkern_metaclass_err(5) // Allocation failure for Metaclass internal dictionaries
70 #define kOSMetaClassNoKModSet libkern_metaclass_err(6) // Allocation failure for internal kmodule set
71 #define kOSMetaClassNoInsKModSet libkern_metaclass_err(7) // Can't insert the KMod set into the module dictionary
72 #define kOSMetaClassNoSuper libkern_metaclass_err(8) // Can't associate a class with its super class
73 #define kOSMetaClassInstNoSuper libkern_metaclass_err(9) // During instance construction can't find a super class
74 #define kOSMetaClassDuplicateClass libkern_metaclass_err(10) // Found class duplicate during module load
78 #endif /* ! __LIBKERN_OSRETURN_H */