diff options
author | rsc <rsc> | 2006-09-07 15:45:38 +0000 |
---|---|---|
committer | rsc <rsc> | 2006-09-07 15:45:38 +0000 |
commit | ab17e3198be3ae4bf50bf02241c5c1abb3128915 (patch) | |
tree | 6603025b78e908076ab4fc89a5e4167bcf8f94f2 /proc.c | |
parent | 1542186378ba1c53744d19b3f2c8382976bd5d21 (diff) | |
download | xv6-labs-ab17e3198be3ae4bf50bf02241c5c1abb3128915.tar.gz xv6-labs-ab17e3198be3ae4bf50bf02241c5c1abb3128915.tar.bz2 xv6-labs-ab17e3198be3ae4bf50bf02241c5c1abb3128915.zip |
debugging prints
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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); + } +} |