summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_switch.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_switch.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_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 60024b0..7515ea8 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) {
OpenPOWER on IntegriCloud