~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to kernel/sched_idletask.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
#ifdef CONFIG_SMP
9
9
static int
10
 
select_task_rq_idle(struct rq *rq, struct task_struct *p, int sd_flag, int flags)
 
10
select_task_rq_idle(struct task_struct *p, int sd_flag, int flags)
11
11
{
12
12
        return task_cpu(p); /* IDLE tasks as never migrated */
13
13
}
52
52
{
53
53
}
54
54
 
55
 
static void switched_to_idle(struct rq *rq, struct task_struct *p,
56
 
                             int running)
 
55
static void switched_to_idle(struct rq *rq, struct task_struct *p)
57
56
{
58
 
        /* Can this actually happen?? */
59
 
        if (running)
60
 
                resched_task(rq->curr);
61
 
        else
62
 
                check_preempt_curr(rq, p, 0);
 
57
        BUG();
63
58
}
64
59
 
65
 
static void prio_changed_idle(struct rq *rq, struct task_struct *p,
66
 
                              int oldprio, int running)
 
60
static void
 
61
prio_changed_idle(struct rq *rq, struct task_struct *p, int oldprio)
67
62
{
68
 
        /* This can happen for hot plug CPUS */
69
 
 
70
 
        /*
71
 
         * Reschedule if we are currently running on this runqueue and
72
 
         * our priority decreased, or if we are not currently running on
73
 
         * this runqueue and our priority is higher than the current's
74
 
         */
75
 
        if (running) {
76
 
                if (p->prio > oldprio)
77
 
                        resched_task(rq->curr);
78
 
        } else
79
 
                check_preempt_curr(rq, p, 0);
 
63
        BUG();
80
64
}
81
65
 
82
66
static unsigned int get_rr_interval_idle(struct rq *rq, struct task_struct *task)
110
94
 
111
95
        .prio_changed           = prio_changed_idle,
112
96
        .switched_to            = switched_to_idle,
113
 
 
114
 
        /* no .task_new for idle tasks */
115
97
};