From: Ingo Molnar From: Nick Piggin wrote: It removes the last place where we mess with run_list open coded. --- 25-akpm/kernel/sched.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff -puN kernel/sched.c~sched-run_list-cleanup kernel/sched.c --- 25/kernel/sched.c~sched-run_list-cleanup 2004-04-03 15:20:37.819656120 -0800 +++ 25-akpm/kernel/sched.c 2004-04-03 15:20:37.825655208 -0800 @@ -2405,6 +2405,7 @@ asmlinkage long sys_sched_yield(void) { runqueue_t *rq = this_rq_lock(); prio_array_t *array = current->array; + prio_array_t *target = rq->expired; /* * We implement yielding by moving the task into the expired @@ -2413,13 +2414,12 @@ asmlinkage long sys_sched_yield(void) * (special rule: RT tasks will just roundrobin in the active * array.) */ - if (likely(!rt_task(current))) { - dequeue_task(current, array); - enqueue_task(current, rq->expired); - } else { - list_del(¤t->run_list); - list_add_tail(¤t->run_list, array->queue + current->prio); - } + if (unlikely(rt_task(current))) + target = rq->active; + + dequeue_task(current, array); + enqueue_task(current, target); + /* * Since we are going to call schedule() anyway, there's * no need to preempt: _