From 9ce470a533cf51e65a0e46f0d3f76a7467037479 Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 14 Oct 2002 20:34:31 +0000 Subject: Tidy up the scheduler's code for changing the priority of a thread. Logically pretty much a NOP. --- sys/posix4/ksched.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sys/posix4') 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); } } -- cgit v1.1