Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13460
b: refs/heads/master
c: 738a2cc
h: refs/heads/master
v: v3
  • Loading branch information
Con Kolivas authored and Linus Torvalds committed Nov 9, 2005
1 parent 8881525 commit 9a23828
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b910472dd3b7c1d51af9a594a759f642520c33e1
refs/heads/master: 738a2ccbcf8c2c1b039f1e76662dce60b22b694b
9 changes: 4 additions & 5 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3508,25 +3508,24 @@ void set_user_nice(task_t *p, long nice)
* not SCHED_NORMAL:
*/
if (rt_task(p)) {
dec_prio_bias(rq, p->static_prio);
p->static_prio = NICE_TO_PRIO(nice);
inc_prio_bias(rq, p->static_prio);
goto out_unlock;
}
array = p->array;
if (array)
if (array) {
dequeue_task(p, array);
dec_prio_bias(rq, p->static_prio);
}

old_prio = p->prio;
new_prio = NICE_TO_PRIO(nice);
delta = new_prio - old_prio;
dec_prio_bias(rq, p->static_prio);
p->static_prio = NICE_TO_PRIO(nice);
inc_prio_bias(rq, p->static_prio);
p->prio += delta;

if (array) {
enqueue_task(p, array);
inc_prio_bias(rq, p->static_prio);
/*
* If the task increased its priority or is running and
* lowered its priority, then reschedule its CPU:
Expand Down

0 comments on commit 9a23828

Please sign in to comment.