summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_physio.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-04-06 03:04:47 +0000
committerpeter <peter@FreeBSD.org>1999-04-06 03:04:47 +0000
commit399ad295b1b01c91382db700938b3501b56980ce (patch)
tree63b275efeecbd9f1c29dee55608bf3d12dec1e77 /sys/kern/kern_physio.c
parent8cc7f5626955ccd3a683d4c44a63c9f6019a23cd (diff)
downloadFreeBSD-src-399ad295b1b01c91382db700938b3501b56980ce.zip
FreeBSD-src-399ad295b1b01c91382db700938b3501b56980ce.tar.gz
Use the reference counted PHOLD()/PRELE() rather than P_PHYSIO.
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r--sys/kern/kern_physio.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index ad63a98..268a0bf 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: kern_physio.c,v 1.29 1998/10/25 17:44:51 phk Exp $
+ * $Id: kern_physio.c,v 1.30 1999/01/21 08:29:04 dillon Exp $
*/
#include <sys/param.h>
@@ -49,10 +49,10 @@ physio(strategy, bp, dev, rw, minp, uio)
int bp_alloc = (bp == 0);
struct buf *bpa;
-/*
- * keep the process from being swapped
- */
- curproc->p_flag |= P_PHYSIO;
+ /*
+ * Keep the process UPAGES from being swapped. (XXX for performance?)
+ */
+ PHOLD(curproc);
/* create and build a buffer header for a transfer */
bpa = (struct buf *)phygetvpbuf(dev, uio->uio_resid);
@@ -155,10 +155,10 @@ doerror:
wakeup((caddr_t)bp);
}
}
-/*
- * allow the process to be swapped
- */
- curproc->p_flag &= ~P_PHYSIO;
+ /*
+ * Allow the process UPAGES to be swapped again.
+ */
+ PRELE(curproc);
return (error);
}
OpenPOWER on IntegriCloud