diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 04:56:03 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-02-26 04:56:03 +0000 |
commit | 3651ba84ae419c73640acddcd537532fd44e1c6f (patch) | |
tree | 62b67eb4e6002fc323cb2930e49635966cb0b7d3 /sys/kern | |
parent | e15989470c31efa3a857718e7462663964497155 (diff) |
uvm uses kcopy when uiomoving from sysspace
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_subr.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 8b5e31397a7..6e9edbb950a 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_subr.c,v 1.7 1999/02/26 03:16:47 millert Exp $ */ +/* $OpenBSD: kern_subr.c,v 1.8 1999/02/26 04:56:02 art Exp $ */ /* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */ /* @@ -85,11 +85,20 @@ uiomove(cp, n, uio) break; case UIO_SYSSPACE: +#if defined(UVM) + if (uio->uio_rw == UIO_READ) + error = kcopy(cp, iov->iov_base, cnt); + else + error = kcopy(iov->iov_base, cp, cnt); + if (error) + return(error); +#else if (uio->uio_rw == UIO_READ) bcopy((caddr_t)cp, iov->iov_base, cnt); else bcopy(iov->iov_base, (caddr_t)cp, cnt); break; +#endif } iov->iov_base += cnt; iov->iov_len -= cnt; |