aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_switch.c
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
committerJake Burkholder <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
commitef73ae4b0ccbd4beded1e8cce7f528799a1ae5ed (patch)
tree837f127fd047b38a9231fd849a9c2619fd965f3d /sys/kern/kern_switch.c
parent64ca32560de33b7d9e93ef9a226362c7dd105101 (diff)
downloadsrc-ef73ae4b0ccbd4beded1e8cce7f528799a1ae5ed.tar.gz
src-ef73ae4b0ccbd4beded1e8cce7f528799a1ae5ed.zip
Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
Notes
Notes: svn path=/head/; revision=70861
Diffstat (limited to 'sys/kern/kern_switch.c')
-rw-r--r--sys/kern/kern_switch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 60024b085baf..7515ea8b576a 100644
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -232,12 +232,12 @@ chooseproc(void)
} else {
CTR1(KTR_PROC, "chooseproc: idleproc, schedlock %lx",
(long)sched_lock.mtx_lock);
- return idleproc;
+ return PCPU_GET(idleproc);
}
p = TAILQ_FIRST(q);
#ifdef SMP
/* wander down the current run queue for this pri level for a match */
- id = cpuid;
+ id = PCPU_GET(cpuid);
while (p->p_lastcpu != id) {
p = TAILQ_NEXT(p, p_procq);
if (p == NULL) {