[PATCH 2.6.13-mm1] use cached variable in sys_sched_yield()

From: Renaud Lienhart
Date: Sat Sep 03 2005 - 07:24:05 EST


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@xxxxxxx>

--- a/kernel/sched.c Sat Sep 3 14:01:38 2005
+++ b/kernel/sched.c Sat Sep 3 14:02:47 2005
@@ -4058,7 +4058,7 @@
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/