1 /* 2 * Copyright 1991-1998 by Open Software Foundation, Inc. 3 * All Rights Reserved 4 * 5 * Permission to use, copy, modify, and distribute this software and 6 * its documentation for any purpose and without fee is hereby granted, 7 * provided that the above copyright notice appears in all copies and 8 * that both the copyright notice and this permission notice appear in 9 * supporting documentation. 10 * 11 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 12 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 * FOR A PARTICULAR PURPOSE. 14 * 15 * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 16 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 17 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 18 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 19 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20 */ 21 /* 22 * MkLinux 23 */ 24 /* CMU_HIST */ 25 /* 26 * Revision 2.4 91/05/14 15:38:51 mrt 27 * Correcting copyright 28 * 29 * Revision 2.3 91/02/05 17:07:51 mrt 30 * Changed to new Mach copyright 31 * [91/01/31 17:26:11 mrt] 32 * 33 * Revision 2.2 90/05/03 15:19:05 dbg 34 * Add B_MD1. 35 * [90/03/14 dbg] 36 * 37 */ 38 /* CMU_ENDHIST */ 39 /* 40 * Mach Operating System 41 * Copyright (c) 1991,1990,1989 Carnegie Mellon University 42 * All Rights Reserved. 43 * 44 * Permission to use, copy, modify and distribute this software and its 45 * documentation is hereby granted, provided that both the copyright 46 * notice and this permission notice appear in all copies of the 47 * software, derivative works or modified versions, and any portions 48 * thereof, and that both notices appear in supporting documentation. 49 * 50 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 51 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 52 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 53 * 54 * Carnegie Mellon requests users of this software to return to 55 * 56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 57 * School of Computer Science 58 * Carnegie Mellon University 59 * Pittsburgh PA 15213-3890 60 * 61 * any improvements or extensions that they make and grant Carnegie Mellon 62 * the rights to redistribute these changes. 63 */ 64 /* 65 */ 66 /* 67 * Author: David B. Golub, Carnegie Mellon University 68 * Date: 3/90 69 * 70 * Definitions to make new IO structures look like old ones 71 */ 72 73 /* 74 * io_req and fields 75 */ 76 #include <device/io_req.h> 77 78 #define buf io_req 79 80 /* 81 * Redefine fields for drivers using old names 82 */ 83 #define b_flags io_op 84 #define b_bcount io_count 85 #define b_error io_error 86 #define b_dev io_unit 87 #define b_blkno io_recnum 88 #define b_resid io_residual 89 #define b_un io_un 90 #define b_addr data 91 #define av_forw io_next 92 #define av_back io_prev 93 94 /* 95 * Redefine fields for driver request list heads, using old names. 96 */ 97 #define b_actf io_next 98 #define b_actl io_prev 99 #define b_forw io_link 100 #define b_back io_rlink 101 #define b_active io_count 102 #define b_errcnt io_residual 103 #define b_bufsize io_alloc_size 104 105 /* 106 * Redefine flags 107 */ 108 #define B_WRITE IO_WRITE 109 #define B_READ IO_READ 110 #define B_OPEN IO_OPEN 111 #define B_DONE IO_DONE 112 #define B_ERROR IO_ERROR 113 #define B_BUSY IO_BUSY 114 #define B_WANTED IO_WANTED 115 #define B_BAD IO_BAD 116 #define B_CALL IO_CALL 117 118 #define B_MD1 IO_SPARE_START 119 120 /* 121 * Redefine uio structure 122 */ 123 #define uio io_req 124 125 /* 126 * Redefine physio routine 127 */ 128 #define physio(strat, xbuf, dev, ops, minphys, ior) \ 129 block_io(strat, minphys, ior) 130 131 /* 132 * Export standard routines. 133 */ 134 extern void minphys( 135 io_req_t ior); 136 extern io_return_t block_io( 137 void (*strat)( 138 io_req_t), 139 void (*max_count)( 140 io_req_t), 141 io_req_t ior); 142 extern void brelse( 143 struct buf * bp); 144 145 /* 146 * Alternate name for iodone 147 */ 148 #define biodone iodone 149 #define biowait iowait 150