diff options
author | Dmitry Adamushko <dmitry.adamushko@gmail.com> | 2008-01-25 15:08:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-25 15:08:21 -0500 |
commit | 5d2f5a616d65e3c08acde3195694c4ab8afbc1b7 (patch) | |
tree | df44c641af4cd66160f6296e86833c568070ae76 /kernel/sched.c | |
parent | 9ec3b77e11b9398ab40b492c4fde7d8aac04a718 (diff) |
sched: get rid of 'new_cpu' in try_to_wake_up()
Clean-up try_to_wake_up().
Get rid of the 'new_cpu' variable in try_to_wake_up() [ that's, one
#ifdef section less ]. Also remove a few redundant blank lines.
Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 55c521780f93..9d6fb731559b 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1559,9 +1559,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) | |||
1559 | unsigned long flags; | 1559 | unsigned long flags; |
1560 | long old_state; | 1560 | long old_state; |
1561 | struct rq *rq; | 1561 | struct rq *rq; |
1562 | #ifdef CONFIG_SMP | ||
1563 | int new_cpu; | ||
1564 | #endif | ||
1565 | 1562 | ||
1566 | rq = task_rq_lock(p, &flags); | 1563 | rq = task_rq_lock(p, &flags); |
1567 | old_state = p->state; | 1564 | old_state = p->state; |
@@ -1579,9 +1576,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) | |||
1579 | if (unlikely(task_running(rq, p))) | 1576 | if (unlikely(task_running(rq, p))) |
1580 | goto out_activate; | 1577 | goto out_activate; |
1581 | 1578 | ||
1582 | new_cpu = p->sched_class->select_task_rq(p, sync); | 1579 | cpu = p->sched_class->select_task_rq(p, sync); |
1583 | if (new_cpu != cpu) { | 1580 | if (cpu != orig_cpu) { |
1584 | set_task_cpu(p, new_cpu); | 1581 | set_task_cpu(p, cpu); |
1585 | task_rq_unlock(rq, &flags); | 1582 | task_rq_unlock(rq, &flags); |
1586 | /* might preempt at this point */ | 1583 | /* might preempt at this point */ |
1587 | rq = task_rq_lock(p, &flags); | 1584 | rq = task_rq_lock(p, &flags); |
@@ -1608,10 +1605,8 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) | |||
1608 | } | 1605 | } |
1609 | } | 1606 | } |
1610 | } | 1607 | } |
1611 | |||
1612 | #endif | 1608 | #endif |
1613 | 1609 | ||
1614 | |||
1615 | out_activate: | 1610 | out_activate: |
1616 | #endif /* CONFIG_SMP */ | 1611 | #endif /* CONFIG_SMP */ |
1617 | schedstat_inc(p, se.nr_wakeups); | 1612 | schedstat_inc(p, se.nr_wakeups); |