summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-08-02 22:15:31 +0000
committerjhb <jhb@FreeBSD.org>2001-08-02 22:15:31 +0000
commite712875281de7341a74433cfd8d15b4cd8bef9a1 (patch)
treedb82126b517a3473beefcc83e319c9bc7bce8a42
parent132593d4da90f426d4f6c0620c67c36ae60a75df (diff)
downloadFreeBSD-src-e712875281de7341a74433cfd8d15b4cd8bef9a1.zip
FreeBSD-src-e712875281de7341a74433cfd8d15b4cd8bef9a1.tar.gz
Use 'p' instead of the potentially more expensive 'curproc' inside of
mi_switch().
-rw-r--r--sys/kern/kern_synch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 8efd64f..9c52802 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -860,14 +860,14 @@ mi_switch()
p->p_comm);
sched_crit = sched_lock.mtx_savecrit;
sched_nest = sched_lock.mtx_recurse;
- curproc->p_lastcpu = curproc->p_oncpu;
- curproc->p_oncpu = NOCPU;
- clear_resched(curproc);
+ p->p_lastcpu = p->p_oncpu;
+ p->p_oncpu = NOCPU;
+ clear_resched(p);
cpu_switch();
- curproc->p_oncpu = PCPU_GET(cpuid);
+ p->p_oncpu = PCPU_GET(cpuid);
sched_lock.mtx_savecrit = sched_crit;
sched_lock.mtx_recurse = sched_nest;
- sched_lock.mtx_lock = (uintptr_t)curproc;
+ sched_lock.mtx_lock = (uintptr_t)p;
CTR3(KTR_PROC, "mi_switch: new proc %p (pid %d, %s)", p, p->p_pid,
p->p_comm);
if (PCPU_GET(switchtime.tv_sec) == 0)
OpenPOWER on IntegriCloud