|
|
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: #include <mach/kern_return.h>
35: #include <mach/message.h>
36:
37: /*
38: * These error codes should be specified as system 4, subsytem 2.
39: * But alas backwards compatibility makes that impossible.
40: * The problem is old clients of new servers (eg, the kernel)
41: * which get strange large error codes when there is a Mig problem
42: * in the server. Unfortunately, the IPC system doesn't have
43: * the knowledge to convert the codes in this situation.
44: */
45:
46: #define MIG_TYPE_ERROR -300 /* client type check failure */
47: #define MIG_REPLY_MISMATCH -301 /* wrong reply message ID */
48: #define MIG_REMOTE_ERROR -302 /* server detected error */
49: #define MIG_BAD_ID -303 /* bad request message ID */
50: #define MIG_BAD_ARGUMENTS -304 /* server type check failure */
51: #define MIG_NO_REPLY -305 /* no reply should be sent */
52: #define MIG_EXCEPTION -306 /* server raised exception */
53: #define MIG_ARRAY_TOO_LARGE -307 /* array not large enough */
54: #define MIG_SERVER_DIED -308 /* server died */
55: #define MIG_DESTROY_REQUEST -309 /* destroy request with no reply */
56:
57: typedef struct {
58: mach_msg_header_t Head;
59: mach_msg_type_t RetCodeType;
60: kern_return_t RetCode;
61: } mig_reply_header_t;
62:
63: typedef struct mig_symtab {
64: char *ms_routine_name;
65: int ms_routine_number;
66: #if defined(__STDC__) || defined(c_plus_plus) || defined(hc)
67: void
68: #else
69: int
70: #endif
71: (*ms_routine)();
72: } mig_symtab_t;
73:
74: /*
75: * Definition for server stub routines. These routines
76: * unpack the request message, call the server procedure,
77: * and pack the reply message.
78: */
79: #if defined(__STDC__) || defined(c_plus_plus)
80: typedef void (*mig_routine_t)(mach_msg_header_t *, mach_msg_header_t *);
81: #else
82: #if defined(hc)
83: typedef void (*mig_routine_t)();
84: #else
85: typedef int (*mig_routine_t)(); /* PCC cannot handle void (*)() */
86: #endif
87: #endif
88:
89: #endif /* _MACH_MIG_ERRORS_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.