diff options
author | Dmitry Adamushko <dmitry.adamushko@gmail.com> | 2007-10-15 11:00:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:08 -0400 |
commit | 4530d7ab0fb8d5056b68c376949e2d5c4db7817e (patch) | |
tree | e5ba2d7fde1d56948c5517442a7e90815f96ef82 /kernel/sched_fair.c | |
parent | 87fefa381ef27f46c1182622ea01eb9504cd2e24 (diff) |
sched: simplify sched_class::yield_task()
the 'p' (task_struct) parameter in the sched_class :: yield_task() is
redundant as the caller is always the 'current'. Get rid of it.
text data bss dec hex filename
24341 2734 20 27095 69d7 sched.o.before
24330 2734 20 27084 69cc sched.o.after
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 827a0636525a..4dd256d46853 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -722,11 +722,11 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int sleep) | |||
722 | * | 722 | * |
723 | * If compat_yield is turned on then we requeue to the end of the tree. | 723 | * If compat_yield is turned on then we requeue to the end of the tree. |
724 | */ | 724 | */ |
725 | static void yield_task_fair(struct rq *rq, struct task_struct *p) | 725 | static void yield_task_fair(struct rq *rq) |
726 | { | 726 | { |
727 | struct cfs_rq *cfs_rq = task_cfs_rq(p); | 727 | struct cfs_rq *cfs_rq = &rq->cfs; |
728 | struct rb_node **link = &cfs_rq->tasks_timeline.rb_node; | 728 | struct rb_node **link = &cfs_rq->tasks_timeline.rb_node; |
729 | struct sched_entity *rightmost, *se = &p->se; | 729 | struct sched_entity *rightmost, *se = &rq->curr->se; |
730 | struct rb_node *parent; | 730 | struct rb_node *parent; |
731 | 731 | ||
732 | /* | 732 | /* |
@@ -741,8 +741,8 @@ static void yield_task_fair(struct rq *rq, struct task_struct *p) | |||
741 | * Dequeue and enqueue the task to update its | 741 | * Dequeue and enqueue the task to update its |
742 | * position within the tree: | 742 | * position within the tree: |
743 | */ | 743 | */ |
744 | dequeue_entity(cfs_rq, &p->se, 0); | 744 | dequeue_entity(cfs_rq, se, 0); |
745 | enqueue_entity(cfs_rq, &p->se, 0); | 745 | enqueue_entity(cfs_rq, se, 0); |
746 | 746 | ||
747 | return; | 747 | return; |
748 | } | 748 | } |