From: bernie Date: Sun, 10 Aug 2008 09:56:34 +0000 (+0000) Subject: Reformat to be more ps-like X-Git-Tag: 2.0.0~342 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=4d260b7e88d3e5ef2d723ff0810e4c2d723e250e;p=bertos.git Reformat to be more ps-like git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1592 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/kern/monitor.c b/bertos/kern/monitor.c index 1263401a..d46c750a 100644 --- a/bertos/kern/monitor.c +++ b/bertos/kern/monitor.c @@ -116,8 +116,8 @@ void monitor_report(void) Node *node; int i; - kprintf("%-24s%-8s%-8s%-8s%-8s\n", "Process name", "TCB", "SPbase", "SPsize", "SPfree"); - for (i = 0; i<56; i++) + kprintf("%-8s%-8s%-8s%-8s %s\n", "TCB", "SPbase", "SPsize", "SPfree", "Name"); + for (i = 0; i < 56; i++) kputchar('-'); kputchar('\n'); @@ -126,8 +126,8 @@ void monitor_report(void) { Process *p = containerof(node, Process, monitor.link); size_t free = monitor_checkStack(p->stack_base, p->stack_size); - kprintf("%-24s%-8p%-8p%-8lu%-8lu\n", - p->monitor.name, p, p->stack_base, p->stack_size, free); + kprintf("%-8p%-8p%-8lu%-8lu %s\n", + p, p->stack_base, p->stack_size, free, p->monitor.name); } proc_permit(); } @@ -135,7 +135,6 @@ void monitor_report(void) static void NORETURN monitor(void) { - Process *p; Node *node; for (;;) @@ -143,7 +142,7 @@ static void NORETURN monitor(void) proc_forbid(); FOREACH_NODE(node, &MonitorProcs) { - p = containerof(node, Process, monitor.link); + Process *p = containerof(node, Process, monitor.link); size_t free = monitor_checkStack(p->stack_base, p->stack_size); if (free < 0x20)