summaryrefslogtreecommitdiff
path: root/sys/kern/sched_bsd.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-03-07 07:07:14 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-03-07 07:07:14 +0000
commit2fbec6a38212aa87373191afcd529acf2e335d70 (patch)
tree19134d6b45bcbcd9780b8b3c2d218724d57525c0 /sys/kern/sched_bsd.c
parent0fa41f93507e1ea1c5c328bbf53dbc339546412c (diff)
The scheduling 'nice' value is per-process, not per-thread, so move it
into struct process. ok tedu@ deraadt@
Diffstat (limited to 'sys/kern/sched_bsd.c')
-rw-r--r--sys/kern/sched_bsd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c
index c67171203ab..9290d0105c8 100644
--- a/sys/kern/sched_bsd.c
+++ b/sys/kern/sched_bsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sched_bsd.c,v 1.24 2010/09/24 13:21:30 matthew Exp $ */
+/* $OpenBSD: sched_bsd.c,v 1.25 2011/03/07 07:07:13 guenther Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
@@ -537,7 +537,8 @@ resetpriority(struct proc *p)
SCHED_ASSERT_LOCKED();
- newpriority = PUSER + p->p_estcpu + NICE_WEIGHT * (p->p_nice - NZERO);
+ newpriority = PUSER + p->p_estcpu +
+ NICE_WEIGHT * (p->p_p->ps_nice - NZERO);
newpriority = min(newpriority, MAXPRI);
p->p_usrpri = newpriority;
resched_proc(p, p->p_usrpri);