|
|
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:
1.1.1.3 root 33: #ifndef __ASSEMBLER__
1.1 root 34: #include <mach/machine/vm_types.h>
35: #include <kern/lock.h>
1.1.1.4 ! root 36: #include <kern/task.h>
1.1 root 37:
38: typedef vm_offset_t eml_routine_t;
39:
40: typedef struct eml_dispatch {
41: decl_simple_lock_data(, lock) /* lock for reference count */
42: int ref_count; /* reference count */
43: int disp_count; /* count of entries in vector */
44: int disp_min; /* index of lowest entry in vector */
45: eml_routine_t disp_vector[1]; /* first entry in array of dispatch */
46: /* routines (array has disp_count */
47: /* elements) */
48: } *eml_dispatch_t;
49:
50: typedef vm_offset_t *emulation_vector_t; /* Variable-length array */
51:
52: #define EML_ROUTINE_NULL (eml_routine_t)0
53: #define EML_DISPATCH_NULL (eml_dispatch_t)0
54:
55: #define EML_SUCCESS (0)
56:
57: #define EML_MOD (err_kern|err_sub(2))
58: #define EML_BAD_TASK (EML_MOD|0x0001)
59: #define EML_BAD_CNT (EML_MOD|0x0002)
1.1.1.4 ! root 60:
! 61: extern void eml_init(void);
! 62: extern void eml_task_reference(task_t task, task_t parent);
! 63: extern void eml_task_deallocate(task_t task);
! 64:
1.1.1.3 root 65: #endif /* __ASSEMBLER__ */
1.1 root 66:
1.1.1.2 root 67: #endif /* _KERN_SYSCALL_EMULATION_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.