1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989 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: device.defs,v $
29 * Revision 2.9 93/01/14 17:26:43 danner
30 * Flavors have a type of their own now.
31 * [92/11/30 af]
32 *
33 * Revision 2.8 92/01/03 20:03:29 dbg
34 * Add 'CountInOut' tag to routines returning variable-length
35 * inline arrays. Remove 'IsLong' tag from routines passing or
36 * returning variable-length arrays. Old routines left under
37 * 'xxx_' names. REMOVE THESE SOON!
38 * [91/11/26 dbg]
39 *
40 * Revision 2.7 91/05/14 15:41:53 mrt
41 * Correcting copyright
42 *
43 * Revision 2.6 91/02/05 17:08:50 mrt
44 * Changed to new Mach copyright
45 * [91/01/31 17:27:50 mrt]
46 *
47 * Revision 2.5 90/06/02 14:47:25 rpd
48 * Changes for new IPC.
49 * [90/05/03 00:13:46 rpd]
50 *
51 * 29-Jun-88 Michael Young (mwyoung) at Carnegie-Mellon University
52 * Moved data type declarations to "mach_types.defs".
53 *
54 * 10-Feb-88 Douglas Orr (dorr) at Carnegie-Mellon University
55 * Created.
56 *
57 */
58 /*
59 /*
60 * File: device/device.defs
61 * Author: Douglas Orr
62 * Feb 10, 1988
63 * Abstract:
64 * Mach device support. Mach devices are accessed through
65 * block and character device interfaces to the kernel.
66 */
67
68 #ifdef KERNEL
69 simport <kern/compat_xxx_defs.h>; /* for obsolete routines */
70 #endif KERNEL
71
72 subsystem
73 #if KERNEL_SERVER
74 KernelServer
75 #endif KERNEL_SERVER
76 device 2800;
77
78 #include <mach/std_types.defs>
79 #include <mach/mach_types.defs>
80 #include <device/device_types.defs>
81
82 serverprefix ds_;
83
84 type reply_port_t = MACH_MSG_TYPE_MAKE_SEND_ONCE | polymorphic
85 ctype: mach_port_t;
86
87 routine device_open(
88 master_port : mach_port_t;
89 sreplyport reply_port : reply_port_t;
90 mode : dev_mode_t;
91 name : dev_name_t;
92 out device : device_t
93 );
94
95 routine device_close(
96 device : device_t
97 );
98
99 routine device_write(
100 device : device_t;
101 sreplyport reply_port : reply_port_t;
102 in mode : dev_mode_t;
103 in recnum : recnum_t;
104 in data : io_buf_ptr_t;
105 out bytes_written : int
106 );
107
108 routine device_write_inband(
109 device : device_t;
110 sreplyport reply_port : reply_port_t;
111 in mode : dev_mode_t;
112 in recnum : recnum_t;
113 in data : io_buf_ptr_inband_t;
114 out bytes_written : int
115 );
116
117 routine device_read(
118 device : device_t;
119 sreplyport reply_port : reply_port_t;
120 in mode : dev_mode_t;
121 in recnum : recnum_t;
122 in bytes_wanted : int;
123 out data : io_buf_ptr_t
124 );
125
126 routine device_read_inband(
127 device : device_t;
128 sreplyport reply_port : reply_port_t;
129 in mode : dev_mode_t;
130 in recnum : recnum_t;
131 in bytes_wanted : int;
132 out data : io_buf_ptr_inband_t
133 );
134
135 /* obsolete */
136 routine xxx_device_set_status(
137 device : device_t;
138 in flavor : dev_flavor_t;
139 in status : dev_status_t, IsLong
140 );
141
142 /* obsolete */
143 routine xxx_device_get_status(
144 device : device_t;
145 in flavor : dev_flavor_t;
146 out status : dev_status_t, IsLong
147 );
148
149 /* obsolete */
150 routine xxx_device_set_filter(
151 device : device_t;
152 in receive_port : mach_port_send_t;
153 in priority : int;
154 in filter : filter_array_t, IsLong
155 );
156
157 routine device_map(
158 device : device_t;
159 in prot : vm_prot_t;
160 in offset : vm_offset_t;
161 in size : vm_size_t;
162 out pager : memory_object_t;
163 in unmap : int
164 );
165
166 routine device_set_status(
167 device : device_t;
168 in flavor : dev_flavor_t;
169 in status : dev_status_t
170 );
171
172 routine device_get_status(
173 device : device_t;
174 in flavor : dev_flavor_t;
175 out status : dev_status_t, CountInOut
176 );
177
178 routine device_set_filter(
179 device : device_t;
180 in receive_port : mach_port_send_t;
181 in priority : int;
182 in filter : filter_array_t
183 );
184
Cache object: a1e9f7b55c971780acdaeb94caf1f641
|