diff options
Diffstat (limited to 'kernel/sched.c')
| -rw-r--r-- | kernel/sched.c | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index a4ca632c477c..960d7c5fca39 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
| @@ -4687,32 +4687,10 @@ out_unlock: | |||
| 4687 | return retval; | 4687 | return retval; |
| 4688 | } | 4688 | } |
| 4689 | 4689 | ||
| 4690 | static inline struct task_struct *eldest_child(struct task_struct *p) | ||
| 4691 | { | ||
| 4692 | if (list_empty(&p->children)) | ||
| 4693 | return NULL; | ||
| 4694 | return list_entry(p->children.next,struct task_struct,sibling); | ||
| 4695 | } | ||
| 4696 | |||
| 4697 | static inline struct task_struct *older_sibling(struct task_struct *p) | ||
| 4698 | { | ||
| 4699 | if (p->sibling.prev==&p->parent->children) | ||
| 4700 | return NULL; | ||
| 4701 | return list_entry(p->sibling.prev,struct task_struct,sibling); | ||
| 4702 | } | ||
| 4703 | |||
| 4704 | static inline struct task_struct *younger_sibling(struct task_struct *p) | ||
| 4705 | { | ||
| 4706 | if (p->sibling.next==&p->parent->children) | ||
| 4707 | return NULL; | ||
| 4708 | return list_entry(p->sibling.next,struct task_struct,sibling); | ||
| 4709 | } | ||
| 4710 | |||
| 4711 | static const char stat_nam[] = "RSDTtZX"; | 4690 | static const char stat_nam[] = "RSDTtZX"; |
| 4712 | 4691 | ||
| 4713 | static void show_task(struct task_struct *p) | 4692 | static void show_task(struct task_struct *p) |
| 4714 | { | 4693 | { |
| 4715 | struct task_struct *relative; | ||
| 4716 | unsigned long free = 0; | 4694 | unsigned long free = 0; |
| 4717 | unsigned state; | 4695 | unsigned state; |
| 4718 | 4696 | ||
| @@ -4738,19 +4716,7 @@ static void show_task(struct task_struct *p) | |||
| 4738 | free = (unsigned long)n - (unsigned long)end_of_stack(p); | 4716 | free = (unsigned long)n - (unsigned long)end_of_stack(p); |
| 4739 | } | 4717 | } |
| 4740 | #endif | 4718 | #endif |
| 4741 | printk("%5lu %5d %6d ", free, p->pid, p->parent->pid); | 4719 | printk("%5lu %5d %6d", free, p->pid, p->parent->pid); |
| 4742 | if ((relative = eldest_child(p))) | ||
| 4743 | printk("%5d ", relative->pid); | ||
| 4744 | else | ||
| 4745 | printk(" "); | ||
| 4746 | if ((relative = younger_sibling(p))) | ||
| 4747 | printk("%7d", relative->pid); | ||
| 4748 | else | ||
| 4749 | printk(" "); | ||
| 4750 | if ((relative = older_sibling(p))) | ||
| 4751 | printk(" %5d", relative->pid); | ||
| 4752 | else | ||
| 4753 | printk(" "); | ||
| 4754 | if (!p->mm) | 4720 | if (!p->mm) |
| 4755 | printk(" (L-TLB)\n"); | 4721 | printk(" (L-TLB)\n"); |
| 4756 | else | 4722 | else |
| @@ -4780,7 +4746,7 @@ void show_state_filter(unsigned long state_filter) | |||
| 4780 | * console might take alot of time: | 4746 | * console might take alot of time: |
| 4781 | */ | 4747 | */ |
| 4782 | touch_nmi_watchdog(); | 4748 | touch_nmi_watchdog(); |
| 4783 | if (p->state & state_filter) | 4749 | if (!state_filter || (p->state & state_filter)) |
| 4784 | show_task(p); | 4750 | show_task(p); |
| 4785 | } while_each_thread(g, p); | 4751 | } while_each_thread(g, p); |
| 4786 | 4752 | ||
