[PATCH] sched: use cached variable in sys_sched_yield()
authorRenaud Lienhart <renaud.lienhart@free.fr>
Sat, 10 Sep 2005 07:26:20 +0000 (00:26 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 10 Sep 2005 17:06:23 +0000 (10:06 -0700)
In sys_sched_yield(), we cache current->array in the "array" variable, thus
there's no need to dereference "current" again later.

Signed-Off-By: Renaud Lienhart <renaud.lienhart@free.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c

index 46fdd0bb1ed6c5f9aca38f103a05716189f9e48e..103f705b245c751e41541a94f807c36d676806b9 100644 (file)
@@ -3938,7 +3938,7 @@ asmlinkage long sys_sched_yield(void)
        if (rt_task(current))
                target = rq->active;
 
-       if (current->array->nr_active == 1) {
+       if (array->nr_active == 1) {
                schedstat_inc(rq, yld_act_empty);
                if (!rq->expired->nr_active)
                        schedstat_inc(rq, yld_both_empty);