|
|
1.1 ! root 1: /* ! 2: * Mach Operating System ! 3: * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University ! 4: * All Rights Reserved. ! 5: * ! 6: * Permission to use, copy, modify and distribute this software and its ! 7: * documentation is hereby granted, provided that both the copyright ! 8: * notice and this permission notice appear in all copies of the ! 9: * software, derivative works or modified versions, and any portions ! 10: * thereof, and that both notices appear in supporting documentation. ! 11: * ! 12: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" ! 13: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR ! 14: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 15: * ! 16: * Carnegie Mellon requests users of this software to return to ! 17: * ! 18: * Software Distribution Coordinator or [email protected] ! 19: * School of Computer Science ! 20: * Carnegie Mellon University ! 21: * Pittsburgh PA 15213-3890 ! 22: * ! 23: * any improvements or extensions that they make and grant Carnegie Mellon ! 24: * the rights to redistribute these changes. ! 25: */ ! 26: /* ! 27: * Mach Interface Generator errors ! 28: * ! 29: */ ! 30: ! 31: #ifndef _MACH_MIG_ERRORS_H_ ! 32: #define _MACH_MIG_ERRORS_H_ ! 33: ! 34: #ifdef MACH_KERNEL ! 35: #include <mach_ipc_compat.h> ! 36: #endif /* MACH_KERNEL */ ! 37: ! 38: #include <mach/kern_return.h> ! 39: #include <mach/message.h> ! 40: ! 41: /* ! 42: * These error codes should be specified as system 4, subsytem 2. ! 43: * But alas backwards compatibility makes that impossible. ! 44: * The problem is old clients of new servers (eg, the kernel) ! 45: * which get strange large error codes when there is a Mig problem ! 46: * in the server. Unfortunately, the IPC system doesn't have ! 47: * the knowledge to convert the codes in this situation. ! 48: */ ! 49: ! 50: #define MIG_TYPE_ERROR -300 /* client type check failure */ ! 51: #define MIG_REPLY_MISMATCH -301 /* wrong reply message ID */ ! 52: #define MIG_REMOTE_ERROR -302 /* server detected error */ ! 53: #define MIG_BAD_ID -303 /* bad request message ID */ ! 54: #define MIG_BAD_ARGUMENTS -304 /* server type check failure */ ! 55: #define MIG_NO_REPLY -305 /* no reply should be sent */ ! 56: #define MIG_EXCEPTION -306 /* server raised exception */ ! 57: #define MIG_ARRAY_TOO_LARGE -307 /* array not large enough */ ! 58: #define MIG_SERVER_DIED -308 /* server died */ ! 59: #define MIG_DESTROY_REQUEST -309 /* destroy request with no reply */ ! 60: ! 61: typedef struct { ! 62: mach_msg_header_t Head; ! 63: mach_msg_type_t RetCodeType; ! 64: kern_return_t RetCode; ! 65: } mig_reply_header_t; ! 66: ! 67: typedef struct mig_symtab { ! 68: char *ms_routine_name; ! 69: int ms_routine_number; ! 70: #if defined(__STDC__) || defined(c_plus_plus) || defined(hc) ! 71: void ! 72: #else ! 73: int ! 74: #endif ! 75: (*ms_routine)(); ! 76: } mig_symtab_t; ! 77: ! 78: /* ! 79: * Definition for server stub routines. These routines ! 80: * unpack the request message, call the server procedure, ! 81: * and pack the reply message. ! 82: */ ! 83: #if defined(__STDC__) || defined(c_plus_plus) ! 84: typedef void (*mig_routine_t)(mach_msg_header_t *, mach_msg_header_t *); ! 85: #else ! 86: #if defined(hc) ! 87: typedef void (*mig_routine_t)(); ! 88: #else ! 89: typedef int (*mig_routine_t)(); /* PCC cannot handle void (*)() */ ! 90: #endif ! 91: #endif ! 92: ! 93: /* Definitions for the old IPC interface. */ ! 94: ! 95: #if MACH_IPC_COMPAT ! 96: ! 97: typedef struct { ! 98: msg_header_t Head; ! 99: msg_type_t RetCodeType; ! 100: kern_return_t RetCode; ! 101: } death_pill_t; ! 102: ! 103: #endif /* MACH_IPC_COMPAT */ ! 104: ! 105: #endif /* _MACH_MIG_ERRORS_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.