Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35f6f753b79705bc4b62da5dcc218d75ffa88370
Commit:     35f6f753b79705bc4b62da5dcc218d75ffa88370
Parent:     7f30e49ee1c2c1e95ce9d2ccce5221ddb793dd60
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 6 21:18:06 2007 +0200
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Apr 7 10:06:51 2007 -0700

    [PATCH] sched: get rid of p->children use in show_task()
    
    the p->parent PID printout gives us all the information about the
    task tree that we need - the eldest_child()/older_sibling()/
    younger_sibling() printouts are mostly historic and i do not
    remember ever having used those fields. (IMO in fact they confuse
    the SysRq-T output.) So remove them.
    
    This code has sentimental value though, those fields and
    printouts are one of the oldest ones still surviving from
    Linux v0.95's kernel/sched.c:
    
            if (p->p_ysptr || p->p_osptr)
                    printk("   Younger sib=%d, older sib=%d\n\r",
                            p->p_ysptr ? p->p_ysptr->pid : -1,
                            p->p_osptr ? p->p_osptr->pid : -1);
            else
                    printk("\n\r");
    
    written 15 years ago, in early 1992.
    
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Linus 'snif' Torvalds <[EMAIL PROTECTED]>
---
 kernel/sched.c |   35 +----------------------------------
 1 files changed, 1 insertions(+), 34 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index a4ca632..cdad3b0 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4687,27 +4687,6 @@ out_unlock:
        return retval;
 }
 
-static inline struct task_struct *eldest_child(struct task_struct *p)
-{
-       if (list_empty(&p->children))
-               return NULL;
-       return list_entry(p->children.next,struct task_struct,sibling);
-}
-
-static inline struct task_struct *older_sibling(struct task_struct *p)
-{
-       if (p->sibling.prev==&p->parent->children)
-               return NULL;
-       return list_entry(p->sibling.prev,struct task_struct,sibling);
-}
-
-static inline struct task_struct *younger_sibling(struct task_struct *p)
-{
-       if (p->sibling.next==&p->parent->children)
-               return NULL;
-       return list_entry(p->sibling.next,struct task_struct,sibling);
-}
-
 static const char stat_nam[] = "RSDTtZX";
 
 static void show_task(struct task_struct *p)
@@ -4738,19 +4717,7 @@ static void show_task(struct task_struct *p)
                free = (unsigned long)n - (unsigned long)end_of_stack(p);
        }
 #endif
-       printk("%5lu %5d %6d ", free, p->pid, p->parent->pid);
-       if ((relative = eldest_child(p)))
-               printk("%5d ", relative->pid);
-       else
-               printk("      ");
-       if ((relative = younger_sibling(p)))
-               printk("%7d", relative->pid);
-       else
-               printk("       ");
-       if ((relative = older_sibling(p)))
-               printk(" %5d", relative->pid);
-       else
-               printk("      ");
+       printk("%5lu %5d %6d", free, p->pid, p->parent->pid);
        if (!p->mm)
                printk(" (L-TLB)\n");
        else
-
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