summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorRenaud Lienhart <renaud.lienhart@free.fr>2005-09-10 09:26:20 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 19:06:23 +0200
commit5927ad78ec75870b1bdfa65a10ad1300cd664d36 (patch)
tree1eef750386a8bfa1e2532138a67a6d8bc8dad85b /kernel/sched.c
parent[PATCH] sched: HT optimisation (diff)
downloadlinux-5927ad78ec75870b1bdfa65a10ad1300cd664d36.tar.xz
linux-5927ad78ec75870b1bdfa65a10ad1300cd664d36.zip
[PATCH] sched: use cached variable in sys_sched_yield()
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>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 46fdd0bb1ed6..103f705b245c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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);