kern_physio.c (8876) | kern_physio.c (10624) |
---|---|
1/* 2 * Copyright (c) 1994 John S. Dyson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice immediately at the beginning of the file, without modification, 10 * this list of conditions, and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. Absolutely no warranty of function or purpose is made by the author 15 * John S. Dyson. 16 * 4. Modifications may be freely made to this file if the above conditions 17 * are met. 18 * | 1/* 2 * Copyright (c) 1994 John S. Dyson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice immediately at the beginning of the file, without modification, 10 * this list of conditions, and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. Absolutely no warranty of function or purpose is made by the author 15 * John S. Dyson. 16 * 4. Modifications may be freely made to this file if the above conditions 17 * are met. 18 * |
19 * $Id: kern_physio.c,v 1.10 1995/03/16 18:12:34 bde Exp $ | 19 * $Id: kern_physio.c,v 1.11 1995/05/30 08:05:36 rgrimes Exp $ |
20 */ 21 22#include <sys/param.h> 23#include <sys/systm.h> 24#include <sys/buf.h> 25#include <sys/conf.h> 26#include <sys/proc.h> 27#include <vm/vm.h> --- 132 unchanged lines hidden (view full) --- 160 161 if( bp->b_bcount > MAXPHYS) { 162 bp->b_bcount = MAXPHYS; 163 } 164 return bp->b_bcount; 165} 166 167int | 20 */ 21 22#include <sys/param.h> 23#include <sys/systm.h> 24#include <sys/buf.h> 25#include <sys/conf.h> 26#include <sys/proc.h> 27#include <vm/vm.h> --- 132 unchanged lines hidden (view full) --- 160 161 if( bp->b_bcount > MAXPHYS) { 162 bp->b_bcount = MAXPHYS; 163 } 164 return bp->b_bcount; 165} 166 167int |
168rawread(dev_t dev, struct uio *uio) | 168rawread(dev_t dev, struct uio *uio, int ioflag) |
169{ 170 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL, 171 dev, 1, minphys, uio)); 172} 173 174int | 169{ 170 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL, 171 dev, 1, minphys, uio)); 172} 173 174int |
175rawwrite(dev_t dev, struct uio *uio) | 175rawwrite(dev_t dev, struct uio *uio, int ioflag) |
176{ 177 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL, 178 dev, 0, minphys, uio)); 179} 180 181static void 182physwakeup(bp) 183 struct buf *bp; 184{ 185 wakeup((caddr_t) bp); 186 bp->b_flags &= ~B_CALL; 187} | 176{ 177 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL, 178 dev, 0, minphys, uio)); 179} 180 181static void 182physwakeup(bp) 183 struct buf *bp; 184{ 185 wakeup((caddr_t) bp); 186 bp->b_flags &= ~B_CALL; 187} |