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');
{
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();
}
static void NORETURN monitor(void)
{
- Process *p;
Node *node;
for (;;)
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)