|
|
1.1 root 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 [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: * Author: David B. Golub, Carnegie Mellon University
28: * Date: 8/89
29: *
30: * Reply-only side of device interface.
31: */
32:
33: subsystem
34: #if KERNEL_USER
35: KernelUser
36: #endif
37: device_reply 2900;
38: /* to match reply numbers for device.defs */
39:
40: /*
41: * Device_write_reply (only user of this data type) deallocates
42: * the data.
43: */
44:
45:
46: #include <mach/std_types.defs>
47: #include <device/device_types.defs>
48:
49: userprefix ds_;
50:
51: #if SEQNOS
52: serverprefix seqnos_;
53: serverdemux seqnos_device_reply_server;
54: #endif /* SEQNOS */
55:
56: type reply_port_t = polymorphic|MACH_MSG_TYPE_PORT_SEND_ONCE
57: ctype: mach_port_t;
58:
59: simpleroutine device_open_reply(
60: reply_port : reply_port_t;
61: #if SEQNOS
62: msgseqno seqno : mach_port_seqno_t;
63: #endif /* SEQNOS */
64: in return_code : kern_return_t;
65: in device_port : mach_port_make_send_t
66: );
67:
68: skip; /* device_close */
69:
70: simpleroutine device_write_reply(
71: reply_port : reply_port_t;
72: #if SEQNOS
73: msgseqno seqno : mach_port_seqno_t;
74: #endif /* SEQNOS */
75: in return_code : kern_return_t;
76: in bytes_written : int
77: );
78:
79: simpleroutine device_write_reply_inband(
80: reply_port : reply_port_t;
81: #if SEQNOS
82: msgseqno seqno : mach_port_seqno_t;
83: #endif /* SEQNOS */
84: in return_code : kern_return_t;
85: in bytes_written : int
86: );
87:
88: simpleroutine device_read_reply(
89: reply_port : reply_port_t;
90: #if SEQNOS
91: msgseqno seqno : mach_port_seqno_t;
92: #endif /* SEQNOS */
93: in return_code : kern_return_t;
94: in data : io_buf_ptr_t, dealloc
95: );
96:
97: simpleroutine device_read_reply_inband(
98: reply_port : reply_port_t;
99: #if SEQNOS
100: msgseqno seqno : mach_port_seqno_t;
101: #endif /* SEQNOS */
102: in return_code : kern_return_t;
103: in data : io_buf_ptr_inband_t
104: );
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.