summaryrefslogtreecommitdiffstats
path: root/sys/kern/sched_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/sched_bsd.c')
-rw-r--r--sys/kern/sched_bsd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c
index 53c0902dc49..2c4e7c6caa0 100644
--- a/sys/kern/sched_bsd.c
+++ b/sys/kern/sched_bsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched_bsd.c,v 1.20 2009/03/23 13:25:11 art Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.21 2009/04/14 09:13:25 art Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@@ -337,6 +337,7 @@ preempt(struct proc *newp)
SCHED_LOCK(s);
p->p_priority = p->p_usrpri;
p->p_stat = SRUN;
+ p->p_cpu = sched_choosecpu(p);
setrunqueue(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
@@ -516,6 +517,7 @@ setrunnable(struct proc *p)
break;
}
p->p_stat = SRUN;
+ p->p_cpu = sched_choosecpu(p);
setrunqueue(p);
if (p->p_slptime > 1)
updatepri(p);