summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_subr.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
committerjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
commit4f5d8ed82579a945555b585b43ab2d09eae30c77 (patch)
tree512839f19fc02786cc9904c4406357f3573a8b09 /sys/kern/kern_subr.c
parent776ef1f43089579877329277af83423976a699d2 (diff)
downloadFreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.zip
FreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.tar.gz
Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r--sys/kern/kern_subr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index c379f79..c3d7849 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -92,7 +92,7 @@ uiomove(cp, n, uio)
case UIO_USERSPACE:
case UIO_USERISPACE:
- if (ticks - switchticks >= hogticks)
+ if (ticks - PCPU_GET(switchticks) >= hogticks)
uio_yield();
if (uio->uio_rw == UIO_READ)
error = copyout(cp, iov->iov_base, cnt);
@@ -154,7 +154,7 @@ uiomoveco(cp, n, uio, obj)
case UIO_USERSPACE:
case UIO_USERISPACE:
- if (ticks - switchticks >= hogticks)
+ if (ticks - PCPU_GET(switchticks) >= hogticks)
uio_yield();
if (uio->uio_rw == UIO_READ) {
#ifdef ENABLE_VFS_IOOPT
@@ -236,7 +236,7 @@ uioread(n, uio, obj, nread)
cnt &= ~PAGE_MASK;
- if (ticks - switchticks >= hogticks)
+ if (ticks - PCPU_GET(switchticks) >= hogticks)
uio_yield();
error = vm_uiomove(&curproc->p_vmspace->vm_map, obj,
uio->uio_offset, cnt,
OpenPOWER on IntegriCloud