|
|
1.1 root 1: /*
2: * Mach Operating System
3: * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University.
4: * Copyright (c) 1993,1994 The University of Utah and
5: * the Computer Systems Laboratory (CSL).
6: * All rights reserved.
7: *
8: * Permission to use, copy, modify and distribute this software and its
9: * documentation is hereby granted, provided that both the copyright
10: * notice and this permission notice appear in all copies of the
11: * software, derivative works or modified versions, and any portions
12: * thereof, and that both notices appear in supporting documentation.
13: *
14: * CARNEGIE MELLON, THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF
15: * THIS SOFTWARE IN ITS "AS IS" CONDITION, AND DISCLAIM ANY LIABILITY
16: * OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF
17: * THIS SOFTWARE.
18: *
19: * Carnegie Mellon requests users of this software to return to
20: *
21: * Software Distribution Coordinator or [email protected]
22: * School of Computer Science
23: * Carnegie Mellon University
24: * Pittsburgh PA 15213-3890
25: *
26: * any improvements or extensions that they make and grant Carnegie Mellon
27: * the rights to redistribute these changes.
28: */
29:
30: #ifndef _KERN_SYSCALL_EMULATION_H_
31: #define _KERN_SYSCALL_EMULATION_H_
32:
33: #ifndef ASSEMBLER
34: #include <mach/machine/vm_types.h>
35: #include <kern/lock.h>
36:
37: typedef vm_offset_t eml_routine_t;
38:
39: typedef struct eml_dispatch {
40: decl_simple_lock_data(, lock) /* lock for reference count */
41: int ref_count; /* reference count */
42: int disp_count; /* count of entries in vector */
43: int disp_min; /* index of lowest entry in vector */
44: eml_routine_t disp_vector[1]; /* first entry in array of dispatch */
45: /* routines (array has disp_count */
46: /* elements) */
47: } *eml_dispatch_t;
48:
49: typedef vm_offset_t *emulation_vector_t; /* Variable-length array */
50:
51: #define EML_ROUTINE_NULL (eml_routine_t)0
52: #define EML_DISPATCH_NULL (eml_dispatch_t)0
53:
54: #define EML_SUCCESS (0)
55:
56: #define EML_MOD (err_kern|err_sub(2))
57: #define EML_BAD_TASK (EML_MOD|0x0001)
58: #define EML_BAD_CNT (EML_MOD|0x0002)
59: #endif /* ASSEMBLER */
60:
61: #endif /* _KERN_SYSCALL_EMULATION_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.