summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-06-06 13:54:03 -0400
committerRobert Morris <[email protected]>2019-06-06 13:54:03 -0400
commit91ba81110acd3163f7de3580b677eece0c57f5e7 (patch)
tree670536a7f365e75282048b5447a107338b677642 /console.c
parent8607051b5fc79fffa319b913b19e99bc5b90e063 (diff)
downloadxv6-labs-91ba81110acd3163f7de3580b677eece0c57f5e7.tar.gz
xv6-labs-91ba81110acd3163f7de3580b677eece0c57f5e7.tar.bz2
xv6-labs-91ba81110acd3163f7de3580b677eece0c57f5e7.zip
gdb backtraces: -ggdb, -fno-omit-frame-pointer, BSIZE=1024
Diffstat (limited to 'console.c')
-rw-r--r--console.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/console.c b/console.c
index ca20842..b20d4a9 100644
--- a/console.c
+++ b/console.c
@@ -219,9 +219,15 @@ consolewrite(struct inode *ip, int user_src, uint64 src, int n)
void
consoleintr(int c)
{
+ int doprocdump = 0;
+
acquire(&cons.lock);
switch(c){
+ case C('P'): // Process list.
+ // procdump() locks cons.lock indirectly; invoke later
+ doprocdump = 1;
+ break;
case C('U'): // Kill line.
while(input.e != input.w &&
input.buf[(input.e-1) % INPUT_BUF] != '\n'){
@@ -249,6 +255,9 @@ consoleintr(int c)
}
release(&cons.lock);
+
+ if(doprocdump)
+ procdump();
}
void