Start of an experiment to remove the use of gs for cpu local variables.

This commit is contained in:
Frans Kaashoek 2017-01-31 17:47:16 -05:00
parent 59cdd6c63b
commit abf847a083
17 changed files with 145 additions and 123 deletions

View file

@ -111,7 +111,7 @@ panic(char *s)
cli();
cons.locking = 0;
cprintf("cpu with apicid %d: panic: ", cpu->apicid);
cprintf("cpu %d: panic: ", cpuid());
cprintf(s);
cprintf("\n");
getcallerpcs(&s, pcs);
@ -242,7 +242,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;