summaryrefslogtreecommitdiff
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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c
index e5db94d2aaa..53c0902dc49 100644
--- a/sys/kern/sched_bsd.c
+++ b/sys/kern/sched_bsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched_bsd.c,v 1.19 2008/11/06 22:11:36 art Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.20 2009/03/23 13:25:11 art Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@@ -97,7 +97,7 @@ roundrobin(struct cpu_info *ci)
spc->spc_rrticks = rrticks_init;
- if (curproc != NULL) {
+ if (ci->ci_curproc != NULL) {
s = splstatclock();
if (spc->spc_schedflags & SPCF_SEENRR) {
/*
@@ -112,7 +112,8 @@ roundrobin(struct cpu_info *ci)
splx(s);
}
- need_resched(curcpu());
+ if (spc->spc_nrun)
+ need_resched(ci);
}
/*
@@ -257,7 +258,8 @@ schedcpu(void *arg)
resetpriority(p);
if (p->p_priority >= PUSER) {
if (p->p_stat == SRUN &&
- (p->p_priority / PPQ) != (p->p_usrpri / PPQ)) {
+ (p->p_priority / SCHED_PPQ) !=
+ (p->p_usrpri / SCHED_PPQ)) {
remrunqueue(p);
p->p_priority = p->p_usrpri;
setrunqueue(p);