From ab17e3198be3ae4bf50bf02241c5c1abb3128915 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 7 Sep 2006 15:45:38 +0000 Subject: debugging prints --- proc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 3b7843f..37fd768 100644 --- a/proc.c +++ b/proc.c @@ -403,3 +403,19 @@ proc_wait(void) } } +// Print a process listing to console. For debugging. +// Runs when user types ^P on console. +// No lock to avoid wedging a stuck machine further. +void +procdump(void) +{ + int i; + struct proc *p; + + for(i = 0; i < NPROC; i++) { + p = &proc[i]; + if(p->state == UNUSED) + continue; + cprintf("%d %d %p\n", p->pid, p->state); + } +} -- cgit v1.2.3