|
|
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: * File: device/device.defs ! 28: * Author: Douglas Orr ! 29: * Feb 10, 1988 ! 30: * Abstract: ! 31: * Mach device support. Mach devices are accessed through ! 32: * block and character device interfaces to the kernel. ! 33: */ ! 34: ! 35: #ifdef MACH_KERNEL ! 36: simport <kern/compat_xxx_defs.h>; /* for obsolete routines */ ! 37: #endif ! 38: ! 39: subsystem ! 40: #if KERNEL_SERVER ! 41: KernelServer ! 42: #endif ! 43: device 2800; ! 44: ! 45: #include <mach/std_types.defs> ! 46: #include <mach/mach_types.defs> ! 47: #include <device/device_types.defs> ! 48: ! 49: serverprefix ds_; ! 50: ! 51: type reply_port_t = MACH_MSG_TYPE_MAKE_SEND_ONCE | polymorphic ! 52: ctype: mach_port_t; ! 53: ! 54: routine device_open( ! 55: master_port : mach_port_t; ! 56: sreplyport reply_port : reply_port_t; ! 57: mode : dev_mode_t; ! 58: name : dev_name_t; ! 59: out device : device_t ! 60: ); ! 61: ! 62: routine device_close( ! 63: device : device_t ! 64: ); ! 65: ! 66: routine device_write( ! 67: device : device_t; ! 68: sreplyport reply_port : reply_port_t; ! 69: in mode : dev_mode_t; ! 70: in recnum : recnum_t; ! 71: in data : io_buf_ptr_t; ! 72: out bytes_written : int ! 73: ); ! 74: ! 75: routine device_write_inband( ! 76: device : device_t; ! 77: sreplyport reply_port : reply_port_t; ! 78: in mode : dev_mode_t; ! 79: in recnum : recnum_t; ! 80: in data : io_buf_ptr_inband_t; ! 81: out bytes_written : int ! 82: ); ! 83: ! 84: routine device_read( ! 85: device : device_t; ! 86: sreplyport reply_port : reply_port_t; ! 87: in mode : dev_mode_t; ! 88: in recnum : recnum_t; ! 89: in bytes_wanted : int; ! 90: out data : io_buf_ptr_t ! 91: ); ! 92: ! 93: routine device_read_inband( ! 94: device : device_t; ! 95: sreplyport reply_port : reply_port_t; ! 96: in mode : dev_mode_t; ! 97: in recnum : recnum_t; ! 98: in bytes_wanted : int; ! 99: out data : io_buf_ptr_inband_t ! 100: ); ! 101: ! 102: /* obsolete */ ! 103: routine xxx_device_set_status( ! 104: device : device_t; ! 105: in flavor : dev_flavor_t; ! 106: in status : dev_status_t, IsLong ! 107: ); ! 108: ! 109: /* obsolete */ ! 110: routine xxx_device_get_status( ! 111: device : device_t; ! 112: in flavor : dev_flavor_t; ! 113: out status : dev_status_t, IsLong ! 114: ); ! 115: ! 116: /* obsolete */ ! 117: routine xxx_device_set_filter( ! 118: device : device_t; ! 119: in receive_port : mach_port_send_t; ! 120: in priority : int; ! 121: in filter : filter_array_t, IsLong ! 122: ); ! 123: ! 124: routine device_map( ! 125: device : device_t; ! 126: in prot : vm_prot_t; ! 127: in offset : vm_offset_t; ! 128: in size : vm_size_t; ! 129: out pager : memory_object_t; ! 130: in unmap : int ! 131: ); ! 132: ! 133: routine device_set_status( ! 134: device : device_t; ! 135: in flavor : dev_flavor_t; ! 136: in status : dev_status_t ! 137: ); ! 138: ! 139: routine device_get_status( ! 140: device : device_t; ! 141: in flavor : dev_flavor_t; ! 142: out status : dev_status_t, CountInOut ! 143: ); ! 144: ! 145: routine device_set_filter( ! 146: device : device_t; ! 147: in receive_port : mach_port_send_t; ! 148: in priority : int; ! 149: in filter : filter_array_t ! 150: ); ! 151:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.