]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] use new list macro in sched.c
authorRobert Love <rml@tech9.net>
Sun, 14 Jul 2002 10:28:47 +0000 (03:28 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 14 Jul 2002 10:28:47 +0000 (03:28 -0700)
The attached patch makes use of the new list_move_tail macro in 2.5 as
needed in sched.c, replacing a list_del and list_add_tail combo with the
optimized list_move_tail.

kernel/sched.c

index 8dfe1941e7e04be9dfe6d9c753dd1e443ff16285..49563c9c45d9e7dd45ca043e279237f8da2ff627 100644 (file)
@@ -1430,8 +1430,7 @@ asmlinkage long sys_sched_yield(void)
                } else
                        current->time_slice--;
        } else if (unlikely(rt_task(current))) {
-               list_del(&current->run_list);
-               list_add_tail(&current->run_list, array->queue + current->prio);
+               list_move_tail(&current->run_list, array->queue + current->prio);
        } else {
                list_del(&current->run_list);
                if (list_empty(array->queue + current->prio))