diff options
author | rsc <rsc> | 2007-08-22 06:01:32 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-22 06:01:32 +0000 |
commit | eaea18cb9cbb86018dae8f1decfa217ecbe85fa5 (patch) | |
tree | 98c4a9b852ad9b6aaf16016417cf5eeee0b3857e /trap.c | |
parent | 3dcf889c1b5c2c5ddf5b4756f2a731c344f6f08e (diff) | |
download | xv6-labs-eaea18cb9cbb86018dae8f1decfa217ecbe85fa5.tar.gz xv6-labs-eaea18cb9cbb86018dae8f1decfa217ecbe85fa5.tar.bz2 xv6-labs-eaea18cb9cbb86018dae8f1decfa217ecbe85fa5.zip |
PDF at http://am.lcs.mit.edu/~rsc/xv6.pdf
Various changes made while offline.
+ bwrite sector argument is redundant; use b->sector.
+ reformatting of files for nicer PDF page breaks
+ distinguish between locked, unlocked inodes in type signatures
+ change FD_FILE to FD_INODE
+ move userinit (nee proc0init) to proc.c
+ move ROOTDEV to param.h
+ always parenthesize sizeof argument
Diffstat (limited to 'trap.c')
-rw-r--r-- | trap.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -17,14 +17,14 @@ tvinit(void) int i; for(i = 0; i < 256; i++) - SETGATE(idt[i], 0, SEG_KCODE << 3, vectors[i], 0); - SETGATE(idt[T_SYSCALL], 0, SEG_KCODE << 3, vectors[T_SYSCALL], DPL_USER); + SETGATE(idt[i], 0, SEG_KCODE<<3, vectors[i], 0); + SETGATE(idt[T_SYSCALL], 0, SEG_KCODE<<3, vectors[T_SYSCALL], DPL_USER); } void idtinit(void) { - lidt(idt, sizeof idt); + lidt(idt, sizeof(idt)); } void @@ -80,7 +80,7 @@ trap(struct trapframe *tf) default: if(cp) { // Assume process divided by zero or dereferenced null, etc. - cprintf("pid %d %s: unhandled trap %d err %d on cpu %d eip %x -- kill proc\n", + cprintf("pid %d %s: trap %d err %d on cpu %d eip %x -- kill proc\n", cp->pid, cp->name, tf->trapno, tf->err, cpu(), tf->eip); proc_exit(); } |