summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2017-08-08 13:27:06 -0400
committerRobert Morris <[email protected]>2017-08-08 13:27:06 -0400
commit14270288b7e5327832cdf6a8d9da52ef58fce652 (patch)
treeb604cb49fb049a14966418eda4589cd1271f8e53 /console.c
parentaba8423c4a5ae01828040d04f668f07ec544dcd0 (diff)
parent825ce074b10a0e1f63fd3a1fe245220d04054e0a (diff)
downloadxv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.tar.gz
xv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.tar.bz2
xv6-labs-14270288b7e5327832cdf6a8d9da52ef58fce652.zip
Merge branch 'master' of g.csail.mit.edu:xv6-dev
Diffstat (limited to 'console.c')
-rw-r--r--console.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/console.c b/console.c
index 4d678b0..ca00a5f 100644
--- a/console.c
+++ b/console.c
@@ -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;