diff options
| author | Frans Kaashoek <kaashoek@mit.edu> | 2017-08-07 14:35:05 -0400 |
|---|---|---|
| committer | Frans Kaashoek <kaashoek@mit.edu> | 2017-08-07 14:35:05 -0400 |
| commit | 61cb32aa9bc457a6b39c5055cbf7fdd718dab7c2 (patch) | |
| tree | 74f1a818d7722264d8a0fe825760d01ea7a83a9a /console.c | |
| parent | 5cbccef811ce0347370723c0b931e108c306279e (diff) | |
| parent | c9fa90f7e514f27fa1ac071cd9795f3830ab6a1b (diff) | |
| download | xv6-labs-2022-61cb32aa9bc457a6b39c5055cbf7fdd718dab7c2.tar.xz xv6-labs-2022-61cb32aa9bc457a6b39c5055cbf7fdd718dab7c2.zip | |
Merge branch 'nogs'
Diffstat (limited to 'console.c')
| -rw-r--r-- | console.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -111,7 +111,8 @@ panic(char *s) cli(); cons.locking = 0; - cprintf("cpu with apicid %d: panic: ", cpu->apicid); + // use lapiccpunum so that we can call panic from mycpu() + cprintf("lapicid %d: panic: ", lapicid()); cprintf(s); cprintf("\n"); getcallerpcs(&s, pcs); @@ -242,7 +243,7 @@ consoleread(struct inode *ip, char *dst, int n) acquire(&cons.lock); while(n > 0){ while(input.r == input.w){ - if(proc->killed){ + if(myproc()->killed){ release(&cons.lock); ilock(ip); return -1; |
