Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24-rc3 /kernel/sched_idletask.c

Filename:/kernel/sched_idletask.c
Lines Added:22
Lines Deleted:4
Also changed in: (Previous) 2.6.24-rc2  2.6.24-rc1-git15  2.6.24-rc1-git14  2.6.24-rc1-git13  2.6.24-rc1-git12  2.6.24-rc1-git11 
(Following) 2.6.24-rc4  2.6.24-rc5  2.6.24-rc6  2.6.24-rc7  2.6.24-rc8  2.6.24 

Location
[  2.6.24-rc3
  [  kernel
     o  sched_idletask.c

Patch

diff --git a/kernel/sched_idletask.c b/kernel/sched_idletask.c
index 3503fb2..bf9c25c 100644
--- a/kernel/sched_idletask.c
+++ b/kernel/sched_idletask.c
@@ -37,23 +37,37 @@ static void put_prev_task_idle(struct rq *rq, struct task_struct *prev)
 {
 }
 
+#ifdef CONFIG_SMP
 static unsigned long
 load_balance_idle(struct rq *this_rq, int this_cpu, struct rq *busiest,
-         unsigned long max_nr_move, unsigned long max_load_move,
-         struct sched_domain *sd, enum cpu_idle_type idle,
-         int *all_pinned, int *this_best_prio)
+        unsigned long max_load_move,
+        struct sched_domain *sd, enum cpu_idle_type idle,
+        int *all_pinned, int *this_best_prio)
 {
    return 0;
 }
 
+static int
+move_one_task_idle(struct rq *this_rq, int this_cpu, struct rq *busiest,
+         struct sched_domain *sd, enum cpu_idle_type idle)
+{
+   return 0;
+}
+#endif
+
 static void task_tick_idle(struct rq *rq, struct task_struct *curr)
 {
 }
 
+static void set_curr_task_idle(struct rq *rq)
+{
+}
+
 /*
  * Simple, special scheduling class for the per-CPU idle tasks:
  */
-static struct sched_class idle_sched_class __read_mostly = {
+const struct sched_class idle_sched_class = {
+   /* .next is NULL */
    /* no enqueue/yield_task for idle tasks */
 
    /* dequeue is not valid, we print a debug message there: */
@@ -64,8 +78,12 @@ static struct sched_class idle_sched_class __read_mostly = {
    .pick_next_task      = pick_next_task_idle,
    .put_prev_task      = put_prev_task_idle,
 
+#ifdef CONFIG_SMP
    .load_balance      = load_balance_idle,
+   .move_one_task      = move_one_task_idle,
+#endif
 
+   .set_curr_task          = set_curr_task_idle,
    .task_tick      = task_tick_idle,
    /* no .task_new for idle tasks */
 };


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.