Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5927ad78 authored by Renaud Lienhart's avatar Renaud Lienhart Committed by Linus Torvalds
Browse files

[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: default avatarRenaud Lienhart <renaud.lienhart@free.fr>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5969fe06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);