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

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

Advertisement

Kernel v2.3.48 /kernel/sched.c

Filename:/kernel/sched.c
Lines Added:3
Lines Deleted:8
Also changed in: (Previous) 2.3.47  2.3.43  2.3.41  2.3.40  2.3.38  2.3.36 
(Following) 2.3.49  2.3.99-pre3  2.3.99-pre4  2.3.99-pre6  2.3.99-pre7  2.5.49 

Location
[  2.3.48
  [  kernel
     o  sched.c

Patch

diff -u --recursive --new-file v2.3.47/linux/kernel/sched.c linux/kernel/sched.c
--- v2.3.47/linux/kernel/sched.c   Sun Feb 20 21:12:40 2000
+++ linux/kernel/sched.c   Thu Feb 24 10:15:58 2000
@@ -497,17 +497,15 @@
    c = -1000;
    if (prev->state == TASK_RUNNING)
       goto still_running;
-still_running_back:
 
-   tmp = runqueue_head.next;
-   while (tmp != &runqueue_head) {
+still_running_back:
+   list_for_each(tmp, &runqueue_head) {
       p = list_entry(tmp, struct task_struct, run_list);
       if (can_schedule(p)) {
          int weight = goodness(p, this_cpu, prev->active_mm);
          if (weight > c)
             c = weight, next = p;
       }
-      tmp = tmp->next;
    }
 
    /* Do we need to re-calculate counters? */
@@ -658,12 +656,9 @@
         if (!head->next || !head->prev)
                 WQ_BUG();
 #endif
-   tmp = head->next;
-   while (tmp != head) {
+   list_for_each(tmp, head) {
       unsigned int state;
                 wait_queue_t *curr = list_entry(tmp, wait_queue_t, task_list);
-
-      tmp = tmp->next;
 
 #if WAITQUEUE_DEBUG
       CHECK_MAGIC(curr->__magic);


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