Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=71f8bd4600521fecb08644072052b85853a5a615
Commit:     71f8bd4600521fecb08644072052b85853a5a615
Parent:     c24d20dbef948487cd14f15dbf04644142e9f886
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 9 18:51:59 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Mon Jul 9 18:51:59 2007 +0200

    sched: cleanup: move dequeue/enqueue_task()
    
    cleanup: move dequeue/enqueue_task() to a more logical place, to
    not split up __normal_prio()/normal_prio().
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c |   76 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index e642bfa..683d2a5 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -672,44 +672,6 @@ static inline void resched_task(struct task_struct *p)
 #include "sched_stats.h"
 
 /*
- * Adding/removing a task to/from a priority array:
- */
-static void dequeue_task(struct task_struct *p, struct prio_array *array)
-{
-       array->nr_active--;
-       list_del(&p->run_list);
-       if (list_empty(array->queue + p->prio))
-               __clear_bit(p->prio, array->bitmap);
-}
-
-static void enqueue_task(struct task_struct *p, struct prio_array *array)
-{
-       sched_info_queued(p);
-       list_add_tail(&p->run_list, array->queue + p->prio);
-       __set_bit(p->prio, array->bitmap);
-       array->nr_active++;
-       p->array = array;
-}
-
-/*
- * Put task to the end of the run list without the overhead of dequeue
- * followed by enqueue.
- */
-static void requeue_task(struct task_struct *p, struct prio_array *array)
-{
-       list_move_tail(&p->run_list, array->queue + p->prio);
-}
-
-static inline void
-enqueue_task_head(struct task_struct *p, struct prio_array *array)
-{
-       list_add(&p->run_list, array->queue + p->prio);
-       __set_bit(p->prio, array->bitmap);
-       array->nr_active++;
-       p->array = array;
-}
-
-/*
  * __normal_prio - return the priority that is based on the static
  * priority but is modified by bonuses/penalties.
  *
@@ -803,6 +765,44 @@ static inline void dec_nr_running(struct task_struct *p, 
struct rq *rq)
 }
 
 /*
+ * Adding/removing a task to/from a priority array:
+ */
+static void dequeue_task(struct task_struct *p, struct prio_array *array)
+{
+       array->nr_active--;
+       list_del(&p->run_list);
+       if (list_empty(array->queue + p->prio))
+               __clear_bit(p->prio, array->bitmap);
+}
+
+static void enqueue_task(struct task_struct *p, struct prio_array *array)
+{
+       sched_info_queued(p);
+       list_add_tail(&p->run_list, array->queue + p->prio);
+       __set_bit(p->prio, array->bitmap);
+       array->nr_active++;
+       p->array = array;
+}
+
+/*
+ * Put task to the end of the run list without the overhead of dequeue
+ * followed by enqueue.
+ */
+static void requeue_task(struct task_struct *p, struct prio_array *array)
+{
+       list_move_tail(&p->run_list, array->queue + p->prio);
+}
+
+static inline void
+enqueue_task_head(struct task_struct *p, struct prio_array *array)
+{
+       list_add(&p->run_list, array->queue + p->prio);
+       __set_bit(p->prio, array->bitmap);
+       array->nr_active++;
+       p->array = array;
+}
+
+/*
  * Calculate the expected normal priority: i.e. priority
  * without taking RT-inheritance into account. Might be
  * boosted by interactivity modifiers. Changes upon fork,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to