FreeBSD/Linux Kernel Cross Reference
sys/kern/syscall_sw.h
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 Software.Distribution@CS.CMU.EDU
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 * HISTORY
28 * $Log: syscall_sw.h,v $
29 * Revision 2.5 91/05/14 16:47:55 mrt
30 * Correcting copyright
31 *
32 * Revision 2.4 91/02/05 17:29:50 mrt
33 * Changed to new Mach copyright
34 * [91/02/01 16:18:48 mrt]
35 *
36 * Revision 2.3 91/01/08 15:17:29 rpd
37 * Added mach_trap_stack, MACH_TRAP_STACK.
38 * [90/12/18 rpd]
39 *
40 * Revision 2.2 90/06/02 14:56:34 rpd
41 * Converted to new IPC.
42 * [90/03/26 22:21:08 rpd]
43 *
44 * Revision 2.1 89/08/03 15:46:55 rwd
45 * Created.
46 *
47 * 7-Mar-89 David Golub (dbg) at Carnegie-Mellon University
48 * Moved user-visible definitions to mach/syscall_sw.h.
49 *
50 * 28-Oct-88 David Golub (dbg) at Carnegie-Mellon University
51 * Removed all non-MACH calls and options. Changed
52 * argument-list-size field in mach_trap_table to be the number of
53 * arguments.
54 *
55 * Revision 2.4 88/10/27 10:48:53 rpd
56 * Changed msg_{send,receive,rpc}_trap to 20, 21, 22.
57 * [88/10/26 14:45:13 rpd]
58 *
59 * Revision 2.3 88/10/11 10:21:04 rpd
60 * Changed traps msg_send, msg_receive_, msg_rpc_ to
61 * msg_send_old, msg_receive_old, msg_rpc_old.
62 * Added msg_send_trap, msg_receive_trap, msg_rpc_trap.
63 * [88/10/06 12:24:33 rpd]
64 *
65 * 20-Apr-88 David Black (dlb) at Carnegie-Mellon University
66 * Removed thread_times().
67 *
68 * 18-Jan-88 David Golub (dbg) at Carnegie-Mellon University
69 * Replaced task_data with thread_reply; change is invisible to
70 * users. Carried over Mary Thompson's change below:
71 *
72 * Mary Thompson (originally made 19-May-87 in /usr/mach/include)
73 * Went back to old msg_receive_ and msg_rpc_ traps
74 * so that the library would work with the standard kernels
75 *
76 * 01-Mar-88 Douglas Orr (dorr) at Carnegie-Mellon University
77 * Add htg_unix_syscall
78 *
79 * 15-May-87 Avadis Tevanian (avie) at Carnegie-Mellon University
80 * LOCORE -> ASSEMBLER. Removed unnecessary conditional
81 * compilation (assumes MACH to the full extent).
82 *
83 * 8-Apr-87 Michael Young (mwyoung) at Carnegie-Mellon University
84 * Change name for "msg_receive" to "msg_receive_", to enable user
85 * library to loop looking for software interrupt condition.
86 * Same for msg_rpc.
87 *
88 * 30-Mar-87 David Black (dlb) at Carnegie-Mellon University
89 * Added kern_timestamp()
90 *
91 * 27-Mar-87 David Black (dlb) at Carnegie-Mellon University
92 * Added thread_times for MACH_TIME_NEW. Flushed MACH_TIME.
93 *
94 * 25-Mar-87 Avadis Tevanian (avie) at Carnegie-Mellon University
95 * Added map_fd, deleted DEFUNCT code.
96 *
97 * 18-Feb-87 Robert Baron (rvb) at Carnegie-Mellon University
98 * Added # args to the kernel_trap() macro.
99 * Balance needs to know # of args passed to trap routine
100 *
101 * 4-Feb-87 Michael Young (mwyoung) at Carnegie-Mellon University
102 * Added ctimes().
103 *
104 * 7-Nov-86 Michael Young (mwyoung) at Carnegie-Mellon University
105 * Added "init_process".
106 *
107 * 4-Nov-86 Michael Young (mwyoung) at Carnegie-Mellon University
108 * Removed some old Accent calls; they should be supplanted by
109 * library conversion routines to Mach calls.
110 *
111 * 29-Oct-86 Michael Young (mwyoung) at Carnegie-Mellon University
112 * Put swtch under MACH_MP; added inode_swap_preference.
113 *
114 * 12-Oct-86 Michael Young (mwyoung) at Carnegie-Mellon University
115 * Added traps for msg_send, msg_receive, msg_rpc, under
116 * either MACH_ACC or MACH_IPC. Removed unused calls.
117 * Restructured and renamed trap table.
118 *
119 * 1-Sep-86 Michael Young (mwyoung) at Carnegie-Mellon University
120 * Moved stuff from user source directory back here, and into
121 * <machine/syscall_sw.h>. It's only natural that the kernel
122 * sources describe what traps exist, and how they're made.
123 */
124
125 #ifndef _KERN_SYSCALL_SW_H_
126 #define _KERN_SYSCALL_SW_H_
127
128 /*
129 * mach_trap_stack indicates the trap may discard
130 * its kernel stack. Some architectures may need
131 * to save more state in the pcb for these traps.
132 */
133
134 typedef struct {
135 int mach_trap_arg_count;
136 int (*mach_trap_function)();
137 boolean_t mach_trap_stack;
138 int mach_trap_unused;
139 } mach_trap_t;
140
141 extern mach_trap_t mach_trap_table[];
142 extern int mach_trap_count;
143
144 #define MACH_TRAP(name, arg_count) \
145 { (arg_count), (int (*)()) (name), FALSE, 0 }
146 #define MACH_TRAP_STACK(name, arg_count) \
147 { (arg_count), (int (*)()) (name), TRUE, 0 }
148
149 #endif _KERN_SYSCALL_SW_H_
Cache object: 670e4ebf9011304acc6974fbc4de152b
|