diff options
| author | 2011-03-07 07:07:13 +0000 | |
|---|---|---|
| committer | 2011-03-07 07:07:13 +0000 | |
| commit | d4b60c8b5d9a82508a30538791acf0666ac75a35 (patch) | |
| tree | ea88d625fad4455e19efbd2af404fb3c3947a11b /sys/kern/sched_bsd.c | |
| parent | noone will ever use NTFS on alpha (diff) | |
| download | wireguard-openbsd-d4b60c8b5d9a82508a30538791acf0666ac75a35.tar.xz wireguard-openbsd-d4b60c8b5d9a82508a30538791acf0666ac75a35.zip | |
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.c | 5 |
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); |
