diff options
author | julian <julian@FreeBSD.org> | 2002-10-14 20:34:31 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-10-14 20:34:31 +0000 |
commit | 9ce470a533cf51e65a0e46f0d3f76a7467037479 (patch) | |
tree | ec5f595c6f180bad73ef2a0656ff0fb1edeac3a7 /sys/posix4 | |
parent | e53d0f994c6510cd95298e77954eea9fa4efa067 (diff) | |
download | FreeBSD-src-9ce470a533cf51e65a0e46f0d3f76a7467037479.zip FreeBSD-src-9ce470a533cf51e65a0e46f0d3f76a7467037479.tar.gz |
Tidy up the scheduler's code for changing the priority of a thread.
Logically pretty much a NOP.
Diffstat (limited to 'sys/posix4')
-rw-r--r-- | sys/posix4/ksched.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/posix4/ksched.c b/sys/posix4/ksched.c index 62ab684..690c2fa 100644 --- a/sys/posix4/ksched.c +++ b/sys/posix4/ksched.c @@ -187,10 +187,7 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched, td->td_kse->ke_flags |= KEF_NEEDRESCHED; } else if (TD_ON_RUNQ(td)) { if (td->td_priority > kg->kg_user_pri) { - remrunqueue(td); - td->td_priority = - kg->kg_user_pri; - setrunqueue(td); + sched_prio(td, kg->kg_user_pri); } } } @@ -220,10 +217,7 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched, td->td_kse->ke_flags |= KEF_NEEDRESCHED; } else if (TD_ON_RUNQ(td)) { if (td->td_priority > kg->kg_user_pri) { - remrunqueue(td); - td->td_priority = - kg->kg_user_pri; - setrunqueue(td); + sched_prio(td, kg->kg_user_pri); } } |