X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fkern%2Fmonitor.c;h=8da306771b927778a3ff8b3823554259d2b4b339;hb=d2c2001899efee5a35d5a63d8327a8e02b680101;hp=26e2025b514dab010ec961ae298d0567a3892f5e;hpb=570a53d354d611597f9d422dfbb47a609e788204;p=bertos.git diff --git a/bertos/kern/monitor.c b/bertos/kern/monitor.c index 26e2025b..8da30677 100644 --- a/bertos/kern/monitor.c +++ b/bertos/kern/monitor.c @@ -42,18 +42,20 @@ #if CONFIG_KERN_MONITOR #include "proc_p.h" +#include +#include + #include + #include + #include -#include /* CPU_STACK_GROWS_UPWARD */ -#include -#include +#include /* CPU_STACK_GROWS_UPWARD */ /* Access to this list must be protected against the scheduler */ static List MonitorProcs; - void monitor_init(void) { LIST_INIT(&MonitorProcs); @@ -116,12 +118,12 @@ void monitor_report(void) Node *node; int i; + proc_forbid(); kprintf("%-9s%-9s%-9s%-9s%s\n", "TCB", "SPbase", "SPsize", "SPfree", "Name"); for (i = 0; i < 56; i++) kputchar('-'); kputchar('\n'); - proc_forbid(); FOREACH_NODE(node, &MonitorProcs) { Process *p = containerof(node, Process, monitor.link);