From eaea18cb9cbb86018dae8f1decfa217ecbe85fa5 Mon Sep 17 00:00:00 2001 From: rsc Date: Wed, 22 Aug 2007 06:01:32 +0000 Subject: 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 --- trap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'trap.c') diff --git a/trap.c b/trap.c index 43b5a42..217e79d 100644 --- a/trap.c +++ b/trap.c @@ -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(); } -- cgit v1.2.3