|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: /* ! 26: * Copyright (c) 1995, 1994, 1993, 1992, 1991, 1990 ! 27: * Open Software Foundation, Inc. ! 28: * ! 29: * Permission to use, copy, modify, and distribute this software and ! 30: * its documentation for any purpose and without fee is hereby granted, ! 31: * provided that the above copyright notice appears in all copies and ! 32: * that both the copyright notice and this permission notice appear in ! 33: * supporting documentation, and that the name of ("OSF") or Open Software ! 34: * Foundation not be used in advertising or publicity pertaining to ! 35: * distribution of the software without specific, written prior permission. ! 36: * ! 37: * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE ! 38: * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ! 39: * FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL OSF BE LIABLE FOR ANY ! 40: * SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ! 41: * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ! 42: * ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING ! 43: * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE ! 44: */ ! 45: /* ! 46: * OSF Research Institute MK6.1 (unencumbered) 1/31/1995 ! 47: */ ! 48: /* ! 49: * Mach Operating System ! 50: * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University ! 51: * All Rights Reserved. ! 52: * ! 53: * Permission to use, copy, modify and distribute this software and its ! 54: * documentation is hereby granted, provided that both the copyright ! 55: * notice and this permission notice appear in all copies of the ! 56: * software, derivative works or modified versions, and any portions ! 57: * thereof, and that both notices appear in supporting documentation. ! 58: * ! 59: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" ! 60: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR ! 61: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 62: * ! 63: * Carnegie Mellon requests users of this software to return to ! 64: * ! 65: * Software Distribution Coordinator or [email protected] ! 66: * School of Computer Science ! 67: * Carnegie Mellon University ! 68: * Pittsburgh PA 15213-3890 ! 69: * ! 70: * any improvements or extensions that they make and grant Carnegie Mellon ! 71: * the rights to redistribute these changes. ! 72: */ ! 73: /* ! 74: * File: mach/error.h ! 75: * Purpose: ! 76: * error module definitions ! 77: * ! 78: */ ! 79: ! 80: #ifndef _MACH_ERROR_H_ ! 81: #define _MACH_ERROR_H_ ! 82: #include <mach/kern_return.h> ! 83: ! 84: /* ! 85: * error number layout as follows: ! 86: * ! 87: * hi lo ! 88: * | system(6) | subsystem(12) | code(14) | ! 89: */ ! 90: ! 91: ! 92: #define err_none (mach_error_t)0 ! 93: #define ERR_SUCCESS (mach_error_t)0 ! 94: #define ERR_ROUTINE_NIL (mach_error_fn_t)0 ! 95: ! 96: ! 97: #define err_system(x) (((x)&0x3f)<<26) ! 98: #define err_sub(x) (((x)&0xfff)<<14) ! 99: ! 100: #define err_get_system(err) (((err)>>26)&0x3f) ! 101: #define err_get_sub(err) (((err)>>14)&0xfff) ! 102: #define err_get_code(err) ((err)&0x3fff) ! 103: ! 104: #define system_emask (err_system(0x3f)) ! 105: #define sub_emask (err_sub(0xfff)) ! 106: #define code_emask (0x3fff) ! 107: ! 108: ! 109: /* major error systems */ ! 110: #define err_kern err_system(0x0) /* kernel */ ! 111: #define err_us err_system(0x1) /* user space library */ ! 112: #define err_server err_system(0x2) /* user space servers */ ! 113: #define err_ipc err_system(0x3) /* old ipc errors */ ! 114: #define err_mach_ipc err_system(0x4) /* mach-ipc errors */ ! 115: #define err_local err_system(0x3e) /* user defined errors */ ! 116: #define err_ipc_compat err_system(0x3f) /* (compatibility) mach-ipc errors */ ! 117: ! 118: #define err_max_system 0x3f ! 119: ! 120: ! 121: /* unix errors get lumped into one subsystem */ ! 122: #define unix_err(errno) (err_kern|err_sub(3)|errno) ! 123: ! 124: typedef kern_return_t mach_error_t; ! 125: typedef mach_error_t (* mach_error_fn_t)( void ); ! 126: ! 127: #endif /* _MACH_ERROR_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.