diff --git a/Makefile b/Makefile index 5943a7e..fe091db 100644 --- a/Makefile +++ b/Makefile @@ -128,6 +128,7 @@ PRINT = runoff.list $(FILES) xv6.pdf: $(PRINT) ./runoff + ls -l xv6.pdf print: xv6.pdf diff --git a/bootother.S b/bootother.S index 47f547e..9005d48 100644 --- a/bootother.S +++ b/bootother.S @@ -38,7 +38,7 @@ start: //PAGEBREAK! # Switch from real to protected mode, using a bootstrap GDT # and segment translation that makes virtual addresses - # identical to their physical addresses, so that the + # identical to physical addresses, so that the # effective memory map does not change during the switch. lgdt gdtdesc movl %cr0, %eax @@ -47,10 +47,10 @@ start: # Jump to next instruction, but in 32-bit code segment. # Switches processor into 32-bit mode. - ljmp $(SEG_KCODE<<3), $protcseg + ljmp $(SEG_KCODE<<3), $start32 - .code32 # Assemble for 32-bit mode -protcseg: +.code32 # Assemble for 32-bit mode +start32: # Set up the protected-mode data segment registers movw $(SEG_KDATA<<3), %ax # Our data segment selector movw %ax, %ds # -> DS: Data Segment @@ -60,11 +60,11 @@ protcseg: movw %ax, %fs # -> FS movw %ax, %gs # -> GS + # Set up the stack pointer and call into C. movl start-4, %esp - movl start-8, %eax - call *%eax + call *(start-8) - # If bootmain returns (it shouldn't), trigger a Bochs + # If the call returns (it shouldn't), trigger a Bochs # breakpoint if running under Bochs, then loop. movw $0x8a00, %ax # 0x8a00 -> port 0x8a00 movw %ax, %dx diff --git a/console.c b/console.c index 6834c6a..9d2ef60 100644 --- a/console.c +++ b/console.c @@ -7,22 +7,120 @@ #include "param.h" #include "traps.h" #include "spinlock.h" -#include "dev.h" +#include "fs.h" +#include "file.h" #include "mmu.h" #include "proc.h" #include "x86.h" -#define CRTPORT 0x3d4 -#define BACKSPACE 0x100 +static void consputc(int); -static ushort *crt = (ushort*)0xb8000; // CGA memory +static int panicked = 0; static struct { struct spinlock lock; int locking; } cons; -static int panicked = 0; +static void +printint(int xx, int base, int sgn) +{ + static char digits[] = "0123456789abcdef"; + char buf[16]; + int i = 0, neg = 0; + uint x; + + if(sgn && xx < 0){ + neg = 1; + x = -xx; + } else + x = xx; + + do{ + buf[i++] = digits[x % base]; + }while((x /= base) != 0); + if(neg) + buf[i++] = '-'; + + while(--i >= 0) + consputc(buf[i]); +} + +//PAGEBREAK: 50 +// Print to the console. only understands %d, %x, %p, %s. +void +cprintf(char *fmt, ...) +{ + int i, c, state, locking; + uint *argp; + char *s; + + locking = cons.locking; + if(locking) + acquire(&cons.lock); + + argp = (uint*)(void*)&fmt + 1; + state = 0; + for(i = 0; (c = fmt[i] & 0xff) != 0; i++){ + if(c != '%'){ + consputc(c); + continue; + } + c = fmt[++i] & 0xff; + if(c == 0) + break; + switch(c){ + case 'd': + printint(*argp++, 10, 1); + break; + case 'x': + case 'p': + printint(*argp++, 16, 0); + break; + case 's': + if((s = (char*)*argp++) == 0) + s = "(null)"; + for(; *s; s++) + consputc(*s); + break; + case '%': + consputc('%'); + break; + default: + // Print unknown % sequence to draw attention. + consputc('%'); + consputc(c); + break; + } + } + + if(locking) + release(&cons.lock); +} + +void +panic(char *s) +{ + int i; + uint pcs[10]; + + cli(); + cons.locking = 0; + cprintf("cpu%d: panic: ", cpu()); + cprintf(s); + cprintf("\n"); + getcallerpcs(&s, pcs); + for(i=0; i<10; i++) + cprintf(" %p", pcs[i]); + panicked = 1; // freeze other CPU + for(;;) + ; +} + +//PAGEBREAK: 50 +#define BACKSPACE 0x100 +#define CRTPORT 0x3d4 +static ushort *crt = (ushort*)0xb8000; // CGA memory static void cgaputc(int c) @@ -69,104 +167,7 @@ consputc(int c) cgaputc(c); } -void -printint(int xx, int base, int sgn) -{ - static char digits[] = "0123456789abcdef"; - char buf[16]; - int i = 0, neg = 0; - uint x; - - if(sgn && xx < 0){ - neg = 1; - x = 0 - xx; - } else { - x = xx; - } - - do{ - buf[i++] = digits[x % base]; - }while((x /= base) != 0); - if(neg) - buf[i++] = '-'; - - while(--i >= 0) - consputc(buf[i]); -} - -// Print to the console. only understands %d, %x, %p, %s. -void -cprintf(char *fmt, ...) -{ - int i, c, state, locking; - uint *argp; - char *s; - - locking = cons.locking; - if(locking) - acquire(&cons.lock); - - argp = (uint*)(void*)&fmt + 1; - state = 0; - for(i = 0; fmt[i]; i++){ - c = fmt[i] & 0xff; - switch(state){ - case 0: - if(c == '%') - state = '%'; - else - consputc(c); - break; - - case '%': - switch(c){ - case 'd': - printint(*argp++, 10, 1); - break; - case 'x': - case 'p': - printint(*argp++, 16, 0); - break; - case 's': - s = (char*)*argp++; - if(s == 0) - s = "(null)"; - for(; *s; s++) - consputc(*s); - break; - case '%': - consputc('%'); - break; - default: - // Print unknown % sequence to draw attention. - consputc('%'); - consputc(c); - break; - } - state = 0; - break; - } - } - - if(locking) - release(&cons.lock); -} - -int -consolewrite(struct inode *ip, char *buf, int n) -{ - int i; - - iunlock(ip); - acquire(&cons.lock); - for(i = 0; i < n; i++) - consputc(buf[i] & 0xff); - release(&cons.lock); - ilock(ip); - - return n; -} - +//PAGEBREAK: 50 #define INPUT_BUF 128 struct { struct spinlock lock; @@ -255,6 +256,21 @@ consoleread(struct inode *ip, char *dst, int n) return target - n; } +int +consolewrite(struct inode *ip, char *buf, int n) +{ + int i; + + iunlock(ip); + acquire(&cons.lock); + for(i = 0; i < n; i++) + consputc(buf[i] & 0xff); + release(&cons.lock); + ilock(ip); + + return n; +} + void consoleinit(void) { @@ -269,22 +285,3 @@ consoleinit(void) ioapicenable(IRQ_KBD, 0); } -void -panic(char *s) -{ - int i; - uint pcs[10]; - - cli(); - cons.locking = 0; - cprintf("cpu%d: panic: ", cpu()); - cprintf(s); - cprintf("\n"); - getcallerpcs(&s, pcs); - for(i=0; i<10; i++) - cprintf(" %p", pcs[i]); - panicked = 1; // freeze other CPU - for(;;) - ; -} - diff --git a/defs.h b/defs.h index 09fa467..12d04aa 100644 --- a/defs.h +++ b/defs.h @@ -91,6 +91,7 @@ void pipeclose(struct pipe*, int); int piperead(struct pipe*, char*, int); int pipewrite(struct pipe*, char*, int); +//PAGEBREAK: 16 // proc.c struct proc* copyproc(struct proc*); void exit(void); diff --git a/dev.h b/dev.h deleted file mode 100644 index 48d31d3..0000000 --- a/dev.h +++ /dev/null @@ -1,8 +0,0 @@ -struct devsw { - int (*read)(struct inode*, char*, int); - int (*write)(struct inode*, char*, int); -}; - -extern struct devsw devsw[]; - -#define CONSOLE 1 diff --git a/elf.h b/elf.h index 28bbd23..17f8321 100644 --- a/elf.h +++ b/elf.h @@ -40,21 +40,3 @@ struct proghdr { #define ELF_PROG_FLAG_EXEC 1 #define ELF_PROG_FLAG_WRITE 2 #define ELF_PROG_FLAG_READ 4 - - - - - - - - - - - - - - - - - -// Blank page. diff --git a/exec.c b/exec.c index 3be3eed..bee960e 100644 --- a/exec.c +++ b/exec.c @@ -11,7 +11,7 @@ exec(char *path, char **argv) { char *mem, *s, *last; int i, argc, arglen, len, off; - uint sz, sp, argp; + uint sz, sp, argp, x; struct elfhdr elf; struct inode *ip; struct proghdr ph; @@ -67,7 +67,9 @@ exec(char *path, char **argv) goto bad; if(ph.type != ELF_PROG_LOAD) continue; - if(ph.va + ph.memsz < ph.va || ph.va + ph.memsz > sz || ph.memsz < ph.filesz) + if(ph.va + ph.memsz < ph.va || ph.va + ph.memsz > sz) + goto bad; + if(ph.memsz < ph.filesz) goto bad; if(readi(ip, mem + ph.va, ph.offset, ph.filesz) != ph.filesz) goto bad; diff --git a/file.c b/file.c index 12b1561..e10b824 100644 --- a/file.c +++ b/file.c @@ -1,9 +1,9 @@ #include "types.h" #include "defs.h" #include "param.h" +#include "fs.h" #include "file.h" #include "spinlock.h" -#include "dev.h" struct devsw devsw[NDEV]; struct { diff --git a/file.h b/file.h index 1d56145..55918cc 100644 --- a/file.h +++ b/file.h @@ -7,3 +7,35 @@ struct file { struct inode *ip; uint off; }; + + +// in-core file system types + +struct inode { + uint dev; // Device number + uint inum; // Inode number + int ref; // Reference count + int flags; // I_BUSY, I_VALID + + short type; // copy of disk inode + short major; + short minor; + short nlink; + uint size; + uint addrs[NDIRECT+1]; +}; + +#define I_BUSY 0x1 +#define I_VALID 0x2 + + +// device implementations + +struct devsw { + int (*read)(struct inode*, char*, int); + int (*write)(struct inode*, char*, int); +}; + +extern struct devsw devsw[]; + +#define CONSOLE 1 diff --git a/fs.c b/fs.c index fe65338..15b0bfe 100644 --- a/fs.c +++ b/fs.c @@ -19,8 +19,7 @@ #include "spinlock.h" #include "buf.h" #include "fs.h" -#include "fsvar.h" -#include "dev.h" +#include "file.h" #define min(a, b) ((a) < (b) ? (a) : (b)) static void itrunc(struct inode*); diff --git a/fsvar.h b/fsvar.h deleted file mode 100644 index 7f135a9..0000000 --- a/fsvar.h +++ /dev/null @@ -1,18 +0,0 @@ -// in-core file system types - -struct inode { - uint dev; // Device number - uint inum; // Inode number - int ref; // Reference count - int flags; // I_BUSY, I_VALID - - short type; // copy of disk inode - short major; - short minor; - short nlink; - uint size; - uint addrs[NDIRECT+1]; -}; - -#define I_BUSY 0x1 -#define I_VALID 0x2 diff --git a/picirq.c b/picirq.c index ff86831..1230c13 100644 --- a/picirq.c +++ b/picirq.c @@ -82,3 +82,32 @@ picinit(void) if(irqmask != 0xFFFF) picsetmask(irqmask); } + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// Blank page. diff --git a/pipe.c b/pipe.c index 3032775..29c01b2 100644 --- a/pipe.c +++ b/pipe.c @@ -3,6 +3,7 @@ #include "param.h" #include "mmu.h" #include "proc.h" +#include "fs.h" #include "file.h" #include "spinlock.h" @@ -72,7 +73,7 @@ pipeclose(struct pipe *p, int writable) release(&p->lock); } -//PAGEBREAK: 30 +//PAGEBREAK: 40 int pipewrite(struct pipe *p, char *addr, int n) { diff --git a/proc.c b/proc.c index 4333512..d111008 100644 --- a/proc.c +++ b/proc.c @@ -23,6 +23,79 @@ pinit(void) initlock(&ptable.lock, "ptable"); } +//PAGEBREAK: 36 +// Print a process listing to console. For debugging. +// Runs when user types ^P on console. +// No lock to avoid wedging a stuck machine further. +void +procdump(void) +{ + static char *states[] = { + [UNUSED] "unused", + [EMBRYO] "embryo", + [SLEEPING] "sleep ", + [RUNNABLE] "runble", + [RUNNING] "run ", + [ZOMBIE] "zombie" + }; + int i; + struct proc *p; + char *state; + uint pc[10]; + + for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ + if(p->state == UNUSED) + continue; + if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) + state = states[p->state]; + else + state = "???"; + cprintf("%d %s %s", p->pid, state, p->name); + if(p->state == SLEEPING){ + getcallerpcs((uint*)p->context->ebp+2, pc); + for(i=0; i<10 && pc[i] != 0; i++) + cprintf(" %p", pc[i]); + } + cprintf("\n"); + } +} + +// Set up CPU's kernel segment descriptors. +// Run once at boot time on each CPU. +void +ksegment(void) +{ + struct cpu *c1; + + c1 = &cpus[cpu()]; + c1->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0x100000 + 64*1024-1, 0); + c1->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); + c1->gdt[SEG_KCPU] = SEG(STA_W, (uint)(&c1->tls+1), 0xffffffff, 0); + lgdt(c1->gdt, sizeof(c1->gdt)); + loadfsgs(SEG_KCPU << 3); + + // Initialize cpu-local variables. + c = c1; + cp = 0; +} + +// Set up CPU's segment descriptors and current process task state. +// If cp==0, set up for "idle" state for when scheduler() is running. +void +usegment(void) +{ + pushcli(); + c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, (uint)cp->mem, cp->sz-1, DPL_USER); + c->gdt[SEG_UDATA] = SEG(STA_W, (uint)cp->mem, cp->sz-1, DPL_USER); + c->gdt[SEG_TSS] = SEG16(STS_T32A, (uint)&c->ts, sizeof(c->ts)-1, 0); + c->gdt[SEG_TSS].s = 0; + c->ts.ss0 = SEG_KDATA << 3; + c->ts.esp0 = (uint)cp->kstack + KSTACKSIZE; + ltr(SEG_TSS << 3); + popcli(); +} + +//PAGEBREAK: 15 // Look in the process table for an UNUSED proc. // If found, change state to EMBRYO and return it. // Otherwise return 0. @@ -67,6 +140,37 @@ found: return p; } +// Set up first user process. +void +userinit(void) +{ + struct proc *p; + extern char _binary_initcode_start[], _binary_initcode_size[]; + + p = allocproc(); + initproc = p; + + // Initialize memory from initcode.S + p->sz = PAGE; + p->mem = kalloc(p->sz); + memset(p->mem, 0, p->sz); + memmove(p->mem, _binary_initcode_start, (int)_binary_initcode_size); + + memset(p->tf, 0, sizeof(*p->tf)); + p->tf->cs = (SEG_UCODE << 3) | DPL_USER; + p->tf->ds = (SEG_UDATA << 3) | DPL_USER; + p->tf->es = p->tf->ds; + p->tf->ss = p->tf->ds; + p->tf->eflags = FL_IF; + p->tf->esp = p->sz; + p->tf->eip = 0; // beginning of initcode.S + + safestrcpy(p->name, "initcode", sizeof(p->name)); + p->cwd = namei("/"); + + p->state = RUNNABLE; +} + // Grow current process's memory by n bytes. // Return 0 on success, -1 on failure. int @@ -86,41 +190,6 @@ growproc(int n) return 0; } -// Set up CPU's kernel segment descriptors. -// Run once at boot time on each CPU. -void -ksegment(void) -{ - struct cpu *c1; - - c1 = &cpus[cpu()]; - c1->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0x100000 + 64*1024-1, 0); - c1->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); - c1->gdt[SEG_KCPU] = SEG(STA_W, (uint)(&c1->tls+1), 0xffffffff, 0); - lgdt(c1->gdt, sizeof(c1->gdt)); - loadfsgs(SEG_KCPU << 3); - - // Initialize cpu-local variables. - c = c1; - cp = 0; -} - -// Set up CPU's segment descriptors and task state for the current process. -// If cp==0, set up for "idle" state for when scheduler() is running. -void -usegment(void) -{ - pushcli(); - c->gdt[SEG_UCODE] = SEG(STA_X|STA_R, (uint)cp->mem, cp->sz-1, DPL_USER); - c->gdt[SEG_UDATA] = SEG(STA_W, (uint)cp->mem, cp->sz-1, DPL_USER); - c->gdt[SEG_TSS] = SEG16(STS_T32A, (uint)&c->ts, sizeof(c->ts)-1, 0); - c->gdt[SEG_TSS].s = 0; - c->ts.ss0 = SEG_KDATA << 3; - c->ts.esp0 = (uint)cp->kstack + KSTACKSIZE; - ltr(SEG_TSS << 3); - popcli(); -} - // Create a new process copying p as the parent. // Sets up stack to return as if from system call. // Caller must set state of returned proc to RUNNABLE. @@ -160,37 +229,6 @@ fork(void) return pid; } -// Set up first user process. -void -userinit(void) -{ - struct proc *p; - extern char _binary_initcode_start[], _binary_initcode_size[]; - - p = allocproc(); - initproc = p; - - // Initialize memory from initcode.S - p->sz = PAGE; - p->mem = kalloc(p->sz); - memset(p->mem, 0, p->sz); - memmove(p->mem, _binary_initcode_start, (int)_binary_initcode_size); - - memset(p->tf, 0, sizeof(*p->tf)); - p->tf->cs = (SEG_UCODE << 3) | DPL_USER; - p->tf->ds = (SEG_UDATA << 3) | DPL_USER; - p->tf->es = p->tf->ds; - p->tf->ss = p->tf->ds; - p->tf->eflags = FL_IF; - p->tf->esp = p->sz; - p->tf->eip = 0; // beginning of initcode.S - - safestrcpy(p->name, "initcode", sizeof(p->name)); - p->cwd = namei("/"); - - p->state = RUNNABLE; -} - //PAGEBREAK: 42 // Per-CPU process scheduler. // Each CPU calls scheduler() after setting itself up. @@ -440,39 +478,3 @@ wait(void) } } -// Print a process listing to console. For debugging. -// Runs when user types ^P on console. -// No lock to avoid wedging a stuck machine further. -void -procdump(void) -{ - static char *states[] = { - [UNUSED] "unused", - [EMBRYO] "embryo", - [SLEEPING] "sleep ", - [RUNNABLE] "runble", - [RUNNING] "run ", - [ZOMBIE] "zombie" - }; - int i; - struct proc *p; - char *state; - uint pc[10]; - - for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ - if(p->state == UNUSED) - continue; - if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) - state = states[p->state]; - else - state = "???"; - cprintf("%d %s %s", p->pid, state, p->name); - if(p->state == SLEEPING){ - getcallerpcs((uint*)p->context->ebp+2, pc); - for(i=0; i<10 && pc[i] != 0; i++) - cprintf(" %p", pc[i]); - } - cprintf("\n"); - } -} - diff --git a/runoff b/runoff index 3da62b4..21ee8ed 100755 --- a/runoff +++ b/runoff @@ -45,6 +45,7 @@ cat toc.ftr >>fmt/toc # check for bad alignments perl -e ' + $leftwarn = 0; while(<>){ chomp; s!#.*!!; @@ -75,12 +76,35 @@ perl -e ' print STDERR "Have no toc for $file\n"; next; } - if($toc{$file} =~ /^\d\d[^5]/){ + if($toc{$file} !~ /^\d\d5/){ print STDERR "$file does not start on a second half page.\n"; } next; } + if(/(left|right): (.*)/){ + $what = $1; + $file = $2; + if(!defined($toc{$file})){ + print STDERR "Have no toc for $file\n"; + next; + } + # this assumes that sheet 1 of code is a left page + # double-check the PDF + if(!$leftwarn++) { + print STDERR "assuming that sheet 1 is a left page. double-check!\n"; + } + if($what eq "left" && !($toc{$file} =~ /^\d[13579]0/)){ + print STDERR "$file does not start on a fresh left page [$toc{$file}]\n"; + } + # why does this not work if I inline $x in the if? + $x = ($toc{$file} =~ /^\d[02468]0/); + if($what eq "right" && !$x){ + print STDERR "$file does not start on a fresh right page [$toc{$file}] [$x]\n"; + } + next; + } + print STDERR "Unknown spec: $_\n"; } ' fmt/tocdata runoff.spec diff --git a/runoff.list b/runoff.list index 5a8a2f9..3bf6c87 100644 --- a/runoff.list +++ b/runoff.list @@ -34,12 +34,10 @@ sysproc.c # file system buf.h -dev.h fcntl.h stat.h -file.h fs.h -fsvar.h +file.h ide.c bio.c fs.c diff --git a/runoff.spec b/runoff.spec index 76ecb73..dbd6d5c 100644 --- a/runoff.spec +++ b/runoff.spec @@ -12,20 +12,27 @@ even: bootother.S # mild preference # bootmain.c either even: main.c # mp.c don't care at all -even: initcode.S -odd: init.c +# even: initcode.S +# odd: init.c # spinlock.h either # spinlock.c either even: proc.h # mild preference -even: proc.c # VERY important + +# goal is to have two action-packed 2-page spreads, +# one with +# ksegment usegment allocproc userinit growproc fork +# and another with +# scheduler sched yield forkret sleep wakeup1 wakeup +right: proc.c # VERY important + # setjmp.S either # kalloc.c either # syscall.h either # trapasm.S either # traps.h either -even: trap.c # important +# even: trap.c # vectors.pl either # syscall.c either # sysproc.c either @@ -37,7 +44,7 @@ even: trap.c # important # file.h either # fs.h either # fsvar.h either -# even: ide.c +left: ide.c # odd: bio.c odd: fs.c # VERY important # file.c either @@ -46,5 +53,6 @@ odd: fs.c # VERY important # even: pipe.c # mild preference # string.c either +left: kbd.h even: console.c odd: sh.c diff --git a/sysfile.c b/sysfile.c index 4d891c1..ae7d07c 100644 --- a/sysfile.c +++ b/sysfile.c @@ -5,7 +5,6 @@ #include "mmu.h" #include "proc.h" #include "fs.h" -#include "fsvar.h" #include "file.h" #include "fcntl.h" diff --git a/timer.c b/timer.c index 8fdecee..8df75a9 100644 --- a/timer.c +++ b/timer.c @@ -30,36 +30,3 @@ timerinit(void) outb(IO_TIMER1, TIMER_DIV(100) / 256); picenable(IRQ_TIMER); } - - - - - - - - - - - - - - - - - - -// Blank page - - - - - - - - - - - - - - diff --git a/trap.c b/trap.c index 5f1cafb..651a9d6 100644 --- a/trap.c +++ b/trap.c @@ -31,6 +31,7 @@ idtinit(void) lidt(idt, sizeof(idt)); } +//PAGEBREAK: 41 void trap(struct trapframe *tf) { diff --git a/uart.c b/uart.c index 4cd1e0f..576e254 100644 --- a/uart.c +++ b/uart.c @@ -5,7 +5,8 @@ #include "param.h" #include "traps.h" #include "spinlock.h" -#include "dev.h" +#include "fs.h" +#include "file.h" #include "mmu.h" #include "proc.h" #include "x86.h" diff --git a/x86.h b/x86.h index 934b9ec..e754b28 100644 --- a/x86.h +++ b/x86.h @@ -122,6 +122,7 @@ sti(void) asm volatile("sti"); } +//PAGEBREAK: 36 // Layout of the trap frame built on the stack by the // hardware and by trapasm.S, and passed to trap(). struct trapframe { diff --git a/xv6.pdf b/xv6.pdf index 16f6d54..fd4efde 100644 Binary files a/xv6.pdf and b/xv6.pdf differ diff --git a/xv6.ps b/xv6.ps index 4a90f7b..8a4868e 100644 --- a/xv6.ps +++ b/xv6.ps @@ -1,4 +1,7 @@ %!PS-Adobe-3.0 +% Produced by xpdf/pdftops 3.02 +%%Creator: mpage 2.5.6 Januari 2008 +%%Title: (mpage) %%LanguageLevel: 2 %%DocumentSuppliedResources: (atend) %%DocumentMedia: plain 612 792 0 () () @@ -9,8 +12,8 @@ %%PageMedia: plain %%EndDefaults %%BeginProlog -%%BeginResource: procset xpdf 3.00 0 -%%Copyright: Copyright 1996-2004 Glyph & Cog, LLC +%%BeginResource: procset xpdf 3.02 0 +%%Copyright: Copyright 1996-2007 Glyph & Cog, LLC /xpdf 75 dict def xpdf begin % PDF special state /pdfDictSize 15 def @@ -542,330 +545,330 @@ C2A9054AD59AE4D5522D8745045620C9C40EAB675A6FE53511D83C04968F37DE 90435DC2AFD452D1184CEA4CBF9F81F8CD7BE3B6EBA8395A40925FDDEB186DE2 AB0372CF67C17BEE733C73CA29E00C3909E960A0417FCACC7211EBF3DD7225F0 6F4FB7DBA35BF59A21014E1066BF090958F991C2BFD22CCA4189376B0BBFE928 -8CE7E8D06A551258E5938EB0F85097E557F3C3BA2C163A2E572B4DF44E90CDF5 -0B39625CC6ACE15BC6517F8A12C1B93F074CC50585B9AB7EDD0B9C5C1A62B70D -CD8DB8D38BE368A472453A6857C6BD02D53075513414D13BA1A24CE212F22191 -07B898A9017A3A99BDADF041BED9A114BD03BB18F7DE5A50740B185E422B8C48 -309D6D5FE5EA50CC3F908AFA26EE4DEC39EBC3D70FF3BB8B3A3A944A0DCC6146 -32AE70E4FAF468F45769385AA9CE3AEDE458C88F9FE607FF162B8F190654854A -F7C4EF574ABFF28A9A3305771590FCC4ABD946870EB84C1936CA19FD940EE6AE -640BC281178A404CC709C437E17C61CABA72E94D3B9BE9F187B807D43F883E55 -1AC39D4BE693E7341918F23D76809DFD06A103726057B354B409C08830817659 -428E7F09A6016535CA1C526AAE92B7D90B7AD619269EB3A6DEEE48BF53C6C228 -C705837B10C2402ED51A306E771911A1016D089DF42372D756E2346265E01962 -B0E784394FEA778F473FE994F2CB393B6C04DB967C8F585947A3F30329F66169 -59627B9268FDEF0DEDD35B31B7D0345E708C959739676FB4CE239AB72D834D51 -E679B4152852C1BA90E23BE472742369FAF00ED1E82BB6ECD8A09CF36B2E57D0 -AEAAB95A829A7E793F38C4D0E6A1355BB9C6AE4F0ADF76BBAE901546ECB36D1E -7C5650A7999BAAFD6181C1CFECFEA39A2D51C26CA3CC2BAB6EBEB0D31D3532DD -6A6A565A56A6A01E04ED68112910A0D608024AEEEC0D0F389B5441D0E126935E -2063B9150A40657F1C88FC5F4BE2C06AE21167DA0F59E651CEDA2CB33349FBF4 -6F5642DE2B5DDFDCF0C0A172D0D1407FDC7C65FF3814709188F506A53C404A19 -02FE1637895E943792E22E22E5D4BCBD766D18D1088F2A11459139D370D4ADBB -8BC75909D8A85C8E2E85948DEFB74401BF22A6DA4C14C09F1C8F0DF829F1970B -AE6B468573DC729139A2971EB56517AA6D6525E46B5F9930108C7D4B951EB0C4 -707E410574E7195FA7297A29E6D8B5ABD78A15CD0135F3BD612AD12BB0D154CD -86556BACB23743FFE1774040A1C435CF8E4409E75CEE0F028FD12BE41556CC6E -6C850B9053E699C71557FD6B20D83F0BBF57D935CFEDA809B03FD14478C2A8C7 -6609217B9F289342990C415257D8CA8A5174589B50AC913FCE33A9F32CF42140 -F323ED26DD43970B21107F814F9F2CA21C6A88474BDF5EF924956086CB6BC729 -3FBDB874B7A414B14B6BAEACAE671F7944DCC75422E1630F78732131F85ED6BB -3662518EB04A41F4938B1383CFBEDDEED4096C7615CF8D72101D311FCC95D874 -2C40F7FA4FB122EA1B1B0746E9D808AC671A21F04F7E76A6778E25FC3844078A -A2A7B87206B299A27BAE8A89530B3D46579AAFCD5B03EAE3429E4B4BAC79F41E -B68DFBF1ED48C121B7D38C7A51911898175E566ED5D1AF2DBF57EB473BFC8FEA -44362C8E0CD77857D2FAFFEED06A98AE69E0A74B6B876069A460314E5B1847F8 -EE66F4931FA02F5E38D6857E8D0DD3550CB0B130B75EA89B02971280911B47D1 -A1E387581CF5565A4469BCCED698F1116AB57A4CAE6640E23021B10B62923A87 -1E145BDE3052FCB97EA36112168DA1B986E5A524CD3879E3B59550E8311A074E -CF7A58F377F7CE22CB1270BA8E009C483D43E9B728D5AD5A124A0D6635F6E9CC -53D52844E932EAC0CE58FF9A8B1A897C8DE57FC82F9C504FA222FA6BD83C7903 -8F09D475F15F5AAE7C8EE65F17E580D1A1D2979894C0EA1AAA00FAB3B9CBF68A -67331607E61EADB2D9A24001B7B7E6ECADFC5BA3C8CB741413BA4D7C51A40447 -DBEAB6D524D72ADE296EB5E47F416CA680181035E41D14EC6532874F1DA7EAD3 -0B3A37E788CF39AF0CE722F67B2FADA9B926EBB32BA5F54651030871E19463EE -3E82753DCB3915636A6851C48B94B7A77943A04BA972A534AF5D6B9CC41330CD -6723F82581091C8121465769FA47055733456232B6DE1765EEF06223687656D5 -2170B0F8CE41590BB57C4F7B136A7BCA8A5BDAA982C420FB5749320521C180B7 -B8748A630DBD48884C55FCD2E7851E6BA6B81CFE27C7EBCB6D06CCC2E1BEB01D -5D8AA1287BBB1EEF9E55852223A01E2E9A0757FFBF05DCDD6C045C5B322CD9C2 -51BDBE086B791721C47351C3D27057013C8600D9C229615DC859D530ED795B0C -27AE86B4E6E7BE747201229D85A77EFD944DD59444C49684CCBF506661144236 -B8E38E0C1068600992ED230AF22B0CC5CA4D8BA1E3FF31F03CFC2BA540721674 -C3BD926730FBF88FCFD59474EA95D4774D133379355068CBFB5AA84306E52242 -467BF66E174CDEAB2CADB5D1B68F8253FDEBB6220A60668B1BCFA2C99B6B0F55 -2582D2ED3D88F3E47D51179A8E78B182E7AFD1E9D659DF8AC57747D2E74F5B39 -466B53A290657A325B6D6E952C5164AF7AE027914864D086BC0114F33B9D9E56 -A2B8A54A0464254F71AA9D975A20CB0AD1A6DCA4290378DDFD9A7118C6AE9ED7 -E050E9131C103B88CB27BE540AD84B655BCE04BE98C8B362703EC149B747CF6C -45CE28C3690755EF00A86EA467E5D57954BD85CA993A736EFE0B18AFE53A2B2F -8C7F0318388DFF640FE7D43A5803DBEB8AD80C59AE33EE163B4DBBD47C9EE083 -77B76A5E4ABA6DA587687C10984D8B34F6546E8D64468D228B4C2B16BB6370D6 -7D3F92714082450543341D53016172B4117C55FF506341215DD7726A6F8A217A -E44F09BA273FEF22924706B0F50083C6E27B7AB6F5CE3C3EF4AFA9AE9DF17DDC -53482B05A15A136AEDF71343061C0ECAA8C935E446A5F3CF3211C29CCE5C102C -CEFAF415A5B6C411B3B7B01EC97954F0616F3C1AC4740A03C387E6214FCF78B4 -DD78208D75482CF9DB59A4B319A256935BE68E2E8351FEC06ED34F0CC6307571 -60992C344A45D7B208C9AE1F2880A7AB0366719B029D863A9B6015E29957A5D8 -3FC0A9548E25DBEBF728511CB3F4064CCDA0EAB5F7207C9816325A9932C5DC18 -7B1878F89994366AB65B02C9272B75E542E6A1AF85B677A74F674B4F1F6DB606 -FCF0D54594569ADBB8D98554461DEEA310182F8A42CCAAD24BA155CA17262F42 -A23CF3266C925A3B28C632419864E912F5D846F26B2BA8E41680E3E759C47AE6 -1F05DA9F88DD697109DE7F47AD90981E285C065CB239BBEAD6E351C936D778D5 -ED2F551008D997E8614BAFFA9292F5EC1737BFDDAA3AE5F76949A7CC7A5C9885 -9ED1B1FE17E56886B438B5D03198AEEA1483E261602E0ED3DE3476E2A74336B7 -4BD5F912224950284A62A476292E310C3623C3FC55642B1226078D8C98B8E258 -09BA085A3CBBDE128B69932DDD12C12BEFC96F698FB73C120C7E6C49196C063D -AC8A0D23B3CC73770A99EF977EF93544099172992239AB7B6BF47E7EF8E0AA92 -1504B4FCC0C8447257BF63808C56467228A651714BB73C36D87F135A2365F9A4 -FDD65073CB982B77A2C8E583327B16681CDB8178502BF35600D063996718888A -F3489512F4E33DC64E324FFCAD4396AB424A2FD8231D885379B0692386776FFE -AC1242C735E7EE5CA55E3162044A430BBB5F1D5D23E8F09C883B38C653F81D3B -48922522123301079AF07E412B0D8B1B388FEC2956DBFC267711619D1B58DFAC -0D769E5551BE1D806EE8D98483F5F2B390D9B3835602EB2822C3E373016231B7 -C98C540796CFA5029769A9990A4AEE3EAF11C642E57DB4F8094AE067A8743538 -5D75E78C3DF3609A799195FABE087539BF9016802C8D9822E0DC3F054711DE70 -3422E701C6CB98FC04550D5F22C8729650313F56BF47919DE140861C50E71133 -937669C56BD769CF23003964C7364F6E2F18E3BD5E14191DD018785C13A3F687 -8CE0AC2577B5E66823F19F4F67799953E8C90E0B2A57C80C0EDA7F7BAD896039 -F8278D20AE307B9E6998FB1A20D8B35CC49BE10CDD1D8BCF23DB47DD4ABF0580 -34E7334431E4CF87DE972E4A007FDE2BFEE70D66CBC85D0D9574264659EFB7F8 -E02B5E5C655DCE6FFD54EDD844FDEFC4B39D072C188CB5A8F43CD6B2467BC9BE -B44320B057A90B6A82EDCED67932DA29670662F1FE94E6D2EE1A562D19AD02B9 -D8E23529EAD2627260E56CAD7951B2C982E9CCBA68F9C8B95821E470ACB9C55B -0A6C23D6E50A02F9E1D7B8C51CB20792638D0C24EEEF6F4BF271608B24A8AC96 -A7D536F1D40B0B85916E2B5325A1FC7000229C8E87ED5BF56D611BBD40A42C94 -4BE0B0CE264D65D2A47BB72E2B242F95157DC15A888CE0C15A8D12DC3EDCE489 -53059B5D2A04FFCC2D234CFF8A16D50E7EF7C95C808ADB52B3656392CFAA2892 -CEA1ADD997F67AF3526815CF1445F57856DEC918A3EF50D9634BDD22C007F0DB -FEBA17DFDEFD9B60477142D7ABA06FBC976270EBD2FA9CDDA30C9994BC285FB8 -1B38EC16B08B7ABAF390FDDA2561B779A03D576A8C289784442A2A8E15BDB1B2 -2F26F1E0D9BD6DFF68E352D572978437DD65B882CB2720B27A782EE902A65B32 -C7DF2CCEC2C3D1AE1B62BB1E506C7C4CD6F09EBFE5FA1E3A42F9D2D40CC0EF66 -88D3C3BA56BD4E830FB4B096A342C82C97A13DA50908338989413607F7BD2E67 -52E219C6C3954C4737BC9026DBA18FEF07A79E1CDA6820465EDB5DF4366EE92B -867E158B761270C04E3923B3DE5FCDD9D87832FF9482868A7A7EF14F4E626C5D -A94903E4D8FCACBA2A8D65789D5425F3D3C77573DC2EDD7F98C9740B702A80CC -F5408142674DD50707FAA48BFD1EF1DA182634E497B0D02ADA4031ECA6013E86 -1D56FEA51AD28D2A6CD5D39E7D89D1609DF2A5AC3DA3CD28E99E2CE638042213 -2E150804BF8190FE02A6695209C54185EE91F5FDD2DF9C71F6C8DDBA6D0A0EA6 -C8CAFA0CAEAF4385B08287FF18B02F1EC6507991832DE49B691B205D937D79F1 -6D1DC6C6261AFDED7539322A9F0D9A8C6DF31EF96E3D9A712ECB757E30AE7F15 -39F6747AC5CA8F284238E72F143EAF13413DB8FBFC3D41445B66BF6C4741CA91 -E37D58DCA65095B473EB7C726B0DCDB8E17D245BB551EE26B2DFD03F7CFA606B -C14AE7CA384F7846DAE2FF9DA4C16C355BD03C40C89B162B21A4FFC8ECEE0992 -A7B283B43FE8F745161D079566B92500B33C4E13792666EFB12247F9F42DE42D -C587786E1C20D501968A6DDFBF4CC6A9D1A589EDEDA93C54E82D355383963B42 -CD996AA920BC5956CFFD2DB72EA6BCD845A04CD09A31A9FFE1F35A68C47A157B -6C12E69C4AE9AE4F5E68E6922A714A78210DC84570CAE10C507562D952DC5F78 -1A47C7ED427E8A66441F48E66DEA872F63FF179922A3AA0DD210932CE9D35A71 -955DC4C50A441A813F27958519DE45E46D4D3AAC80AD068E934C4CECEDC2AB39 -5B587CC0B2B80816173569E9EF949F0121DC6A34E8D221CD6A6B97355A226B45 -98416C68AC75C066DE8A8C1DB4D333F63F0C04CA10D17334BAE0A17E1668FA3B -436F49D2DC0B432DBB8431CB2901894B2824D8FEBA7D2F9B451A1ED8F6C9336F -3C09AEBD5868D4967E2BBB76E547A545F8D84956BB6CB1EA251E70147A44525D -461BCDAD0EFCD4AE86B75D941517E5E0BD47AD461620C8468A45B50D42FD338B -9383611A437DA474AACCEE3258F88508290E656F32D04A25509C4067982027C1 -1E1AEDE2DAFB02594436027791D0353FAEDB4E999C53A433E2659F339C4E8350 -3374648805CD7684E83BD6F870F50CD8C5C9460A85E271746B3928F7960C2A33 -45B45DABA86F0467201818F2747C2F2C1B1261DAC00A56CDB4C6607734C4BCDD -75C51AACF65AE8681C20E74796ECB1275952CF50C0E2E44DF9B6CA7E617F4B16 -9D3796FCC53FD6AA4715E25904CDD9D99D39F3ACA8E0EE2CB32DBCD45E8DB835 -100F7AF3C6355E9D1794A16C53414073403A65500F157F8A2CAF72D76200B903 -A50F371BFBB8EBDCE0C3ACA4185BB2CBB90F0A2ECB48ADEDCB365FCC670B15DF -2211A605908A650FF1ECF8327D0C02C44EEFA0CA2119ECC94D8AEB9F7A3DDBC0 -FFD77AB26C91753A83C9C6A199CD1522631FEFBEC1B7CD1879C234919E5065D1 -6EADEA7F2DF4EE627412145049488E1439840804248BACA669B34EBFB9A37C39 -8483F48CCF0D45874DB079767167FC78F690904527722737493E5A457B739D23 -8B667D7D6C62F74DE846CFD1D493428F93D0D77FD4F31B8E869FEDDF44812F7F -7B2A8ABB8D6D009DE8673E9D6289B642520080E1ECD3212D74C9AEEFDAD6F03B -3AD829DDA8B769F5516989E741861FF3D74909A734FA2AC954D761E0A49E4E54 -D2EAEF07200CBA1C4DBE1F07321D61D3895B3049BADC895B28E2E676F5714C6C -4C1E3F18DB8C335E20E1C110F792338FCDFBBB31E66C71DBD8EE6AFE6A040AFE -A36193635100707ABCE2396A5AF4AE02651F9E392F61CAC64F82E7BBF9AA0D41 -590B4D80CBCF01CB1C0D41AFB880B8F2A643BC14D4FF06395EB7DC8E2296BBB3 -D31DE0F896E4C76289808EB079D78234728A58B92706029590297F2FC8D8ACFC -E2DB33BC6F51F7557CF8E90379A2CBB9F4C52E9E440E16B998C05E8B8A04E21C -F92A2D7BA5279F8E439D52348E1BD36155FEBDDF2A0589D38E71CF550543873F -DB3BD7E1C9EEB005E3555D1A8F4E160D40EF5AA2CDDF80E166AA987F5A7FA5CC -73B806A3466D65A0E94CC58D23D1E5DFFDACF8EE27BCFF552B8AADAB5CB845A0 -4D2C22EC0C2D19F51156631FB0D030852DCB7F9E18BD6289677CCD792EAAE163 -79735AF1C25B78EDC53792BE2C2A9C77C59C9C0B255A59A204AA5EE07BD78B5A -5C323322B23C6CC2C552EAA869F3EB4EA925953E7F296BB0D66C6ADDE6364B67 -9D52C3B2587DCE7173220D2CB724F4327E28CDE23C49069937E378480DF331F3 -7297CDEED6934BC0722B686E00741D6DD42C8625F7AEF1E32ECC9092F30B1686 -C3830F242FEB01E5D5B755826FFDE99AA0E64357C8CB46A496319698DE316CA7 -EAD6B7CE11ED36A842B277FE5084BE46ED6D00F5C85E2D35E37286A46F160684 -001428657F3218DC8787DE1057B453E3982F116F67945D95CF79E1306C85B1F2 -31C70F21F396BB88A3B05FDAD770B9E805C5C487418BEED6807577FDC12EA1C9 -05B318F199D1C5E7179870599468BFD878920A465686259E09A1E3FB37EBB3F8 -864F9EA6A798A95B97C564D49E74D62B9E7F44562AE0B1326FE6622E87683704 -7340422EEAC561024936949561885388C54D9B7E2F923CD3A293558F26DA3F55 -CF41450CE22E16C1DC1959D640448E9D9259090D4F96CC138AFB8F090782F383 -4D4280A45EDAEDBC77E1012D22976B790F1C2FB9D12A49D30A67025DD0D14200 -D662983D56E91429542BD121A844A47AE91BA21F797DABC1AB56825CEFA4EA47 -00ECC341886D69103F1C4D8799A9DFFDE99FD4FFF8F99D5B6ED3CBAFAEB2066B -460E23885E34DE13B81B4C41B714AA2FC0BE165947C05B14C0E0B3139AF95380 -5A9CC7AFA523DE5635871D9D54557F13737AF20D5255819D47781E82F65E6AEE -68839872B2E47951631A799A99731F8F274F1F2ADE086F4E1AC74BA387D7DEBB -22415882BA7918008CC13877D1D1B4B25BC78A8B176D6E23B0C0CBF431361AF5 -1D4F56CBFFBCF4C7EE0DCB8362D9020F2A6A235D664938E2C8DBD19FAB7DE364 -AC43A835F59DFE26771E94F4659C0509D7B3EA4516544F348A70E4B7B397FD8B -9EEA50A08C89E565C498F9A4943F71812DB77267C54AA8C10B675965AEE05F12 -5B695F7AA5881027F90D331DA8FCAD97EF697A6C31268BC16FF89CF6DD673F15 -FC1310CA106A37E48D75762611D0AE67496FD1FCB7C6172946A12A2F8B1AA55C -250C84EE34937F21CC86922AF593B6BDFD56E729B89011F2955EB91644D81E6C -96AE28F4EE38FE0E0A4B0AAFD38E87710E7F41FECB53B01A9A7100A701449A72 -AA865D3DE7BA1A73FC51FF314C5F5C66A1CA2F6DA71E013191D3299EB9BAEDD1 -A8FC1AAC9073E9C4688E79A433B455A2172398384B616578F730A7052AFF9682 -0BB5054358E6B86B59EE70F3F9C554598B761568A0A06B35035E25120DEB6CB2 -5510E48C460D6D16F535AAD19B5B0BFB1F0D2BE5A8B3DD363D6A62119A1492B1 -586C78570904F5D65490EB8B3DEB6D8EB0FCCBC6F64210107F713F4D8B34C169 -FB1D5BACFAE963A16D377A0CD1D92C3B9B2CD465AFAB34C6D3F76CAF715533AF -45CB193201C3E13F37B13C1CAF9ED0D03F9D28A933D67ED22AFFA09D665A20A9 -6973D0E58F372C8E482AB45A87FEC96161C1555C87EA868E68C033EDF1113192 -081630EEEEFE87DDFCE00EF4C82EB623CA3E59675E178F741837B9A1129EFE02 -41BE0F26EABF3F36D6B74B470D64AB075A96F6771975767BBE4F106DD54219A3 -1998C6A9F83A50C429CD10A61F045EDE780CB8612E9B8C0C1F38B72EA72C6C4A -085F168B91CB48E3774AAFCCC3FDF06EC61CF177D143CA5B0DAA83243F62B5A5 -EC7E2566C23548593BA6713281F6268754FBFC91E3439B3849138BB49C0250F2 -B30E9B84A473AF0AFC95B25771FB26A643EC68A382FC9EC7A0177FFAC3F14957 -39A81E48D79C93283561A6627CD0B4E2CF45C083E715C5F52FD634CC68BDC701 -174436C2BE178ED7868E2ACC190EAD2406BF320181FE634092B29056ECE846AF -F336A067A7B451CB8A55B3B926B6CA7757E1CC945CF4A9EB8C136D5B3387FB08 -384521854B48B8FEFB033815F1DD7B7A598E944929EAD7764F1B1DB3AD44D8A8 -48038369F3B389C6144D25CF5FB0AF7F02DE65AC63636CA934B6E8483B8E68FD -6B9342641BB38BD805A3ACEEA44C5DACC0A897D442D69D29EDFCC5C2CAD38A56 -213EEC8AD86B4B11090004A934D4E20E1AAB9B7BC8BE606973521A40D7851C1A -1140D0686C707B65E3119EBC55E38F64BC747C55CED35B56E3A00080AAD828AB -9210A55A338598291A97F9D79670E059AEBEA965875ED976E91335E2A8DEF713 -95EF33DBCA3056B2769201833AEADA1432628366A890222C37D95375DFEDCDD3 -B08B9AF49D44CD70BD34D860998C42A09B59B871866C04BCA813ED8C5ED37A57 -665390ADD192FEA179E6E521015FE24BFAE1CA89F35ED0B53B4DAAF495D9416C -FEAFA696991DE7FC317756F0D10B701149AD55B83C9AAB8487E76804B5971E79 -034ECC1BBF32D4AF9DECEA1A54E466CFDE1DC58CA90812E980FF86F9FB7BD1E4 -B8F7C3EDBAF7C31FB6E460485A478136B8C609B676700EF13F6853EDD1769DAA -485CACE85CBA98FB2AEB34A8B649B37C26A3450D79F1A4BBE346F9DC6E5A9EAE -7FFD045428526DFF8D7BC5038288AF6AB80EC30EEA5C667F7089EA341981E030 -521FAA7605F39029A8B07A0795E203689BF8401D88E0B378DF54E62F91666563 -1975E1603CF51FDC3DED1325FBACB587B818CFDE077F47BCEA90EA96CA54E077 -A589A30D8E26A29683B978E7B7805C0A611578951FA17EBA1FAEDE4532FDB4F2 -8CBB70249E07C261E9C805A16C32D7B97273D44D7093AA7223F4AF8FF327CC05 -8B5D7352680BFDF70BC067B29749FD58595C4D855108B8AC91C39A46B94CCBF9 -BF5D421A6BBD1D2FCC90181DE02C3D9676E5761B244F36CD35154F5931BF4507 -018903F6D7AF6A82FACF9A00A9C59DF208CC717683B7D14B65F1BF37A652AAFD -BDB1005ECAF203DDD78F5BA80C0C356521F085DE00CC9168EE261F76CBA3E2AD -6F83DAC1827844C18784730E874B98D26A39AB76B4DE23BE7B30A88287ECABE2 -A054A8B240821FB70935C5A1626387F5FB7AD1280F99A09D0819A43E314E6CA1 -C541549D1EBEC7DE52AB56270B2EE2BB2797A2F042DFDB4EB3F7B307C4593480 -C107F5ADF09A7522C5F3F0B2C839E2BDD2991F61F563EA9CFCF449BE280DD6DE -55CB2D6313A7328B8653D8D4A9A105278BC36C452D8DA31A9B834D6A65EEE6C8 -F4168DBF9C3E147A84EE59732AD16AB366381F0B00441999EE78AEDFDA0536E7 -C9A3B4BA7618441904F5DE8958BDA2E2ED9EF15270E3BDE83EED920BA2284CD5 -D5DFFF6820916C7345CE48E9EFDD6D268B4C1EDB957A0DB904EBFC13690A3B25 -2A5D46FC0878E2E58FD82D9ED0AA1406684CE709B24BD19AA0D4F0EE12BCC63D -978A3F55E6DC9C578EAEDB9C0F4F29507472E2DAB275E7E02978DD8B9426810D -297060B76959F88CF7725DAFE51CF079DE00B057398B0519BDDBE4EDA857BAA6 -42D18A19EC754F332592B2F6553B0B2BB6E03AB0F35D923430E46B09EF345931 -9C56818E650C6BC6CCC18A6F7BE90659EC2169A6C626D4397348268E8206B864 -19415C7FBA73C0F417A7A80F15584548C1E9241C45BCA2B10840123A3A223D40 -2A5471845853D355900420D36C6D7AD494BF4EB21E98970C835041A9667C4CC3 -FCC136FBFF820FFB5F598D5205CA910B6B30582D7621415CA0797C86D2ADB4B1 -9ADC12710EA65979C5735D2D933D1D8AE021D67F0712E0B4EB85A5026F03B7FF -8ECCBAEED4F82C4D9F7CC47FC560BC70BE3CD8FE9E338DF601111A5E1E3C5189 -0EEBD61164E7190DB788E267A25E6070885E36FB7873747E82B5E7109C07DB09 -B65CD0B5549CAC0FD173F67061A8461700967DF9AB3A7A3552A4901D2E25A1DD -115B6B6825219F33CEE41710FD4CED40D8FFC0BEBFE0BE3E21F61010B173408D -7D62AC6247B95FC3E60B90088CD552D8204D3B8938A7452C0F7B90088F03492F -BA1E74FDDE953CF9D99078261DCFFA4EF2A6405F9A6E0A3B4B40F839C3F023D3 -05F2E9F43A08D7A11FF9848784783293BB35E69382A34FA65618E3E387DC394D -0A3945AEA9106CF74329A9059C5750C168C244099C075841FDE9EE67A860CC5B -5F4C467790F9ACDAE23D9021C7170F679BB6650FBCBC1F2FC2FE12E0E812DAB4 -FA60AE6A0E20696CF707EEEA5A4F4D7317275B876FF709F01E162DD5B7E825A5 -CD42E805396A85D4A6262F5C948A319C9F55D0FF1BD365DB784ED0A3B612003B -32FD02363DF3E34E9066E9BD587FECEB62E7A95FD4B3AB1C2CCE5A23B727EB0F -0EDC41FFF1386FDFD8D7D266F176B9F8A772B3BD81605CF7CD1E5562F63C403A -62153D6CB14214C999D48F8350338CDE3827BE088A4F8CBC0050D80E3F4FCBDD -FE18FAEDA58E3B5004B8B5CC759E14F59832512506F2DB7EE702ADDDD81622D6 -4B559372245F0AACC6863CFCDBBB43C4BA2DA5E2A749C4FFE06884CA4EB8AEF9 -2C9605DCAD529946BEE9B8D916A509837F0DB35B56A9FEE6B950E65880C4D9E5 -5B2AEA822C3CD924271438683DCC71222A253AD16CEEF78ECFD41CCFCC4DAB19 -F698FDC2B9A0B50E9C91F278C6EF0A3AB894B88F9DF87BCE655105350DA0AE65 -8C18CB46B1B8CC4DD922E0E0A8880B4D9CA3AE96546166429948292E582C27C7 -58C8E7A1FAD01232EBFF57ABABC70A2D9B27983C0306F89FA693FA5D0D8E59CF -C353E7262AC562858BD2ED80D2746537E5C6C848A6440F094235DC81D8E6AFF1 -C80E344A89B8339A9FC337740EEEA92A658F4322CFAFE1FE0238E865B813DA33 -F75DC912EE95AB560C6AC5EA4FE53A63ADD8CAFEA74E4CA92F13EED378ED5D51 -05B522074C605CECB84468AFF0D7AD57CFA4576EDFCE0F45709E03E724FF88B5 -A04BAA6AAE30B0A3CA0EF28342FC28945086D50A978BEF307A9EF787FE7F30C0 -6E7275227D01D5FBD055F7CFCC8A46AFE69F7B036751044829A3A8A23F0172D7 -D5F45E9E671287A93C2E13567669AAF409DAB427A68D3CF2184D76F95AE960AD -7426D2C8A3D5B22D288F369CD3633318291A6470DD9C453A95BC281C79A26602 -C376BFB27C1B4C1A211FE252C615365883BC41163252920971A83D0A5E3BDBC7 -DA9161FD6846220B144D92F194D718E62A17074A3137382DBA54BE70C418946E -FACB7B6F87BC1133F5AEABB4416A29A586971E0E0CE3A2523CF46A7233873EE5 -4701C9E0F40D70CE8782DBA7A30378D0CE3EC44905B94879EEF4A9B99173B2D5 -BD31ECF9A7D0F1641AC0CF5F3AD5A6B0E5364AC0596E349E99729EE93AF80E18 -6FCF51075083394DE6A7E5D9F8046FD09287AAFD06E93C844935D732914F7AFE -1ECA0D3E09419DA3032BEDB9B77F802198121AF72DCBF718D33760AB5E795A36 -A6B141214195FF215E551F218D43FF7A31DE11DA6EDACA9DE896938B111D9950 -8CF881637E36C32AA229A6C92ED4C86D272EC85837373D1F2570506C7BFF633A -87D399697BD741A8F11309130ED1914968DE74C66CCA509B332985B594454F3F -819F43255D89D001FAD93C86BB79384BBABA6B113E3D48EEDCA3CC501A52C0C6 -7CF3FA3CB9FE0FD257D9F4DD1E346E2D7F6CE0CD45CEEB8739DA798F1B7DC021 -6E2B4F910E64EDB9DAFC17D177BD72C73983141BA943E0D1E5183B10B97FC3F3 -5891B4A975D2D5F4739010E24659530CDE1A21B4C5372F7C101CD93F2C4919D7 -345892778924FEAEEB9EA7EF9095D520832C4029B9439EC6F6EE9BBD2B09C3E3 -C4C116C52888BAE3B32757F2C5DFAEC1B385715D58106F6A858ABF0319C96A9E -18FBEEEC6D10135CC392C8F6F40E458AEBFBE3C86AF26D20A67617BFA4F6C4D9 -71CA38DF06855457D01DFD9829E46442661616246B8F8C108FD3C0703D1FBD37 -683BF60059B4792AC240E437D9E94498A248F8E2CE05701632F6C0462C28676F -E38EC5BEE0339540D387035DE9716D53790C3185EB64D180AE2A3C1209CA6A6B -D2631D59A2FC3A339BE9F0486418B7970DF40FEB32DD043D51E09336AC63CAFC -D1231EA3C77114E60FE2A3B1CEBE7630387F32A9C8C6B8AC0800F421FE95C3AB -86DDE37060B43E12469A69E88EB98AAC80D95CB202A0806B1D47227814362AC5 -9C658B2C1D3CE3885D691F2F9CC3209155B45464234443ADC78430B1A98EEFD6 -E5070982520A877293BAEF958B03217E3CDF36BABFE7D1F225C1F621453CBCF8 -5D06089A6D09EDF4D4D2FC940F8FDEF1F78190A7B9C497E677E099EC8527C49D -3F3D1C264878A32F1B92FD4B1F3AFF06AE36180F6893F6E9CD1DBA888A3FF6A4 -DD4DC730B7C3E100E84506CBCC1647C4D37657654F84D4FDFFC8014AF9F139DA -442BF6E53DC92241CB5E8FF3FBC55057A31C78FE07EF09CDA8C5701FF65EEEBD -AFFA2E8E24C0694A816A37CCF63AA0D515DF32149BC462EF16942EEF3F8CA2BB -D2EEB9164D01F92D5597F0C1FFDE270565759AB2662482B99EB1CE8763BCB8D8 -D035E0085440443674BC0DB76BE317599E2E120F69E2BCF40C20F5F225D8336B -CDA75789949C71580F54A229F96CDCFB0E5A4B5BF702F758D4FE9A5DB382EBCD -DB77FC39DF9E900C29F84CC9CCACE86756AA03AAD2481F918858EF246554DEC9 -28868CA6C26E1DC96D5C6EC62615442F1FF35980D77091AE953488401A263E53 -0879E8AAA44555C4543E914543567340870FB4C408BB4F2133F1BC782D2E9E84 -B31494DC916E661DADE54E396001ABE568AAF549CC1977B312C646D84014F5BF -40A48E53DFCD37AC9D6512F0FACB21A2563EC83244ACA4FA526FA8A851FBFBA0 -1EDE61C21238401113DCE80C8BFC413ACB05C380FBED416B4D12CA44995CE106 -08501BF288EFD93BDD2F77E959B32A196D59209E987DA55764F59EAE90E3D049 -4842862ABA2C852DEEA8D0145E67EAB9828292D895D2A44C408F0ED06B98E30A -5857994DFEE2D36021268DFFDF92B482CFBDD79DF3B0AB7FE6E2AF33BFADAB8E -D80B54A1A4E3A9CBF4EEAB86E1B68369C8E918601E061B8B76ACBCFC8EE83FD6 -BB9070B61205EA1F73041D9F7FEE1AEC1C17F89D1ED90B6E0AE33D2FE94157C3 -740E56C12BDD55CF274EE181FF17B8CC6C977C7A023AAA6DFACE7843592F0B77 -487660E3E9E18DF91AD9D4FBC487729F6707B4EF7E2AEE6B58BC9B5ACA16E24C -C849EAFDCE7C2CFC29E9723FED876F6CB28A360F0D15D08E6E59E865486A14BA -067424003AC7E4E26266AB48881662877C3B4A3CF66DC09BE0E5201E6366AF68 -16FCEB60875767EA6C41D785F76CEAA55BA4D5EE2EA89DEE68E78C4DB15DB077 -660AE121989032C6A9BE22B1245BCB6A909D4F128367D0C6F0C33AFFE8187A5A -9838981235051BC3017F0511DFD89143FFAD0D845FAA300FF94B264B6AB61A54 -BDECDB15DFBBA0CB7CEDD533CDA9889C1EBBB0679610927ADA384B1A4008DA22 -E2CCE4B5427FD57BEC44124730CC8F956910EC035C3DFD599B5726043555B493 -FB00F363F20F322388001B06250CFA9BCD41D969C012F264A0A373A7E49A60B5 -D17A59AA21F6B5E00D9B1318E2A7DBE53895F59635D293A1F006955F9131A2C0 -54FD3CDDB9835031B443B60A18DBC2BDF1542E408C11E08433C5B83CE5C9EF08 -01758BEBDDA0C5C0A8A6C878D79423E8845D613230BE8DC2FCA1510DE9248087 -CF1ABE53C77F7364F2853012EE1C0B5DA7F4B3C52D474CEE1064B8DAE82073A9 -C3A32D04658D3317DD8CC3A2F4379DCD22783CE461860BB379841AF0FDC98694 -554015E6A246D822818C2D3F341DC3B892BFC715D14C16437F5FA4EB988D8EA1 -DD18F3D5D6ECE2EDB660D746396EDDE7C1A1A34439759E7AE592E6C126330260 -A8371F7EC8F634C729B39E4B1C30335E96E80E33C300097D7F3A044BCEBD053D -02B99ABE2DE748B036CC9C8C4D5D183066983F026D5AECFBDCB6B911487ED20E -40F8EAA86B8F73C36BF3E1C6DA2E60429DE261BC91061BB7939BC344CC642A04 -0C75DD191714BC52278A8E889952C6A3 +8CE7E8D06A551258E5938EB0F85097E557F3C3BA2177A88670054C2473FD9D0F +D9E6EE78BE4DE7D3B32C0A4890438F857B2B893F8CA4A75001BA5A42D90EC4F2 +B0D3E24CE17100E1A20EADBD615C9B006D73287E8A5580ED034E01BB6AFBB7A0 +C1A5D5BE8ED4D234E62C1E772182E6F6963800F7A410EE3FBBC30A5FFB47BBA3 +62C0896EF2CC54DC4ED804FFB912F5407AB4542A2E55201ABBBCED278812B35E +9703C069C38BF54D0E32CD1C0F7873115DFA318F164F6E50342252E9EFE643D5 +E9C5F46AE46E7E21C3DBA8384CD35EE082D11FE17BF955D48E02736A05C23160 +7592275355E00E6967AC691913925629C1F41E0F49804C413205EF4DD853CD4A +AFEFEEB55FAA06A85289F680D6670531DF5F087ABFA6D1B9A2C381186F70CB3C +CE3FC0A3BCABEE4281A7C3DAC0B396BA8CF66077B079929DEFBE76C413ABC1B9 +E14159DE9583E6E10894C743E1C9D3CE4C3676B5A85ACA7E16E3A19B674051C5 +465EC644D5F2AA776BBEC2DA4B1977A85FA5C08E9E4286DD9BD6116B110B7724 +6AD93C41A70B08EE2FA8E1FCCBC5091B57F55D942459893BE6CC261B726BF304 +78E3F84A7C65A1ADB01906F84FEE55EA3E57A3AF2DA474592C95726288B797BF +F751385F38BA7F09673B57BF2ADD79F0A4A6069CD3C238EEB149D77528B84CDD +E31D788A4A5476B55DE425A4A120EEF60DEDE1F42FFE488A01D1ED003AEBE51F +082784D7A5892C9F5806C2914FCB8CA5C4CCDFEF5D4E14DEA1777FEAE33C139B +355BE39D995C9449B3E55807C695200EF55EA2F7EA676A6770164CB127DA7C07 +260FAEC3E976FFF9A350B8641A4D7B8EB2AF8ADBD241670C96F33EF95252FA03 +F0F65E148FA2466B74557628163CCF600D8C8858D515F09312E45FF4938FFDC6 +2BE334D3D9BDF1293532963B6EE923E356E17762BEF9E43461CFCF403CF9307F +AC186610ACF18D27F662455921F450FD6B210EDC50F0C450BA94577C18EABFB0 +A4F21370E1E3194DB8B48668BF3342A5B33D10631C2CC5FC0F2495302A7EDDE9 +B46C85BA080BF1BF5AE4E492ACFBEBC7A358D213D0325ADB982E378B621963DD +E8B0326C8E8162D878D685D25409F83A57577F1C3A0D46D9B6805C68AFEDBC48 +09E4883C54C678FECB4F587F41EBBD6F7B1F656FA528BA27273B92EA24AEA34C +D31FAB98A48968B19BFBC34DCC9CBC40F4EA35783B607966EEBD88E0752F06EB +BF3FE55F88183F5A21AB5B3CC322E5C56CCDD19E40EBE24617D02E4AB3E15CDE +E92DA46DE2357F366ECA16119EA107853FDFE570B7CBEF695FFBCF049E902B4E +CCC477AF9B9875B6D079FF00A302DAD67363BF90E38CD58C46961F7A53CE0C23 +06B0125C2DFF62A9879D24D9A524BDD035375F95790071CB9ABC08D5FF89A3D5 +583C4C33D9F20AEF1B7A12CE819A6194F7116BC7B171C1BF0454763D10EDCE92 +DBB45261F97E88977722DF2C624DBEAF95D18E5CEFCF466C58958C36A48D4190 +01E72651FD55FC8684C19C3183B306D3A061F16CFA7086C3F51CCBA865D88C9A +589F25A52DB95453BBD66E89CB1E6C8059858A4898772A5307A3592889AF708B +EC8CA855D6DD899181CF8DC664EFDF9A8DC9286918B7CD63490660C033471AA8 +2910D2ADF17271D6A680EB97891D247EAFF2A4EC3BF4FF395BCC292402ACBA77 +F7CE635F25EA8D29CCF6DF4121DE62533AD46D3A84E68AD70991E5FEF9EA2EBE +19C2071821C214700AC9D23586F03E97D71ADC38BC97A4CBE534D318853DD3E1 +968978C85F9EDC6ADE6F0BB3E97A1F3ED7BB9936365D0D15DE805EF048E26BBD +9A671078FCED2DBFF6A2FA1361EF137091FFD933EB556768D1B33A4E05048FBC +0E7C672B080578E8F478BB66DAAA9EC09C4F779553D34C0A6A2D9A685A4C040C +99AAE40D8DB6529065539BFA4681AFDFCC4BE7405875F78865D70BE1815B9E3A +D243E623E80332D958019217B70E799BD5AF9779DE42F7291E824AF4F8D0E26D +E76420BD441F4F7516A667BBDD083B40C5FF9476D707B1C10EA2F8C80BE8C9DE +4DA48BD4AE3E661841CBB3AC4EEE0BEAEC612C7C9C748D0697819680D70F91B6 +F58FE67C3B4F8E64587CAC7BDB08C3A2E594B1AC8E97E77E427A8FEC289B5533 +60CDEA1957D4527DAC116E46169D1B70D742494A567425D0417F3134E623A56C +CE14F537A4A8163C335D2FB084AAC9B5440BD23BFF9F708B1C7CB2DF361B639A +B2796CA3BD382D8F26E991C83F1D7449E3C9869B23494A02606E7DA6528797EF +85ACD89D7553701C04F77C5886CD5EC47AE302F3785944090BFC60818B486514 +1322587334EA1DCA899E1B6FB0653BBB16A15781C25B258028CEB1AAAC52016E +A8F2F36A157759A3232654C0576C51F06A370BA928CEB3B6481D57745A5CCAC4 +63B5E306C676DE356BD593692C80026EC4F5DD0B89785A2D8650289F2FEDF380 +23F066B6C104EA6789AD199F36300032371B0AE9BCC92AE9E94280AB95E7BE99 +E69EEE109E5A34D8D192181AD22D814F49DFED9B87149C8C3FA247710B996F6B +52DF6C1ACB344F56878C706E0B4EA2C33274FC47A03E549CCB29D26C1CC50450 +C4F1178015B818357F327FC4098FB65247ACA89F7852A8C5BEF8A61D928D3E29 +792F36AF218C14E22095213B9BF70F4A2AB9F8D41ABAE3F70BFD3E64434ECC5B +8AF293E0657F662F071403F7B2BB2DC191361860DDC9761CF201A9E5DD64D0F1 +EDC9592D92EB02933A4E063E224301316A22F1676DE180193B1063733D5FBF31 +85C98ED0D8C1C459F41A6DF1A614740EF25462C7748AC4615A4C983E88089255 +ECBF5A92B7DDAC6E9BC0C1AC135977F1536CE490985B364118E7753B1B5D40B0 +40DE97B0EFB6A1E09894B24A32B1B2E2ABC02C64D2ECCCB43B8D2CE9BC9ACCC8 +F570F3AA2252EB95EE46B9452DF2EC804879265A0AB41B42BE6BE78777EF9487 +74F81B1B5D92DC44926F3C8421A432589B8C4B6D98BA9602EDB7CF5BDD7DFBDE +B6C37D3FD4112313F2D404AD0770C84E9E9BC3AE4E0A12348B096EE17F95BCBC +874F5F024D3B1E4515FA9457AD089F1C14A6ED93B0A1520C3C8435D8B9CC4FC3 +39DF5D18913CECA2F9FD3DFA46424594315D1400DAC9F2A09299F4C9D7D41E34 +661E0D305E9F62FC4E36BD2FB79021D8CDAABCFAE932E23F74CDA3600121BC33 +517A1F8CF50CFF67224D8F919290534C8CFDF8EA8C688E409BF3E831FBA6B2AC +0BCB08B086D6B8F6243182E8BEF410B7551E32AB6CF2AC674A3A3A926EDEE757 +F19BFCA5BBAABB1523917BCCFA765E1360DEF6269CDB2F18A55AFA721C9C78E5 +27EB85923D08AC830462E485F9A73F4B092703DF336CDCFD15031619597C731A +37E3D119025984C85D76C493BDD17187D760AD92E22CFCFE8145D07CD8400522 +0777845D8746C9A6D111E5F1EF2419276113092AA4F5D41526D6F40C40CD93C4 +4896F797DE2387E2382D8F5A068EE0290C64154C77B0D79399D85E81BB3B028F +96E0CE1AF4021CAAAD279F78B18B54977BE8B5046ADAACC7464AD41B0C0D4E68 +FA2E980EF83C094CB09BFE4FAB84C02C70B88B9D071684DE404BDD0FA567FB66 +EF04E703C9F8580B0A095FF6076E4935A125265C35A49D263E4D3226C1BEE986 +8DEEA8F6ED7541C2EE75BC8FB8330223ACDB932803B4007435B0F36940C86510 +AEED548FD5B9E056EBF6F2484FF612D7681E04D1E87D708D95C64E58385045AC +2A87E7F6AABA9DAC680524CE99C5E7A4DA70A14873FE4A9E4F58CA6BEB0D109E +627947411DE2130D783D43CC6D3D6725F79E5BC46E14385EF63D569BFEDDBFC5 +CE454F9B754EBC68A1DE413063FF6005E027DB80750003B112C93CBEABAA04FC +E07F75A62E7BC5B34E802BAD054E3DD77A436B6A5FCC5B006E38D628F69E0409 +BA8E2D97754CE7C8B00DB026D10E4FDDC3369316BB4E0B944EEC0BF4A5544EF5 +1FA02D9B429267F2C9E852125E556A0D1116D04C2A97BD27C518ED07E952EB11 +2C0B1960FBB05CB5BEBF5C91D1703A671AFF159DF7BA512726FC058213635BA4 +11D64072880D65AEA08C585BE4BBA690528242774855410872E61DA5279908E4 +ABE0948928C1E2E47C61FCB67C9A83E489454F29E18A4E646A6BC5E367D6D84C +4B70D67CDCAA9B729085EB85582265C17E56FD97C71EB9F3472EF2422269D69F +AA40ECB9062D232AAF45AAE6EA95223C95F48F435666C06EA821A00F4F614D6D +457A3CD5AA85614D60B54BC13ABB3264EC1D822FA53ADDC1E7551A9C3CED3A60 +840A2A924BBF48CC951ED9ACBB4B7759CA3A75345DFEA4BD12543421C6E65FC3 +8007DB5EA10F40B4E0797E171F42A0A70486132291040C587F79549AE2A98FA4 +DC43764E8ED321DC920EDF6A79C34839E3C5BB11E7F3CC939AFF71AE82D8BB2B +2C4CDEE000FAC57BD089D8D5C2D6317F85546F65828A62D32C3D43A2A21EAD07 +7338893F0FC2B7C2C2F0D7F8C066549174C6C411D066AD5CBEC6892C2B092866 +3117CE0F58AFA7A2B061DA228B8CB96E533415F9D9E5F80A3E49529418775E22 +59AC479B3BC8A9A1F01CAEE5D95897730BB50C0CAA2D8974EC9B90339D08A840 +DA8E831BC7D2544A636AC9693861A4A37C8EF436896C65398718B4903598FB0A +60DA2F1C172D2362FD0CBC94197EA355ABFEBD7E8E6B95ADC8C219FAAC322876 +312B362C88BC3422379422D3DD17841A2C9D1F32FC15EEE6E780745CAD5A61D4 +FA61A2C3394585C89B5D78165009CA3620F333A6F360E06118C4B7BF69E6675B +57BB57D837E05E1F1F11A3C1276901B507B967BA69B7DE18A17BA10E0DC02828 +811E45FFD3A83CD75E69CB8F8B50F820F7AC6F1DF9776584E7778D683BC6CD2D +A9D611470E6E7AA289576EBEF0202221847E2A46286DAA4366188B425AC2D3D3 +D883B9412725017F3B6C2F35316AA01EAFDEADE1806C48AF7E82EFDDF2A00245 +DA561354F1761D126C030ED21705D89E255931B47EDB1A52C57183DDD4D33F99 +BAB362278939C80F739554D6BFC7119D941A68F33ECC2901AD2B34C0306C47EE +2372E7FE3DEEC8B02789420272BB7CC2FF4DF6D23569A118046033C811232A1D +5BCA1D629A4FF3A2C2492C0243B70C8D090778A766474FBEA9DAB50C3D29B7C5 +66FBB2D444B3C06B7C9241DF74C77DB5ADF648822014C49F9141CA9323594675 +E9640F26D24BF6B9E540034F1ACE1AD766E450865F9DA29B2F8BDF66B4FF8025 +BA11D57A064CCA9B211DAF756A18621F877942D8A30ED103C6186884D68153DD +BBAF399F3D0DF5169B0E94A214B7D18F672A48B937A13133ABC5E9033734B0A2 +12A7B4DD72BE1886ADE94B968D11D29CCDA8251C2A284287037543A6E240CF67 +0EAB7EF796BD4DBD313FD3DC6D3535674184EABDAD1DA7B0A3AAD4B78CF82241 +E378FBF975403D8FAC2AA692686545D1550E8B9F457A396B3F68493A342D1982 +3E6E24DDA7D014EA1A297C38078A3404F0D87CD299DF9BF3C93FB8F236BBCA14 +F71300C5710A43605ABA308D54DBC954C66F03123393A7379C4F20DBBB03DDD5 +C273C234E8EBE27F93347F1E5B3EC0FFCE0440A205DBA5CAC312245AF05BFCC3 +734795D36BE536F56BBE0E6A42E9E9DD7EFC0B6A032E250BE71996B41B743D7D +B2C6DF05A46CAB1FE425D0AEE07284E7A556AADB19B9DB7F4FDE477C87DF72D8 +EEC435D249CC2D564C57F2379E9912A0AAF33661D0CCD213BD1A38EAE0D4535C +08BB493031B1FFD9C030B98C455C9B04304B1E628CB95FFC7FA6AAA12C2D2C83 +9166660FDD6DFC6C0CD04FB951C6BE616A258EDFAAEE4AD926608A4A36B1CD55 +9023D8647CABD029C539163705156A854D36D83EC488258C38C9B1126555D7AC +68B4B770A5800B06D374230A78C9107963B637E39D6DC7497883032EC3055DE6 +CA392F3B2ABA182FC0C468549655B8392E94DB4D85AA14DA0E3B2D3B3DFCAEE3 +F5CF755FF7A7CE0CD930DE5AF138A6262898C2316902934912FAE3924A9833BD +8D5B85F35EA4558E1FB9FFAF597F802F89AFFB5B289884A9F9BAED04084DD7E3 +A985178519BD80E3224F8533AA2D954F75096E490ECB780E6CCFF07D91E02D2C +67AF4A699F81E84134E3EA69467F5514E5F3A73A9936839729E9347BC77B709F +19137F238C2ADAE3858F31034BBEEEE79079F4B2EBE3081701B1B2FB0F114899 +C59DB78F99ED4B980DA4F04251CEE1F478A470C3954E5E83212726EC6673273F +A2285C9AD2BCE145C5EBBB946EA0D58449BE7C77332D1F222EC6C5DF2D559BAD +6E0A3122812688D9D2807F09FC09285FC0B2D3FA570E49A776B00DE85965843A +B9C936AB2C2D8960EE0FABE64C7C983C546795A4C258E4E73AADF310673C9A2D +534055FFC79B03C3E455643AFB8629AC355BAA755FB8DD4AACCBB21F2CCF8FB1 +E51E0B5C608EA149C6E6CFE107113C36FC9C85AED43723B11AED08B1B8661C0D +EB0C7DD1EC047371DE2A4C24A789CA5B186A1AEC4258814A37FE30706D29ED48 +7639345B0CDB29BF192345D5AD372BA3E696964D91CF03748F3950BD649FC102 +A1E09A59AB246350BE4A7831D126472D627758741C8F38B6A01C0DF4C2F27C68 +6ABA6364D88DF009855B73630A4C3FAC44D2F0E2488EB71808D003C12632EE18 +039732BAC01B13E1A4D8C80C8BEF266CD168CB79462C44D0F891B60E0B15CCD8 +81949F998147933D377B10CF3AC3845FC2AA53ACA02AD96DCE8314416D09F2C1 +050AD9AA80448527A9947CC7B9B365C23E950A02FF730D1C3C91CBF14A746E6B +7A2B87FD9561A4FD6254E9A2A3004B0C9A0C2E59CB914178FB114BECC02CD370 +2DAFA039EAD3D35D6CEDB468C1C42404B88BFB70C275D8636293D1A71CB48CAA +D971DDB3252B324A5499E419CCE408BC03B688F0D8774D28D7E5D740110DC5CB +22B3CD013F61BAE5983B56D23143BC45C94CE85769C1846B1E2BFC36DF7BD587 +37919D573819EC3EFAF1EB66E2A07469CE0CE596546EBAB2EEEA5F73645429AC +551E5C8F16966BC0D32D6E1C9C3EF288EF36F977EF3751931BC881935DFC6C40 +E547AD3A923DC51D1072B085F1B23CA0E191BF3D010EA0A01C83C973B835ED74 +7DFB263E2848A83AB9E06F5071F6D252A1FF14ED1A6AA8BC3DA3996207675678 +CFCFB1E134A18D1CC3ABC395CF287E139C4338CBFFAB27345A1541073127C242 +1DA55018AB81A6B3738BF659347D8D70D86B8F4C40B8A9E991DF788399B5F13B +50ED46EEE43CADED29594102E07602154608111060499F7C1C03E5372B415F33 +5A741E8EA5E3F41AF934063C94641F1129204EC1019488EA4FF89D7B003CD643 +7D2314441404815203F7FBC2DD130A5E1C5610457E583363D8B439B75C41C3B2 +05E2348A4A826D4DE429E1B61FABE14FD4ECA2C3DB124E738FF3662840AA03B8 +EF40A8D5C60E86C341D1755EF63F1D82DCA856402B949945265283420BB2B4A4 +FBF7023F2C0B36348145F92EF66D292BE48545C5555E670B5EFB973B29FFE465 +92247869BF8E3F0644CD5754A3D35FA3A1DE5BCCC43F0BE41BA782892DCAE8E5 +5EB501686B68B9C2CDDEA53787D795F59E9C827321CF42062C503F4D4B591BD4 +0F2F661B5487F7ECA6694169D335ED8EC725E53AB0CEB25CAEB9F832E93715D8 +8C8BB6F6742B14CD5F3E837A636DB41DD9C109E9771A2F8C7D7A7D12BBCF650A +BB131F547A894CC90508A936EA97154E81443C052AD474592314BE31FBAB4A79 +4C1992A35BAAE07F6816D542463726930BF25F75AD69AA44E90F55EC8A1AB06B +232EE37734835402F80EBD4E69C375D3E704B272CC7E2E6C812092E964D2A78D +A0CF906468847818EFD8E672B97CC730EB2436FF83DAD46F833D95A0EABC3AFE +7951E829846CB4CB8B2A64A31B86A1E8CF37AC69DC3E43914D73F3559AD19ED5 +5DE7A9BBE5372B8D7F6C06E28FE1363B1B77174F7E97497E98E495EE2F86CED7 +A22F0865DCEAC76FD32BD07072F6636C889A39B646AE1641CF717C70BE57EDB8 +24DB4F1D9C6B4453EF20711E2C33D6D51D7603D9E27999EBEE31BBBB96099D35 +1ED28E3D77B5028CB8245F9F1F085BD495985F61B6CE8CED485AB27FC2D794FC +5EECBE80BD5052927A9C7BB0E22741016FD77C05161A42984226ACE328CD7491 +878CE3F6D6134629AE55F1F8AAF5E8EC88B121D2F1850103485FFBD67C1F125B +60EBA8FAF5F8F6BCD056A2050EBC8A9BE882E51A12BA0EB984DDA5F036C74D9C +46BFE98DFD5AE9DF43DC7D2E6034F977B02D913B54B1F8CB7FA8EF3CB50FC5EC +4CED60F5F3A3424A0FBE73DFD2ACBA8BAE6EA148B2FEBE28FF278CD323C07AC9 +A2B110E495B78830DD0AB7DF1F59F2625F152434C463082FC4A8024A3EA832EF +CCDC136026BE3535624BF9388F6DAA69211BA803D28DD7F682316BE640B5DC60 +4F1C17CB2BED14D0E2D976BA9AD98D4A4BB32A5F4E0A4608F779D322AB69C0E0 +D3D946BC374AB7E58129F3C8F4139F41864A6F6B028489EECC5CF08B48B64AC8 +CDA15F607C46D0C84C338301118A1909C41EF10FDE679A3FF3BD43EAE0266C52 +55B90327121EAA3BFC28718549B69464C2A327B412B11A6A6226B4E71067F2E9 +D9AEBE4EE4197BCF55D79E09767680934D4E91F59007698152E26E47CD595996 +FA0C868118EB44D0EDFE8FDE630E0A7EAA32728840543C884A6CEC7CFED9A4FA +B438669A347B7E8F33CA026BE9D7DE3214DD7A8A9C2B721E6F8074A778294EE2 +D26BBF18385183D9BA7935BDC4920B39DB2A62377E236BB83A0937919F2EC120 +FEE0835B708352C7DED25FA895E667253C32335DED00EC040D75A28ED6B50076 +E4FC37CB853DD6A988348B0E9ECE5EBAA941647B11E99D449C4B367305B25E5F +875808BB6FA323998593B76EC7596969BA37E9CD0017B9FDBBDD1CAB935B6896 +423D6BAAC8110C443EF8BBC71F839CF4077C2B816B81940A04B07FA1A86021A2 +9D97745C980651014B2D879612549744F8F60C975B0AEA4F58DB91AEDABF590D +F3565AEE2A42881D52EAAF61A1E0258E529F7192B00005BA29E8DCABAF23CE64 +85B43F3EE8ED421A430295022518E77C7876B9398FC9228A53C5332AC36D7576 +4DEF2E02509C00A50CAEA4B2C22B4F316E85DC0F3B6B1BE11568005E8DC6B4F5 +CD4A74ED1A740B0B79873B6294B3053CC3B4588CD338F3BA38181DA87D50ED1E +8AE949573B74E2831223FC295196A0AFF9E374ADD0AB7C740AE433E22D5259CF +D42FC59A1AC0B9B807BAE8B4B5B85178F5DB5B5FA55F15E78F968DBAABEDA411 +815CB3299D75837957E10A294FB8755CF1639F25459242E9D9959549AE6FF26C +E7D0F8C9D157DE5567F74545FBBDDA11C66C308E823522CA56889D77DFF786D4 +8FA6EF10FCABB728E5EA13518E3738CC5D401253E62EA343D4C263D6C0E140EE +8069D3786BCD1282699A819FC230F4DD9AD1B7F6583456ED9BB16B27AF6C6BF5 +7533C843529343EB6AAE897F72AC8AD3AC2B86861F184DBA5954287DC6BDD479 +D609146AC26EA9CD5E6FA2D31AAB09E86BC096DC387C5113D372B0E229E59862 +D6E2C4CDF2CFD3493D615F554E3FCCB2D380B807A84285C79E824E8B01115B68 +90A7AD75B40659CF1E00C5C89DDE723311DB89F20582CC9488FE05753E4C0AF8 +F967AC02AED325221AFC0ADF26031746ED14017D1CCAA7876623B24B5574E821 +EBDB7D28D01E41207AE960B7074180257020E4DFE6E154C6CBCF4B0F76D4527D +F9AEE2796870D0CAD98E1C4C8E1812819CBD41DC23AFBB05590D99960F6A1FE4 +158C92ADE602291F10711FFDA3096574BEA51746F1912B3168BB8487C0D56AA7 +2E29F56BC39ADE17BB04FB5EDBADD1B1FDA28D94A25B6591868279CAD0EC57DC +EE6D87F27BE4CC137636F020CB67BB3FD49E81FF7A1BC743C34552A2225CAAD4 +F24DCCC5937AB1088F5971C626BEDD244187C6E502DBCF9AF99A8E94D70BFF34 +8DF971DD3D588095607654A4C68E294765B0ABF60CAF606C5820C15ABC981948 +0DEAF345D9512BED22C680297524FEF661F7631F411F49F7CBB1438CD638BAC9 +3DFD95364CF6B5A86866B71DB469BCBE84F4B18C58B83F3DB42F6DE0CDBE79AD +51B67782C26D2AA1EEDE9298B06B3DB501D69EA70ED1BBD458D56304D4977A90 +537C09A1315CDD3F05CD533C25BEBFA2C3A24120438259A1E6C852696D32B546 +0E5FC8730038DE7261DC9B68BF3B52420FE09212AC0F403992D3476F6B7EF59D +CD643F03DF57DEF1CEF074F9E2591753EE143ED8F8F0B2E42C7000855F7F06CA +8AC95D2985028298134EF9ED6035D9E300F78637A0C905000C6E1B7F0F1F681B +6B5EA55E69C078DF37BB9819B6E1807D241D167D6C2086D4367879E552416576 +6DB68C501F1C9DFFA32640B8DCA7CD767C3BD1703532428B7400BC8C38D5BC4D +7EF7F908220CCB7C67255AF40B184059175275B8F0FE08D28D82B32B99865863 +D2866C688C927FA70B00878DD16F529DB491D1D6456434BA54883D2EA1C81931 +7C4D71C8A29DC490307C2D9FC709BDAA0B1C07D096AB99B37ED474E510922002 +C0A1EDC4D0F790918E36929A23C2D47AE922520F844122220F0A25743E91CA91 +33933D5041151AA61D1ECCCA11CDA91861AB793A171B7F4F76D913626DCEC3A2 +A1F4F9D8B83D80B0BA340D7DEE1BDCB03291724468B4B6D2037791DC0ADD2090 +0A68AA2EFA4BA42C4F4C6E5FDA61981B12964259ACD12C6FD61B0FB34A5B1A53 +166CA665B5E11D1DC3F0C256B2A59C1E968825144DD00E6A635C26C8EFDC1C57 +D8A6A0D7EA6D94159DC424CDF940B98969F61A5B8D06FF6C0B5369FF0219DEEB +BB4AB771858F5201D7E1E1F3C2B029A6D4914718212CF04F9F9A8B5D64A39C50 +CFEB0683AA4B13EC31CFE436B07E3942DFCE3FF9D79A403B2B1CA5500D87302F +3F7320A9E3E584FA56DBB5E1BFAE1A5A8E46874EDD30F815670A8932B3A713F8 +750922840D0384FEBD43826CA3C4A907333E672DF7A83E56209BA1B29A792A0D +8FD3802E1865A520CD01412513CD3DB48B520BF6EF96619DB2EBDAB56E0C747D +54028E8D82838CA10605A47AA07512802E28E9474CAD997ED0F5073568F8FECB +52FEB3794DAED679953A1E09066783C3DB54BFB90615583E298E2BE6C789FE07 +6DD80318DD40D3EDD5D63CFD5E945380760572E5D05BA60538CFA1C824E67B62 +2A52ED82DEF28FD2C15BA114629652C549C371C6CDD4AC9744DEE55CFACC79D6 +FB4AEEDEF908689F10FB78BBF26AFF4C30F016D6EE7F12D93A99C5ABE16B5BFB +ED7E99BD8824CCE90EE8D79060FA838002DC4BDE312EB540805055294F581E02 +17EA11C2FEFFBF924842805C007060C5F8BDAA97986ADC70A1C2C767B8F8AA3D +513DE9316C366CC20FCC147DC28A9A4431378995456FEA61BCBAC8F4814EF566 +A09C20A97B44DC85FF402F6356FF4D41FBBC4B9E281F2558BC876E880F1D6E00 +EEBFE74389BD8DDA4DEB3EBABC1134B3A33084AE278F5A0958A94A9885184021 +C1687D37A0EE6D609E1C6F599237AFE90C0B662A26F7B77A49FC006669D147B2 +3E15E8168AEC8FC613A8AA4905C08049556B324EE55DABFDFAD2750C087752EE +4CEA95F9037DCFED7E65181A40FFC34E578235D6BFD6CFBBA7DB07C42FCF5A70 +4CC0AB4267076DF7C26FFF943856C47C181FECE3C71242FF486E90AAD89838B2 +5FD811C488BE6F554697C09F7A3689C4B70D34F659B6E83B3CFC4FC310C00D22 +E07ECCC0C2313AF5E00E0F905B943D241BA1804D89AA2359A1B69D765F99A475 +78B435E7E97542347D6088CB2E254E2B504D7A238D4E943E5656E0D07AA42D96 +B2AAAA498859DAA8FDDD2E466C43A86CA892EEA228DCFB9620E8B38C6DBC9090 +0C12A9B74005570FE9B3BABCC90E937F08783CA81177ABDFD50B26C7546B760D +70D725D0E6E84A4076DE94679D13FAA5E0A59048D9445C6E5C880E89BB629811 +7995A190396E414A191AE14796E0DD37E5F55DF3EEA519357E55126C0AB57F65 +AC1541A44701986EFC037029846B0908BCF35E50C8CE64150D39F6F9E766B244 +068625F647C3A821828623458BF1CC290D59409DDBC7F14497F3234119725A34 +E338EE9AF8F1D6367EAC19CFF7D0C9FF9D26222F3680DF6E5FE11683B099152D +1CE55AC55E8A5C66F9616B09835451595DA23F0B5685D56DCAAE57A91FEDBBD3 +32A021048E7B5F27B33E01C296E8376EACC74D544777205361165F04B9AC80E8 +A3842D72E54A2E3DCCE846DF8852B22F3F6D635E91EE25FF4BE11FC732BCEC3F +E512C9CEA9827CC632964ECFB6159E736D5F483D58F1380A6D6B5B69DA06957C +7C6050F7E9FCED0676749563321CC8B024059230018A038765C1C42E665B168C +850A919D5BFD33D25DE9097F073D0D20B41352D6A173DA87D3F14F622E856ECC +951CC137475D537A04BF0573DF6E7A4BE31B6936A22AB1CA29408EBAF1818333 +62D68005DD3C96BA2514CC0D7FF7CE7DC70E46E37FC4342999CBF2DBB3AFF11E +31BD273D3AD3C6CB2FEA548A412505B6B57C3A01D86DE68B4A6B38D8FA9D7257 +6AA9BB5F6928F5FC2170A92C029F270BFF0465E163FA9567A01B0343A6A26DCD +C572A7CAB93627D42053EC752209F724F249974C10DB889E56FE84CAD479758A +1877543B4BDA880D90A0D39CC1D681C87F3E2350EF7C088226E680E59DAC2C7C +70C67AD1584221C01444C6986A7C5D17C8FA8B941151957335DF4F3487A7C935 +E657A16D9C7FCBAF80FA2D18950E9B8EEF27B19F3CA257E5E45DC20EB505A5C5 +47904A5A11BFCDE407DC80B8E7465856F771945A4C131C1891CAED172711E435 +B2D4CD03AEEBFA6CD512DB3410F1762CAF16211CF33A63DEAEC9C5BC55EC0360 +C1B06C072EA39AAC802501E1A30BF2CFC7472A24A59FBA0215A2310101E3D950 +1EA78E3A2CA04F75D08CFA838A5A9C793EDECEBEBAF36F8B5ECBE66B4E47DFBD +7632C94EFE94689135735A05E1009EDA2C4EEAAD08673A98EEC613F9EE587150 +81AF6FC123FF11CDDCC075897DEB65DB03A2DE5615D456B4222864285C2046DD +3A06A64BDC38F1802E9AB386A1DCA85F69F82FBDC30854BD69748E1C948CC905 +DDF341CBBCD21E17F15028EDE13BE832A95DFD19E8B006B363B2C8F889395FBA +4E4ED0D676243ED8C5F26A94A56B6500668BA9D4DB4FC121F28ABF71A3D392D5 +CC5D51845ADA136BAEF21E3E7E02174E93C01816261A5410F874362DE48E4B32 +F74BB7C970D652694253CD5DDC1A060A0D29E555C2A3F29314D298834EDF8C2E +CE1035AF37E649349AE8BC6C1B5D0B19DCAD2603D66FE3AB30CBC811B66B9E56 +04B6FBB323D3DA968630C2662E3B137A0B693E684ED42BE64BBEB455349ABE08 +B3B7556E0D90E0ADE7A1FD0F0D895CF57CB54F4598D15DD9C2F75BF9FD6433D6 +FB2E4C9393E3D8CF42FEC2C252F0CDC7123187C8F66122E0AC10728BF126BE2B +21B195C31A4B6B0A3EBE4036253D256890A1FA7FEB8BDDF8F0BC9B37FF609D45 +5F8F1BA00182478950C72F5DA14772494BD08E238BB4B628F4493DFF40DEF43E +5CC7F61FBA102574E20FEEFB1850889888CCEC3FFF0FD03A6E4FEC28C79C91CA +C8E0B9EEB8DA1A9C39B58409E809BBD1F6B626072BA54AA0642F01E562BE8231 +94958F8D428C1719C8C6163172BCE32D608E93492F54E40CFFCC3C7582F62E54 +43D580BC1AB42DC235278A2E6F9E8E281D2AEABC2888E879F733B1AC8D466E40 +8CED3A3C8D73E07877EC615DE2FBC6BC2B332EA52AF1E509F93CA26EF5CAD8D4 +359C1CAA4A9270115F0BCCE07C86B0CFA6F55FE621B5949051149D8FF0583584 +ABD5008F5180BE8422A81DAF2D7226FCD1CA3BAE922669229680935F87D0F7B4 +E501C33178090AD11471DBC0B960760315DB6B312147C3157B20741AED4106C6 +A1642AAE9990CEE3E3BB497C0D23E647CA537AA40E9C5C880883E50A48346CCA +B032C7B217C4709CF7C26FFF94337E9A749558838CFD111E7B2E9FA34907BC32 +038B356AA9388B9641D5DEB451F7E957A2CD4A3F1230CAECF936CE32349D0844 +EF57831E02A4BE13B27F987F975B4952E2E5CC5FAAFC2C623CFDDD60FFEC32B4 +9E57654FA5B0F31B8728B8115A7702115D7B0BF53737D571F991B20FE46CA502 +B9323E2DD21F2389015052FB877A4043247B705E2FA82BEED78F7B52E14F50C2 +4254828740FED6168308368917434BF7DA33839246111EAD470C8ECB2C9E7501 +CAD9F27832AA2004697C5593C6DAF3A359EDD270F843360BA5C670D084B3E5DB +39CDD47C32D657B2AF8214CCEA7E6DF470DC95A394D66CCDB446F007DC234BAD +71164B048DCAA6C3E1FEA76177709E661008771D292F9A102D0B0848A7870AC1 +95D65AC6B097EDE74A2487D1A55609530E113F79DD25FEAB12A9789F6789FB5F +DBA76F13498A1B07E8209BEA2AF45682794A413C6A60096B84E7F3CBE8E13E18 +29A55F67CE95CB76E44FECCEC65A0D801EAB734480209EF74FA4833CF53EB82F +93D2C94C4BA8AFE4D52890BAFB5435EEC131BE98FB9149E0D9915E18BB8D74A3 +6F7EAEF4392F8546D9630016379AFE4287CA5FBBB48639C114E01D32C4967A53 +CE8F219B1EB0419128EEF2611866A956F9884A5C8334856848443AD43BD5A2DB +8309558159385D73B973F1094972A03E81B830420832ECAC15CC3DB3200BEC0D +7AF3A9FB61FCBCAB6B8C5F20065BC6F0 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -933,6 +936,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -950,7 +955,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 README Page 1) 144.161 Tj +(Aug 8 01:04 2009 README Page 1) 144.161 Tj 0 -28.4801 Td (xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson\ 's Unix) 305.796 Tj @@ -1054,7 +1059,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 table of contents Page 1) 192.2146 Tj +(Aug 8 01:04 2009 table of contents Page 1) 192.2146 Tj 0 -28.4801 Td (The numbers to the left of the file names in the table are shee\ t numbers.) 318.9016 Tj @@ -1069,152 +1074,148 @@ t numbers.) 318.9016 Tj d sheet numbers.) 345.1126 Tj 0 -85.4403 Td (# basic headers) 65.5277 Tj --4514.2 TJm -(# system calls) 61.1592 Tj --5015.87 TJm -(# pipes) 30.5796 Tj +209.536 -85.4403 Td +(51 pipe.c) 39.3166 Tj 0 -94.9336 Td (01 types.h) 43.6851 Tj -7022.54 TJm -(23 traps.h) 43.6851 Tj --7022.54 TJm -(51 pipe.c) 39.3166 Tj +(# system calls) 61.1592 Tj 0 -104.427 Td (01 param.h) 43.6851 Tj -7022.54 TJm -(24 vectors.pl) 56.7907 Tj +(24 traps.h) 43.6851 Tj +-7022.54 TJm +(# string operations) 83.0018 Tj 0 -113.9204 Td (02 defs.h) 39.3166 Tj -7524.2 TJm -(24 trapasm.S) 52.4222 Tj --6019.2 TJm -(# string operations) 83.0018 Tj +(24 vectors.pl) 56.7907 Tj +-5517.54 TJm +(53 string.c) 48.0537 Tj 0 -123.4137 Td -(03 x86.h) 34.9481 Tj +(04 x86.h) 34.9481 Tj +-8025.87 TJm +(25 trapasm.S) 52.4222 Tj +0 -132.9071 Td +(06 asm.h) 34.9481 Tj -8025.87 TJm (25 trap.c) 39.3166 Tj -7524.2 TJm -(53 string.c) 48.0537 Tj -0 -132.9071 Td -(05 asm.h) 34.9481 Tj --8025.87 TJm -(26 syscall.h) 52.4222 Tj +(# low-level hardware) 87.3703 Tj 0 -142.4004 Td (06 mmu.h) 34.9481 Tj -8025.87 TJm -(26 syscall.c) 52.4222 Tj +(27 syscall.h) 52.4222 Tj -6019.2 TJm -(# low-level hardware) 87.3703 Tj +(54 mp.h) 30.5796 Tj 0 -151.8938 Td (08 elf.h) 34.9481 Tj -8025.87 TJm -(28 sysproc.c) 52.4222 Tj +(27 syscall.c) 52.4222 Tj -6019.2 TJm -(54 mp.h) 30.5796 Tj -209.536 -161.3872 Td (55 mp.c) 30.5796 Tj +104.768 -161.3872 Td +(29 sysproc.c) 52.4222 Tj +-6019.2 TJm +(56 lapic.c) 43.6851 Tj 0 -170.8805 Td (# startup) 39.3166 Tj --7524.2 TJm -(# file system) 56.7907 Tj --5517.54 TJm -(56 lapic.c) 43.6851 Tj +209.536 -170.8805 Td +(58 ioapic.c) 48.0537 Tj 0 -180.3739 Td (09 bootasm.S) 52.4222 Tj -6019.2 TJm -(29 buf.h) 34.9481 Tj --8025.87 TJm -(58 ioapic.c) 48.0537 Tj +(# file system) 56.7907 Tj +-5517.54 TJm +(59 picirq.c) 48.0537 Tj 0 -189.8672 Td (10 bootother.S) 61.1592 Tj -5015.87 TJm -(29 dev.h) 34.9481 Tj +(30 buf.h) 34.9481 Tj -8025.87 TJm -(59 picirq.c) 48.0537 Tj +(61 kbd.h) 34.9481 Tj 0 -199.3606 Td (11 bootmain.c) 56.7907 Tj -5517.54 TJm (30 fcntl.h) 43.6851 Tj -7022.54 TJm -(60 kbd.h) 34.9481 Tj +(62 kbd.c) 34.9481 Tj 0 -208.854 Td (12 main.c) 39.3166 Tj -7524.2 TJm -(30 stat.h) 39.3166 Tj +(31 stat.h) 39.3166 Tj -7524.2 TJm -(62 kbd.c) 34.9481 Tj +(63 console.c) 52.4222 Tj 104.768 -218.3473 Td -(31 file.h) 39.3166 Tj --7524.2 TJm -(62 console.c) 52.4222 Tj -0 -227.8407 Td -(# locks) 30.5796 Tj --8527.54 TJm (31 fs.h) 30.5796 Tj -8527.54 TJm (66 timer.c) 43.6851 Tj +0 -227.8407 Td +(# locks) 30.5796 Tj +-8527.54 TJm +(32 file.h) 39.3166 Tj 0 -237.334 Td (13 spinlock.h) 56.7907 Tj -5517.54 TJm -(32 fsvar.h) 43.6851 Tj -0 -246.8274 Td -(13 spinlock.c) 56.7907 Tj --5517.54 TJm (33 ide.c) 34.9481 Tj -8025.87 TJm (# user-level) 52.4222 Tj -104.768 -256.3208 Td +0 -246.8274 Td +(13 spinlock.c) 56.7907 Tj +-5517.54 TJm (35 bio.c) 34.9481 Tj -8025.87 TJm (67 initcode.S) 56.7907 Tj +104.768 -256.3208 Td +(36 fs.c) 30.5796 Tj +-8527.54 TJm +(67 usys.S) 39.3166 Tj 0 -265.8141 Td (# processes) 48.0537 Tj -6520.87 TJm -(36 fs.c) 30.5796 Tj --8527.54 TJm -(67 init.c) 39.3166 Tj -0 -275.3075 Td -(15 proc.h) 39.3166 Tj --7524.2 TJm (44 file.c) 39.3166 Tj -7524.2 TJm -(68 usys.S) 39.3166 Tj -0 -284.8008 Td -(16 proc.c) 39.3166 Tj +(68 init.c) 39.3166 Tj +0 -275.3075 Td +(15 proc.h) 39.3166 Tj -7524.2 TJm (45 sysfile.c) 52.4222 Tj -6019.2 TJm (68 sh.c) 30.5796 Tj -0 -294.2942 Td -(21 swtch.S) 43.6851 Tj --7022.54 TJm +0 -284.8008 Td +(16 proc.c) 39.3166 Tj +-7524.2 TJm (50 exec.c) 39.3166 Tj +0 -294.2942 Td +(22 swtch.S) 43.6851 Tj 0 -303.7876 Td (22 kalloc.c) 48.0537 Tj -0 -341.7606 Td +-6520.87 TJm +(# pipes) 30.5796 Tj +0 -332.2673 Td (The source listing is preceded by a cross-reference that lists \ every defined ) 336.3756 Tj -0 -351.2539 Td +0 -341.7606 Td (constant, struct, global variable, and function in xv6. Each e\ ntry gives,) 323.2701 Tj -0 -360.7473 Td +0 -351.254 Td (on the same line as the name, the line number \(or, in a few ca\ ses, numbers\)) 327.6386 Tj -0 -370.2406 Td +0 -360.7473 Td (where the name is defined. Successive lines in an entry list t\ he line) 305.796 Tj -0 -379.734 Td +0 -370.2407 Td (numbers where the name is used. For example, this entry:) 249.0053 Tj -17.4613 -398.7207 Td +17.4613 -389.2274 Td (swtch 2256) 43.6851 Tj -34.9226 -408.2141 Td +34.9226 -398.7208 Td (0311 1928 1962 2255) 83.0018 Tj -34.9226 -417.7074 Td +34.9226 -408.2141 Td (2256) 17.4741 Tj --0 -436.6941 Td +-0 -427.2008 Td (indicates that swtch is defined on line 2256 and is mentioned o\ n five lines) 327.6386 Tj --0 -446.1875 Td +-0 -436.6942 Td (on sheets 03, 19, and 22.) 109.2129 Tj Q Q @@ -1244,6 +1245,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -1261,207 +1264,207 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 1) 187.8461 Tj +(Aug 8 01:04 2009 cross-references Page 1) 187.8461 Tj 0 -28.4801 Td -(acquire 1375) 52.4222 Tj +(acquire 1373) 52.4222 Tj -14045.3 TJm -(0210 1224 3538) 61.1592 Tj +(3460 3479 3618) 61.1592 Tj 17.4613 -37.9735 Td -(0311 1375 1379 1632) 83.0018 Tj +(0321 1373 1377 1759) 83.0018 Tj +-6520.6 TJm +(bfree 3730) 43.6851 Tj +17.4613 -47.4664 Td +(1917 1975 2018 2033) 83.0018 Tj +-8527.14 TJm +(3730 4062 4072 4075) 83.0018 Tj +17.4613 -56.9594 Td +(2066 2079 2123 2158) 83.0018 Tj +-6520.6 TJm +(bget 3566) 39.3166 Tj +17.4613 -66.4524 Td +(2315 2362 2616 2971) 83.0018 Tj +-8527.14 TJm +(3566 3596 3606) 61.1592 Tj +17.4613 -75.9453 Td +(3407 3465 3570 3629) 83.0018 Tj +-6520.6 TJm +(binit 3539) 43.6851 Tj +17.4613 -85.4383 Td +(3857 3890 3910 3939) 83.0018 Tj +-8527.14 TJm +(0210 1229 3539) 61.1592 Tj +17.4613 -94.9313 Td +(3954 3964 4424 4440) 83.0018 Tj -6520.6 TJm (bmap 4010) 39.3166 Tj -17.4613 -47.4664 Td -(1820 1871 1918 1933) 83.0018 Tj +17.4613 -104.4243 Td +(4456 5213 5234 5255) 83.0018 Tj -8527.14 TJm -(4010 4047 4119 4169) 83.0018 Tj -17.4613 -56.9594 Td -(1967 1980 2023 2058) 83.0018 Tj +(4010 4036 4119 4169) 83.0018 Tj +17.4613 -113.9172 Td +(6360 6516 6558 6606) 83.0018 Tj -8527.14 TJm (4222) 17.4741 Tj -17.4613 -66.4524 Td -(2265 2312 2549 2870) 83.0018 Tj --6520.6 TJm -(bootmain 1116) 56.7907 Tj -17.4613 -75.9453 Td -(3406 3465 3569 3629) 83.0018 Tj --8527.14 TJm -(0975 1116) 39.3166 Tj -17.4613 -85.4383 Td -(3807 3840 3860 3889) 83.0018 Tj --6520.6 TJm -(bootothers 1267) 65.5277 Tj -17.4613 -94.9313 Td -(3904 3914 4423 4440) 83.0018 Tj --8527.14 TJm -(1207 1236 1267) 61.1592 Tj -17.4613 -104.4243 Td -(4456 5217 5255 5277) 83.0018 Tj --6520.6 TJm -(BPB 3193) 34.9481 Tj -17.4613 -113.9172 Td -(6385 6440 6466 6508) 83.0018 Tj --8527.14 TJm -(3193 3196 3712 3714) 83.0018 Tj 0 -123.4106 Td -(allocproc 1627) 61.1592 Tj --13042 TJm -(3740) 17.4741 Tj +(allocproc 1754) 61.1592 Tj +-11035.5 TJm +(bootmain 1116) 56.7907 Tj 17.4613 -132.9039 Td -(1627 1715) 39.3166 Tj --11537.3 TJm -(bread 3602) 43.6851 Tj +(1754 1807 1860) 61.1592 Tj +-11035.5 TJm +(0976 1116) 39.3166 Tj 0 -142.3973 Td -(alltraps 2456) 56.7907 Tj --13543.7 TJm -(0211 3602 3683 3694) 83.0018 Tj +(alltraps 2506) 56.7907 Tj +-11537.1 TJm +(bootothers 1267) 65.5277 Tj 17.4613 -151.8907 Td -(2410 2418 2432 2437) 83.0018 Tj +(2459 2467 2480 2485) 83.0018 Tj -8527.14 TJm -(3713 3739 3867 3961) 83.0018 Tj +(1210 1236 1267) 61.1592 Tj 17.4613 -161.3836 Td -(2455 2456) 39.3166 Tj --13543.8 TJm -(3982 4032 4066 4119) 83.0018 Tj +(2505 2506) 39.3166 Tj +-11537.3 TJm +(BPB 3188) 34.9481 Tj 0 -170.877 Td -(ALT 6060) 34.9481 Tj +(ALT 6110) 34.9481 Tj -16052 TJm -(4169 4222) 39.3166 Tj +(3188 3191 3712 3714) 83.0018 Tj 17.4613 -180.3703 Td -(6060 6088 6090) 61.1592 Tj --9028.94 TJm -(brelse 3624) 48.0537 Tj +(6110 6138 6140) 61.1592 Tj +-11035.5 TJm +(3740) 17.4741 Tj 0 -189.8633 Td -(argfd 4564) 43.6851 Tj --15048.7 TJm -(0212 3624 3627 3685) 83.0018 Tj +(argfd 4563) 43.6851 Tj +-13042.1 TJm +(bread 3602) 43.6851 Tj 17.4613 -199.3567 Td -(4564 4607 4619 4630) 83.0018 Tj +(4563 4606 4621 4633) 83.0018 Tj -8527.14 TJm -(3697 3719 3723 3746) 83.0018 Tj +(0211 3602 3682 3693) 83.0018 Tj 17.4613 -208.8497 Td (4644 4656) 39.3166 Tj -13543.8 TJm -(3875 3967 3970 3991) 83.0018 Tj +(3713 3739 3811 3832) 83.0018 Tj 0 -218.343 Td -(argint 2694) 48.0537 Tj +(argint 2794) 48.0537 Tj -14547 TJm -(4037 4043 4072 4122) 83.0018 Tj +(3917 4026 4068 4119) 83.0018 Tj 17.4613 -227.8364 Td -(0329 2694 2708 2724) 83.0018 Tj +(0339 2794 2808 2824) 83.0018 Tj -8527.14 TJm -(4173 4233 4237) 61.1592 Tj +(4169 4222) 39.3166 Tj 17.4613 -237.3293 Td -(2837 2856 2868 4569) 83.0018 Tj +(2931 2956 2969 4568) 83.0018 Tj -6520.6 TJm -(BSIZE 3157) 43.6851 Tj +(brelse 3624) 48.0537 Tj 17.4613 -246.8223 Td -(4607 4619 4858 4909) 83.0018 Tj +(4621 4633 4858 4921) 83.0018 Tj -8527.14 TJm -(3157 3169 3187 3193) 83.0018 Tj +(0212 3624 3627 3684) 83.0018 Tj 17.4613 -256.3153 Td -(4910 4957) 39.3166 Tj +(4922 4957) 39.3166 Tj -13543.8 TJm -(3695 4119 4120 4121) 83.0018 Tj +(3696 3719 3723 3746) 83.0018 Tj 0 -265.8086 Td -(argptr 2704) 48.0537 Tj +(argptr 2804) 48.0537 Tj -14547 TJm -(4165 4166 4169 4170) 83.0018 Tj +(3817 3820 3841 3925) 83.0018 Tj 17.4613 -275.302 Td -(0330 2704 4607 4619) 83.0018 Tj +(0340 2804 4621 4633) 83.0018 Tj -8527.14 TJm -(4171 4221 4222 4224) 83.0018 Tj +(4032 4074 4122 4173) 83.0018 Tj 17.4613 -284.795 Td (4656 4982) 39.3166 Tj --11537.3 TJm -(buf 2900) 34.9481 Tj +-13543.8 TJm +(4233 4237) 39.3166 Tj 0 -294.2883 Td -(argstr 2721) 48.0537 Tj --14547 TJm -(0200 0211 0212 0213) 83.0018 Tj +(argstr 2821) 48.0537 Tj +-12540.5 TJm +(BSIZE 3158) 43.6851 Tj 17.4613 -303.7817 Td -(0331 2721 4668 4758) 83.0018 Tj +(0341 2821 4668 4758) 83.0018 Tj -8527.14 TJm -(0253 2900 2904 2905) 83.0018 Tj +(3158 3168 3182 3188) 83.0018 Tj 17.4613 -313.2747 Td -(4858 4908 4923 4935) 83.0018 Tj +(4858 4906 4920 4935) 83.0018 Tj -8527.14 TJm -(2906 3310 3325 3375) 83.0018 Tj +(3694 4119 4120 4121) 83.0018 Tj 17.4613 -322.7676 Td (4957) 17.4741 Tj -16052.1 TJm -(3404 3454 3456 3459) 83.0018 Tj +(4165 4166 4169 4170) 83.0018 Tj 0 -332.2606 Td (BACK 6861) 39.3166 Tj -15550.3 TJm -(3527 3529 3535 3540) 83.0018 Tj +(4171 4221 4222 4224) 83.0018 Tj 17.4613 -341.754 Td (6861 6974 7120 7389) 83.0018 Tj --8527.14 TJm -(3553 3564 3567 3577) 83.0018 Tj +-6520.6 TJm +(buf 3000) 34.9481 Tj 0 -351.2473 Td (backcmd 6896 7114) 74.2647 Tj -11537 TJm -(3601 3604 3614 3624) 83.0018 Tj +(0200 0211 0212 0213) 83.0018 Tj 17.4613 -360.7407 Td (6896 6909 6975 7114) 83.0018 Tj -8527.14 TJm -(3639 3669 3681 3692) 83.0018 Tj +(0253 3000 3004 3005) 83.0018 Tj 17.4613 -370.2337 Td (7116 7242 7355 7390) 83.0018 Tj -8527.14 TJm -(3707 3732 3854 3955) 83.0018 Tj +(3006 3310 3325 3328) 83.0018 Tj 0 -379.727 Td -(BACKSPACE 6266) 61.1592 Tj +(BACKSPACE 6450) 61.1592 Tj -13042 TJm -(3979 4013 4055 4105) 83.0018 Tj +(3375 3404 3454 3456) 83.0018 Tj 17.4613 -389.2204 Td -(6266 6284 6313 6476) 83.0018 Tj +(6450 6467 6526 6532) 83.0018 Tj -8527.14 TJm -(4155 4215 6354 6366) 83.0018 Tj -17.4613 -398.7133 Td -(6482) 17.4741 Tj --16052.1 TJm -(6369 6372 6435 6442) 83.0018 Tj -0 -408.2067 Td +(3459 3527 3531 3535) 83.0018 Tj +0 -398.7137 Td (balloc 3704) 48.0537 Tj -14547 TJm -(6453 6474 6487 6518) 83.0018 Tj -17.4613 -417.7001 Td -(3704 3725 4019 4030) 83.0018 Tj +(3541 3553 3565 3568) 83.0018 Tj +17.4613 -408.2071 Td +(3704 3725 4017 4025) 83.0018 Tj -8527.14 TJm -(6984 6987 6988 6989) 83.0018 Tj -17.4613 -427.193 Td -(4040) 17.4741 Tj +(3601 3604 3614 3624) 83.0018 Tj +17.4613 -417.7001 Td +(4029) 17.4741 Tj -16052.1 TJm -(7003 7015 7016 7019) 83.0018 Tj -0 -436.6864 Td -(BBLOCK 3196) 48.0537 Tj +(3669 3680 3691 3707) 83.0018 Tj +0 -427.1934 Td +(BBLOCK 3191) 48.0537 Tj -14547 TJm -(7020 7021 7025) 61.1592 Tj -17.4613 -446.1798 Td -(3196 3713 3739) 61.1592 Tj --9028.94 TJm -(bufhead 3535) 52.4222 Tj -0 -455.6731 Td -(bfree 3730) 43.6851 Tj --15048.7 TJm -(3535 3551 3552 3554) 83.0018 Tj +(3732 3805 3829 3904) 83.0018 Tj +17.4613 -436.6868 Td +(3191 3713 3739) 61.1592 Tj +-11035.5 TJm +(4013 4057 4105 4155) 83.0018 Tj +0 -446.1801 Td +(B_BUSY 3009) 48.0537 Tj +-14547 TJm +(4215 6327 6338 6341) 83.0018 Tj +17.4613 -455.6735 Td +(3009 3458 3576 3577) 83.0018 Tj +-8527.14 TJm +(6344 6503 6524 6537) 83.0018 Tj 17.4613 -465.1665 Td -(3730 4060 4070) 61.1592 Tj --11035.5 TJm -(3555 3556 3557 3573) 83.0018 Tj -0 -474.6594 Td -(bget 3565) 39.3166 Tj --15550.3 TJm -(3587 3633 3634 3635) 83.0018 Tj -17.4613 -484.1528 Td -(3565 3596 3606) 61.1592 Tj --11035.5 TJm -(3636) 17.4741 Tj -0 -493.6462 Td -(binit 3538) 43.6851 Tj --13042.1 TJm -(buf_table_lock 3530) 83.0018 Tj +(3588 3591 3616 3626) 83.0018 Tj +-8527.14 TJm +(6568 6601 6608 6984) 83.0018 Tj +17.4613 -474.6594 Td +(3638) 17.4741 Tj +-16052.1 TJm +(6987 6988 6989 7003) 83.0018 Tj +0 -484.1528 Td +(B_DIRTY 3011) 52.4222 Tj +-14045.3 TJm +(7015 7016 7019 7020) 83.0018 Tj +17.4613 -493.6462 Td +(3011 3387 3416 3421) 83.0018 Tj +-8527.14 TJm +(7021 7025) 39.3166 Tj Q Q q @@ -1478,207 +1481,207 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 2) 187.8461 Tj -17.4613 -28.4801 Td -(3530 3542 3569 3577) 83.0018 Tj --8527.14 TJm -(7248 7250 7253 7255) 83.0018 Tj -17.4613 -37.9735 Td -(3581 3592 3629 3641) 83.0018 Tj --8527.14 TJm -(7258 7260 7263 7264) 83.0018 Tj -0 -47.4664 Td -(bwrite 3614) 48.0537 Tj --14547 TJm -(7275 7278 7281 7285) 83.0018 Tj -17.4613 -56.9598 Td -(0213 3614 3617 3696) 83.0018 Tj --8527.14 TJm -(7300 7303 7308 7312) 83.0018 Tj -17.4613 -66.4531 Td -(3718 3745 3966 3990) 83.0018 Tj --8527.14 TJm -(7313 7316 7321 7322) 83.0018 Tj -17.4613 -75.9465 Td -(4041 4172) 39.3166 Tj --13543.8 TJm -(7328 7337 7338 7344) 83.0018 Tj -0 -85.4399 Td -(bzero 3690) 43.6851 Tj --15048.7 TJm -(7345 7351 7352 7361) 83.0018 Tj -17.4613 -94.9332 Td -(3690 3736) 39.3166 Tj --13543.8 TJm -(7364 7366 7372 7373) 83.0018 Tj -0 -104.4266 Td -(B_BUSY 2909) 48.0537 Tj --14547 TJm -(7378 7384 7390 7391) 83.0018 Tj -17.4613 -113.9199 Td -(2909 3458 3574 3576) 83.0018 Tj --8527.14 TJm -(7394) 17.4741 Tj -17.4613 -123.4133 Td -(3580 3588 3589 3616) 83.0018 Tj --6520.6 TJm -(CONSOLE 2957) 52.4222 Tj -17.4613 -132.9067 Td -(3626 3638) 39.3166 Tj --13543.8 TJm -(2957 6556 6557) 61.1592 Tj -0 -142.4 Td -(B_DIRTY 2911) 52.4222 Tj --12038.8 TJm -(console_init 6551) 74.2647 Tj -17.4613 -151.8934 Td -(2911 3387 3413 3418) 83.0018 Tj --8527.14 TJm -(0216 1231 6551) 61.1592 Tj -17.4613 -161.3867 Td -(3460 3479 3618) 61.1592 Tj --9028.94 TJm -(console_intr 6462) 74.2647 Tj -0 -170.8801 Td -(B_VALID 2910) 52.4222 Tj +(Aug 8 01:04 2009 cross-references Page 2) 187.8461 Tj +0 -28.4801 Td +(B_VALID 3010) 52.4222 Tj -14045.3 TJm -(0218 6248 6462) 61.1592 Tj -17.4613 -180.3735 Td -(2910 3417 3460 3479) 83.0018 Tj +(7394) 17.4741 Tj +17.4613 -37.9735 Td +(3010 3420 3460 3479) 83.0018 Tj -6520.6 TJm -(console_lock 6270) 74.2647 Tj -17.4613 -189.8668 Td -(3574 3607) 39.3166 Tj --13543.8 TJm -(6270 6385 6431 6440) 83.0018 Tj -0 -199.3602 Td -(C 6081 6459) 48.0537 Tj --14547 TJm -(6443 6553) 39.3166 Tj -17.4613 -208.8535 Td -(6081 6129 6154 6155) 83.0018 Tj --6520.6 TJm -(console_read 6501) 74.2647 Tj -17.4613 -218.3469 Td -(6156 6157 6158 6160) 83.0018 Tj +(CONSOLE 3290) 52.4222 Tj +17.4613 -47.4664 Td +(3607) 17.4741 Tj +-16052.1 TJm +(3290 6621 6622) 61.1592 Tj +0 -56.9598 Td +(bwrite 3614) 48.0537 Tj +-12540.5 TJm +(consoleinit 6616) 69.8962 Tj +17.4613 -66.4531 Td +(0213 3614 3617 3695) 83.0018 Tj -8527.14 TJm -(6501 6557) 39.3166 Tj -17.4613 -227.8403 Td -(6459 6469 6472 6479) 83.0018 Tj +(0216 1222 6616) 61.1592 Tj +17.4613 -75.9461 Td +(3718 3745 3816 3840) 83.0018 Tj -6520.6 TJm -(console_write 6435) 78.6333 Tj -17.4613 -237.3336 Td -(6489 6519) 39.3166 Tj +(consoleintr 6512) 69.8962 Tj +17.4613 -85.4391 Td +(4030 4172) 39.3166 Tj -13543.8 TJm -(6435 6556) 39.3166 Tj -0 -246.827 Td -(CAPSLOCK 6062) 56.7907 Tj --11537.1 TJm -(cons_putc 6333) 61.1592 Tj -17.4613 -256.3203 Td -(6062 6095 6236) 61.1592 Tj --11035.5 TJm -(6333 6372 6396 6414) 83.0018 Tj -0 -265.8137 Td -(cga_putc 6301) 56.7907 Tj +(0218 6298 6512) 61.1592 Tj +0 -94.9324 Td +(bzero 3689) 43.6851 Tj +-13042.1 TJm +(consoleread 6551) 69.8962 Tj +17.4613 -104.4258 Td +(3689 3736) 39.3166 Tj +-13543.8 TJm +(6551 6622) 39.3166 Tj +0 -113.9192 Td +(C 6131 6509) 48.0537 Tj +-12540.5 TJm +(consolewrite 6601) 74.2647 Tj +17.4613 -123.4125 Td +(6131 6179 6204 6205) 83.0018 Tj +-8527.14 TJm +(6601 6621) 39.3166 Tj +17.4613 -132.9055 Td +(6206 6207 6208 6210) 83.0018 Tj +-6520.6 TJm +(consputc 6487) 56.7907 Tj +17.4613 -142.3985 Td +(6509 6519 6522 6529) 83.0018 Tj +-8527.14 TJm +(6314 6344 6366 6384) 83.0018 Tj +17.4613 -151.8914 Td +(6539 6569) 39.3166 Tj +-13543.8 TJm +(6387 6391 6392 6487) 83.0018 Tj +0 -161.3848 Td +(CAPSLOCK 6112) 56.7907 Tj -13543.7 TJm -(6417 6421 6422 6442) 83.0018 Tj -17.4613 -275.3071 Td -(6301 6342) 39.3166 Tj +(6526 6532 6538 6608) 83.0018 Tj +17.4613 -170.8782 Td +(6112 6145 6286) 61.1592 Tj +-9028.94 TJm +(context 1518) 52.4222 Tj +0 -180.3715 Td +(cgaputc 6455) 52.4222 Tj +-14045.3 TJm +(0201 0318 1518 1537) 83.0018 Tj +17.4613 -189.8645 Td +(6455 6496) 39.3166 Tj -13543.8 TJm -(6476 6482 6488) 61.1592 Tj -0 -284.8004 Td -(cli 0464) 34.9481 Tj --14045.5 TJm -(context 1515) 52.4222 Tj -17.4613 -294.2938 Td -(0464 0466 0914 1028) 83.0018 Tj --8527.14 TJm -(0201 0308 1515 1540) 83.0018 Tj -17.4613 -303.7871 Td -(1460 6336 6570) 61.1592 Tj +(1559 1678 1787 1788) 83.0018 Tj +0 -199.3578 Td +(cli 0521) 34.9481 Tj +-16052 TJm +(1789 1790 1928 1967) 83.0018 Tj +17.4613 -208.8512 Td +(0521 0523 0915 1029) 83.0018 Tj +-6520.6 TJm +(cprintf 6352) 52.4222 Tj +17.4613 -218.3442 Td +(1460 6406 6490) 61.1592 Tj -11035.5 TJm -(1560 1746 1747 1748) 83.0018 Tj -0 -313.2805 Td +(0217 1224 1258 1262) 83.0018 Tj +0 -227.8375 Td (cmd 6865) 34.9481 Tj -16052 TJm -(1832 1864 2129) 61.1592 Tj -17.4613 -322.7739 Td +(1676 1680 1682 2286) 83.0018 Tj +17.4613 -237.3309 Td (6865 6877 6886 6887) 83.0018 Tj --6520.6 TJm -(copyproc 1709) 56.7907 Tj -17.4613 -332.2672 Td +-8527.14 TJm +(2375 2637 2645 2650) 83.0018 Tj +17.4613 -246.8239 Td (6892 6893 6898 6902) 83.0018 Tj -8527.14 TJm -(0292 1709 1762 2812) 83.0018 Tj -17.4613 -341.7606 Td +(2882 3410 5637 5761) 83.0018 Tj +17.4613 -256.3168 Td (6906 6915 6918 6923) 83.0018 Tj --6520.6 TJm -(cp 1573) 30.5796 Tj -17.4613 -351.2539 Td +-8527.14 TJm +(5912 6352 6408 6409) 83.0018 Tj +17.4613 -265.8098 Td (6931 6937 6941 6951) 83.0018 Tj -8527.14 TJm -(1573 1657 1660 1661) 83.0018 Tj -17.4613 -360.7473 Td +(6410 6413) 39.3166 Tj +17.4613 -275.3028 Td (6975 6977 7052 7055) 83.0018 Tj --8527.14 TJm -(1662 1663 1664 1665) 83.0018 Tj -17.4613 -370.2407 Td +-6520.6 TJm +(cpu 1557 5751) 56.7907 Tj +17.4613 -284.7958 Td (7057 7058 7059 7060) 83.0018 Tj -8527.14 TJm -(1666 1857 1864 1872) 83.0018 Tj -17.4613 -379.734 Td +(0256 0269 1207 1224) 83.0018 Tj +17.4613 -294.2887 Td (7063 7064 7066 7068) 83.0018 Tj -8527.14 TJm -(1886 1905 1923 1924) 83.0018 Tj -17.4613 -389.2274 Td +(1255 1256 1258 1262) 83.0018 Tj +17.4613 -303.7817 Td (7069 7070 7071 7072) 83.0018 Tj -8527.14 TJm -(1928 2009 2014 2015) 83.0018 Tj -17.4613 -398.7207 Td +(1271 1279 1306 1365) 83.0018 Tj +17.4613 -313.2747 Td (7073 7074 7075 7076) 83.0018 Tj -8527.14 TJm -(2016 2020 2021 2026) 83.0018 Tj -17.4613 -408.2141 Td +(1389 1408 1446 1557) 83.0018 Tj +17.4613 -322.7676 Td (7079 7080 7082 7084) 83.0018 Tj -8527.14 TJm -(2030 2038 2039 2066) 83.0018 Tj -17.4613 -417.7075 Td +(1568 1577 1705 1707) 83.0018 Tj +17.4613 -332.2606 Td (7085 7086 7087 7088) 83.0018 Tj -8527.14 TJm -(2084 2090 2537 2539) 83.0018 Tj -17.4613 -427.2008 Td +(2615 2637 2638 2645) 83.0018 Tj +17.4613 -341.7536 Td (7089 7100 7101 7103) 83.0018 Tj -8527.14 TJm -(2541 2571 2579 2580) 83.0018 Tj -17.4613 -436.6942 Td +(2646 2650 2651 5512) 83.0018 Tj +17.4613 -351.2465 Td (7105 7106 7107 7108) 83.0018 Tj -8527.14 TJm -(2586 2591 2696 2710) 83.0018 Tj -17.4613 -446.1875 Td +(5513 5751 5761 6408) 83.0018 Tj +17.4613 -360.7395 Td (7109 7110 7113 7114) 83.0018 Tj --8527.14 TJm -(2712 2726 2778 2780) 83.0018 Tj -17.4613 -455.6809 Td +-6520.6 TJm +(CR0_PE 0910 1024) 69.8962 Tj +17.4613 -370.2325 Td (7116 7118 7119 7120) 83.0018 Tj -8527.14 TJm -(2783 2784 2812 2845) 83.0018 Tj -17.4613 -465.1743 Td +(0956 1056) 39.3166 Tj +17.4613 -379.7255 Td (7121 7122 7212 7213) 83.0018 Tj --8527.14 TJm -(2873 4361 4571 4588) 83.0018 Tj -17.4613 -474.6676 Td +-6520.6 TJm +(create 4801) 48.0537 Tj +17.4613 -389.2184 Td (7214 7215 7217 7221) 83.0018 Tj -8527.14 TJm -(4589 4646 4943 4944) 83.0018 Tj -17.4613 -484.161 Td +(4801 4821 4834 4838) 83.0018 Tj +17.4613 -398.7114 Td (7224 7230 7231 7234) 83.0018 Tj -8527.14 TJm -(4963 4969 4989 5097) 83.0018 Tj -17.4613 -493.6543 Td +(4862 4906 4923) 61.1592 Tj +17.4613 -408.2044 Td (7237 7239 7242 7246) 83.0018 Tj +-6520.6 TJm +(CRTPORT 6451) 52.4222 Tj +17.4613 -417.6973 Td +(7248 7250 7253 7255) 83.0018 Tj -8527.14 TJm -(5101 5102 5103 5104) 83.0018 Tj +(6451 6460 6461 6462) 83.0018 Tj +17.4613 -427.1903 Td +(7258 7260 7263 7264) 83.0018 Tj +-8527.14 TJm +(6463 6479 6480 6481) 83.0018 Tj +17.4613 -436.6833 Td +(7275 7278 7281 7285) 83.0018 Tj +-8527.14 TJm +(6482) 17.4741 Tj +17.4613 -446.1762 Td +(7300 7303 7308 7312) 83.0018 Tj +-6520.6 TJm +(CTL 6109) 34.9481 Tj +17.4613 -455.6692 Td +(7313 7316 7321 7322) 83.0018 Tj +-8527.14 TJm +(6109 6135 6139 6285) 83.0018 Tj +17.4613 -465.1622 Td +(7328 7337 7338 7344) 83.0018 Tj +-6520.6 TJm +(devsw 3283) 43.6851 Tj +17.4613 -474.6552 Td +(7345 7351 7352 7361) 83.0018 Tj +-8527.14 TJm +(3283 3288 4108 4110) 83.0018 Tj +17.4613 -484.1481 Td +(7364 7366 7372 7373) 83.0018 Tj +-8527.14 TJm +(4158 4160 4406 6621) 83.0018 Tj +17.4613 -493.6411 Td +(7378 7384 7390 7391) 83.0018 Tj +-8527.14 TJm +(6622) 17.4741 Tj Q Q Q @@ -1707,6 +1710,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -1724,207 +1729,207 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 3) 187.8461 Tj -17.4613 -28.4801 Td -(5105 5106 5258 5279) 83.0018 Tj --8527.14 TJm -(4327 4328 4391 4665) 83.0018 Tj -17.4613 -37.9735 Td -(6511) 17.4741 Tj --16052.1 TJm -(4755 4805) 39.3166 Tj -0 -47.4664 Td -(cprintf 6377) 52.4222 Tj --12038.8 TJm -(disk_1_present 3327) 83.0018 Tj -17.4613 -56.9598 Td -(0217 1221 1255 1262) 83.0018 Tj --8527.14 TJm -(3327 3364 3462) 61.1592 Tj -17.4613 -66.4531 Td -(2127 2131 2133 2235) 83.0018 Tj --6520.6 TJm -(DPL_USER 0664) 56.7907 Tj -17.4613 -75.9465 Td -(2328 2565 2573 2578) 83.0018 Tj --8527.14 TJm -(0664 1690 1691 1767) 83.0018 Tj -17.4613 -85.4399 Td -(2782 5637 5761 5912) 83.0018 Tj --8527.14 TJm -(1768 2522 2586) 61.1592 Tj -17.4613 -94.9332 Td -(6377 6572 6573 6574) 83.0018 Tj --6520.6 TJm -(E0ESC 6066) 43.6851 Tj -17.4613 -104.4266 Td -(6577) 17.4741 Tj --16052.1 TJm -(6066 6220 6224 6225) 83.0018 Tj -0 -113.9199 Td -(cpu 1557 5751) 56.7907 Tj --13543.7 TJm -(6227 6230) 39.3166 Tj -17.4613 -123.4133 Td -(0256 0269 1221 1255) 83.0018 Tj --6520.6 TJm -(elfhdr 0805) 48.0537 Tj -17.4613 -132.9067 Td -(1257 1258 1260 1262) 83.0018 Tj --8527.14 TJm -(0805 1118 1122 5014) 83.0018 Tj -17.4613 -142.4 Td -(1271 1279 1306 1367) 83.0018 Tj --6520.6 TJm -(ELF_MAGIC 0802) 61.1592 Tj -17.4613 -151.8934 Td -(1391 1408 1442 1461) 83.0018 Tj --8527.14 TJm -(0802 1128 5029) 61.1592 Tj -17.4613 -161.3867 Td -(1462 1470 1472 1557) 83.0018 Tj --6520.6 TJm -(ELF_PROG_LOAD 0836) 78.6333 Tj -17.4613 -170.8801 Td -(1568 1674 1677 1794) 83.0018 Tj --8527.14 TJm -(0836 5034 5061) 61.1592 Tj -17.4613 -180.3735 Td -(1811 1814 1861 1864) 83.0018 Tj --6520.6 TJm -(EOI 5663) 34.9481 Tj -17.4613 -189.8668 Td -(2548 2565 2566 2573) 83.0018 Tj --8527.14 TJm -(5663 5734 5775) 61.1592 Tj -17.4613 -199.3602 Td -(2574 2578 2579 5512) 83.0018 Tj --6520.6 TJm -(ERROR 5681) 43.6851 Tj -17.4613 -208.8535 Td -(5513 5751 5761 6572) 83.0018 Tj --8527.14 TJm -(5681 5727) 39.3166 Tj -0 -218.3469 Td -(create 4801) 48.0537 Tj --12540.5 TJm -(ESR 5666) 34.9481 Tj -17.4613 -227.8403 Td -(4801 4843 4862 4911) 83.0018 Tj --8527.14 TJm -(5666 5730 5731) 61.1592 Tj -17.4613 -237.3336 Td -(4923) 17.4741 Tj --14045.6 TJm -(EXEC 6857) 39.3166 Tj -0 -246.827 Td -(CRTPORT 6264) 52.4222 Tj --14045.3 TJm -(6857 6922 7059 7365) 83.0018 Tj -17.4613 -256.3203 Td -(6264 6306 6307 6308) 83.0018 Tj --6520.6 TJm -(execcmd 6869 7053) 74.2647 Tj -17.4613 -265.8137 Td -(6309 6325 6326 6327) 83.0018 Tj --8527.14 TJm -(6869 6910 6923 7053) 83.0018 Tj -17.4613 -275.3071 Td -(6328) 17.4741 Tj --16052.1 TJm -(7055 7321 7327 7328) 83.0018 Tj -0 -284.8004 Td -(CTL 6059) 34.9481 Tj --16052 TJm -(7356 7366) 39.3166 Tj -17.4613 -294.2938 Td -(6059 6085 6089 6235) 83.0018 Tj --6520.6 TJm -(exit 2004) 39.3166 Tj -0 -303.7871 Td -(curproc 1789) 52.4222 Tj --14045.3 TJm -(0294 2004 2041 2538) 83.0018 Tj -17.4613 -313.2805 Td -(0293 1559 1573 1789) 83.0018 Tj --8527.14 TJm -(2542 2587 2822 6715) 83.0018 Tj -17.4613 -322.7739 Td -(1794 1829 1836) 61.1592 Tj --11035.5 TJm -(6718 6776 6781 6811) 83.0018 Tj -0 -332.2668 Td -(devsw 2950) 43.6851 Tj --15048.7 TJm -(6916 6925 6935 6980) 83.0018 Tj -17.4613 -341.7602 Td -(2950 2955 4108 4110) 83.0018 Tj --8527.14 TJm -(7028 7035) 39.3166 Tj -17.4613 -351.2536 Td -(4158 4160 4407 6556) 83.0018 Tj --6520.6 TJm -(fdalloc 4583) 52.4222 Tj -17.4613 -360.7469 Td -(6557) 17.4741 Tj --16052.1 TJm -(4583 4632 4874 4987) 83.0018 Tj -0 -370.2403 Td -(dinode 3173) 48.0537 Tj --12540.5 TJm -(fetchint 2666) 56.7907 Tj -17.4613 -379.7336 Td -(3173 3187 3855 3868) 83.0018 Tj --8527.14 TJm -(0332 2666 2696 4963) 83.0018 Tj -17.4613 -389.227 Td -(3956 3962 3980 3983) 83.0018 Tj --6520.6 TJm -(fetchstr 2678) 56.7907 Tj -0 -398.7204 Td -(dirent 3203) 48.0537 Tj +(Aug 8 01:04 2009 cross-references Page 3) 187.8461 Tj +0 -28.4801 Td +(dinode 3172) 48.0537 Tj -14547 TJm -(0333 2678 2726 4969) 83.0018 Tj -17.4613 -408.2137 Td -(3203 4216 4223 4224) 83.0018 Tj +(4582 4608 4874 4987) 83.0018 Tj +17.4613 -37.9735 Td +(3172 3182 3806 3812) 83.0018 Tj -6520.6 TJm -(file 3100) 39.3166 Tj -17.4613 -417.7071 Td +(fetchint 2766) 56.7907 Tj +17.4613 -47.4664 Td +(3830 3833 3905 3918) 83.0018 Tj +-8527.14 TJm +(0342 2766 2796 4963) 83.0018 Tj +0 -56.9598 Td +(dirent 3203) 48.0537 Tj +-12540.5 TJm +(fetchstr 2778) 56.7907 Tj +17.4613 -66.4531 Td +(3203 4216 4223 4224) 83.0018 Tj +-8527.14 TJm +(0343 2778 2826 4969) 83.0018 Tj +17.4613 -75.9461 Td (4255 4705 4754) 61.1592 Tj --11035.5 TJm -(0202 0225 0226 0227) 83.0018 Tj -0 -427.2004 Td +-9028.94 TJm +(file 3250) 39.3166 Tj +0 -85.4395 Td (dirlink 4252) 52.4222 Tj -14045.3 TJm -(0229 0230 0231 0286) 83.0018 Tj -17.4613 -436.6938 Td +(0202 0225 0226 0227) 83.0018 Tj +17.4613 -94.9328 Td (0234 4252 4267 4275) 83.0018 Tj -8527.14 TJm -(1538 3100 4403 4409) 83.0018 Tj -17.4613 -446.1872 Td -(4684 4831 4842) 61.1592 Tj --11035.5 TJm -(4418 4425 4426 4427) 83.0018 Tj -0 -455.6805 Td +(0229 0230 0231 0287) 83.0018 Tj +17.4613 -104.4258 Td +(4684 4833 4837 4838) 83.0018 Tj +-8527.14 TJm +(1540 3250 3671 4403) 83.0018 Tj +0 -113.9192 Td (dirlookup 4212) 61.1592 Tj -13042 TJm -(4429 4437 4438 4452) 83.0018 Tj -17.4613 -465.1739 Td +(4409 4419 4422 4425) 83.0018 Tj +17.4613 -123.4125 Td (0235 4212 4219 4259) 83.0018 Tj -8527.14 TJm -(4454 4478 4502 4522) 83.0018 Tj -17.4613 -474.6672 Td +(4437 4438 4452 4454) 83.0018 Tj +17.4613 -132.9055 Td (4374 4770 4811) 61.1592 Tj -11035.5 TJm -(4558 4564 4567 4583) 83.0018 Tj -0 -484.1606 Td +(4476 4502 4522 4557) 83.0018 Tj +0 -142.3989 Td (DIRSIZ 3201) 48.0537 Tj -14547 TJm -(4603 4615 4627 4642) 83.0018 Tj -17.4613 -493.654 Td +(4563 4566 4582 4603) 83.0018 Tj +17.4613 -151.8922 Td (3201 3205 4205 4272) 83.0018 Tj -8527.14 TJm -(4653 4855 4979 5155) 83.0018 Tj +(4617 4629 4642 4653) 83.0018 Tj +17.4613 -161.3852 Td +(4328 4329 4391 4665) 83.0018 Tj +-8527.14 TJm +(4855 4979 5155 5170) 83.0018 Tj +17.4613 -170.8782 Td +(4755 4805) 39.3166 Tj +-13543.8 TJm +(6309 6878 6933 6934) 83.0018 Tj +0 -180.3715 Td +(DPL_USER 0711) 56.7907 Tj +-13543.7 TJm +(7064 7072 7272) 61.1592 Tj +17.4613 -189.8645 Td +(0711 1725 1726 1817) 83.0018 Tj +-6520.6 TJm +(filealloc 4420) 61.1592 Tj +17.4613 -199.3575 Td +(1818 2572 2658 2667) 83.0018 Tj +-8527.14 TJm +(0225 4420 4874 5176) 83.0018 Tj +0 -208.8508 Td +(E0ESC 6116) 43.6851 Tj +-13042.1 TJm +(fileclose 4452) 61.1592 Tj +17.4613 -218.3442 Td +(6116 6270 6274 6275) 83.0018 Tj +-8527.14 TJm +(0226 2115 4452 4458) 83.0018 Tj +17.4613 -227.8372 Td +(6277 6280) 39.3166 Tj +-13543.8 TJm +(4647 4876 4990 4991) 83.0018 Tj +0 -237.3305 Td +(elfhdr 0855) 48.0537 Tj +-14547 TJm +(5204 5206) 39.3166 Tj +17.4613 -246.8239 Td +(0855 1118 1123 5014) 83.0018 Tj +-6520.6 TJm +(filedup 4438) 52.4222 Tj +0 -256.3172 Td +(ELF_MAGIC 0852) 61.1592 Tj +-13042 TJm +(0227 1880 4438 4442) 83.0018 Tj +17.4613 -265.8106 Td +(0852 1129 5028) 61.1592 Tj +-11035.5 TJm +(4610) 17.4741 Tj +0 -275.304 Td +(ELF_PROG_LOAD 0886) 78.6333 Tj +-9028.81 TJm +(fileinit 4413) 56.7907 Tj +17.4613 -284.7973 Td +(0886 5036 5067) 61.1592 Tj +-11035.5 TJm +(0228 1230 4413) 61.1592 Tj +0 -294.2907 Td +(EOI 5663) 34.9481 Tj +-14045.5 TJm +(fileread 4502) 56.7907 Tj +17.4613 -303.784 Td +(5663 5734 5775) 61.1592 Tj +-11035.5 TJm +(0229 4502 4517 4623) 83.0018 Tj +0 -313.2774 Td +(ERROR 5681) 43.6851 Tj +-13042.1 TJm +(filestat 4476) 56.7907 Tj +17.4613 -322.7707 Td +(5681 5727) 39.3166 Tj +-13543.8 TJm +(0230 4476 4658) 61.1592 Tj +0 -332.2637 Td +(ESR 5666) 34.9481 Tj +-14045.5 TJm +(filewrite 4522) 61.1592 Tj +17.4613 -341.7571 Td +(5666 5730 5731) 61.1592 Tj +-11035.5 TJm +(0231 4522 4537 4635) 83.0018 Tj +0 -351.2504 Td +(exec 5009) 39.3166 Tj +-13543.8 TJm +(FL_IF 0660) 43.6851 Tj +17.4613 -360.7438 Td +(0222 4972 5009 6768) 83.0018 Tj +-8527.14 TJm +(0660 1462 1468 1821) 83.0018 Tj +17.4613 -370.2368 Td +(6829 6830 6926 6927) 83.0018 Tj +-8527.14 TJm +(1963 5758) 39.3166 Tj +0 -379.7301 Td +(EXEC 6857) 39.3166 Tj +-13543.8 TJm +(fork 1854) 39.3166 Tj +17.4613 -389.2235 Td +(6857 6922 7059 7365) 83.0018 Tj +-8527.14 TJm +(0303 1854 2910 6760) 83.0018 Tj +0 -398.7168 Td +(execcmd 6869 7053) 74.2647 Tj +-11537 TJm +(6823 6825 7043 7045) 83.0018 Tj +17.4613 -408.2102 Td +(6869 6910 6923 7053) 83.0018 Tj +-6520.6 TJm +(fork1 7039) 43.6851 Tj +17.4613 -417.7032 Td +(7055 7321 7327 7328) 83.0018 Tj +-8527.14 TJm +(6900 6942 6954 6961) 83.0018 Tj +17.4613 -427.1962 Td +(7356 7366) 39.3166 Tj +-13543.8 TJm +(6976 7024 7039) 61.1592 Tj +0 -436.6895 Td +(exit 2104) 39.3166 Tj +-13543.8 TJm +(forkret 1984) 52.4222 Tj +17.4613 -446.1829 Td +(0302 2104 2140 2605) 83.0018 Tj +-8527.14 TJm +(1616 1790 1984) 61.1592 Tj +17.4613 -455.6758 Td +(2609 2659 2668 2916) 83.0018 Tj +-6520.6 TJm +(gatedesc 0801) 56.7907 Tj +17.4613 -465.1688 Td +(6715 6718 6761 6826) 83.0018 Tj +-8527.14 TJm +(0464 0467 0801 2560) 83.0018 Tj +17.4613 -474.6618 Td +(6831 6916 6925 6935) 83.0018 Tj +-6520.6 TJm +(getcallerpcs 1426) 74.2647 Tj +17.4613 -484.1548 Td +(6980 7028 7035) 61.1592 Tj +-11035.5 TJm +(0322 1390 1426 1678) 83.0018 Tj +0 -493.6481 Td +(fdalloc 4582) 52.4222 Tj +-14045.3 TJm +(6411) 17.4741 Tj Q Q q @@ -1941,207 +1946,207 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 4) 187.8461 Tj -17.4613 -28.4801 Td -(5170 6878 6933 6934) 83.0018 Tj --8527.14 TJm -(0236 3952 3972 4821) 83.0018 Tj -17.4613 -37.9735 Td -(7064 7072 7272) 61.1592 Tj --9028.94 TJm -(IBLOCK 3190) 48.0537 Tj -0 -47.4664 Td -(filealloc 4419) 61.1592 Tj --13042 TJm -(3190 3867 3961 3982) 83.0018 Tj -17.4613 -56.9598 Td -(0225 4419 4874 5176) 83.0018 Tj --6520.6 TJm -(ICRHI 5674) 43.6851 Tj -0 -66.4531 Td -(fileclose 4452) 61.1592 Tj --13042 TJm -(5674 5737 5821 5833) 83.0018 Tj -17.4613 -75.9465 Td -(0226 2015 4452 4458) 83.0018 Tj --6520.6 TJm -(ICRLO 5667) 43.6851 Tj -17.4613 -85.4399 Td -(4473 4647 4876 4990) 83.0018 Tj --8527.14 TJm -(5667 5738 5739 5822) 83.0018 Tj -17.4613 -94.9332 Td -(4991 5205 5209) 61.1592 Tj --11035.5 TJm -(5824 5834) 39.3166 Tj -0 -104.4266 Td -(filedup 4438) 52.4222 Tj --12038.8 TJm -(ID 5660) 30.5796 Tj -17.4613 -113.9199 Td -(0227 1741 4438 4442) 83.0018 Tj --8527.14 TJm -(5660 5693 5766) 61.1592 Tj -17.4613 -123.4133 Td -(4634) 17.4741 Tj --14045.6 TJm -(IDE_BSY 3312) 52.4222 Tj -0 -132.9067 Td -(fileinit 4412) 56.7907 Tj --13543.7 TJm -(3312 3336) 39.3166 Tj -17.4613 -142.4 Td -(0228 1229 4412) 61.1592 Tj --9028.94 TJm -(IDE_CMD_READ 3317) 74.2647 Tj -0 -151.8934 Td -(fileread 4502) 56.7907 Tj --13543.7 TJm -(3317 3391) 39.3166 Tj -17.4613 -161.3867 Td -(0229 4502 4517 4609) 83.0018 Tj --6520.6 TJm -(IDE_CMD_WRITE 3318) 78.6333 Tj -0 -170.8801 Td -(filestat 4478) 56.7907 Tj --13543.7 TJm -(3318 3388) 39.3166 Tj -17.4613 -180.3735 Td -(0230 4478 4658) 61.1592 Tj --9028.94 TJm -(IDE_DF 3314) 48.0537 Tj -0 -189.8664 Td -(filewrite 4522) 61.1592 Tj --13042 TJm -(3314 3338) 39.3166 Tj -17.4613 -199.3598 Td -(0231 4522 4537 4621) 83.0018 Tj --6520.6 TJm -(IDE_DRDY 3313) 56.7907 Tj -0 -208.8532 Td -(file_table_lock 4408) 87.3703 Tj --10032 TJm -(3313 3336) 39.3166 Tj -17.4613 -218.3465 Td -(4408 4414 4423 4428) 83.0018 Tj --6520.6 TJm -(IDE_ERR 3315) 52.4222 Tj -17.4613 -227.8399 Td -(4432 4440 4444 4456) 83.0018 Tj --8527.14 TJm -(3315 3338) 39.3166 Tj -17.4613 -237.3332 Td -(4460 4466) 39.3166 Tj --11537.3 TJm -(ide_init 3351) 56.7907 Tj -0 -246.8266 Td -(FL_IF 0610) 43.6851 Tj --15048.7 TJm -(0251 1232 3351) 61.1592 Tj -17.4613 -256.32 Td -(0610 1462 1468 1771) 83.0018 Tj --6520.6 TJm -(ide_intr 3402) 56.7907 Tj -17.4613 -265.8133 Td -(1855 5758) 39.3166 Tj --13543.8 TJm -(0252 2557 3402) 61.1592 Tj -0 -275.3067 Td -(fork1 7039) 43.6851 Tj --13042.1 TJm -(ide_lock 3324) 56.7907 Tj -17.4613 -284.8 Td -(6900 6942 6954 6961) 83.0018 Tj --8527.14 TJm -(3324 3355 3406 3408) 83.0018 Tj -17.4613 -294.2934 Td -(6976 7024 7039) 61.1592 Tj --11035.5 TJm -(3425 3465 3480 3482) 83.0018 Tj -0 -303.7868 Td -(forkret 1880) 52.4222 Tj --12038.8 TJm -(ide_rw 3454) 48.0537 Tj -17.4613 -313.2801 Td -(1614 1747 1880) 61.1592 Tj --11035.5 TJm -(0253 3454 3459 3461) 83.0018 Tj -0 -322.7735 Td -(forkret1 2484) 56.7907 Tj --13543.7 TJm -(3608 3619) 39.3166 Tj -17.4613 -332.2664 Td -(1615 1886 2483 2484) 83.0018 Tj --6520.6 TJm -(ide_start_request 3375) 96.1073 Tj -0 -341.7598 Td -(gatedesc 0751) 56.7907 Tj --13543.7 TJm -(3328 3375 3378 3423) 83.0018 Tj -17.4613 -351.2532 Td -(0414 0417 0751 2510) 83.0018 Tj --8527.14 TJm -(3475) 17.4741 Tj -0 -360.7465 Td -(getcallerpcs 1422) 74.2647 Tj --9530.47 TJm -(ide_wait_ready 3332) 83.0018 Tj -17.4613 -370.2399 Td -(0312 1392 1422 2129) 83.0018 Tj --8527.14 TJm -(3332 3358 3380 3413) 83.0018 Tj -17.4613 -379.7332 Td -(6575) 17.4741 Tj --14045.6 TJm -(idtinit 2528) 52.4222 Tj -0 -389.2266 Td +(Aug 8 01:04 2009 cross-references Page 4) 187.8461 Tj +0 -28.4801 Td (getcmd 6984) 48.0537 Tj --14547 TJm -(0340 1256 2528) 61.1592 Tj -17.4613 -398.72 Td +-12540.5 TJm +(idestart 3375) 56.7907 Tj +17.4613 -37.9735 Td (6984 7015) 39.3166 Tj --11537.3 TJm -(idup 3838) 39.3166 Tj -0 -408.2133 Td +-13543.8 TJm +(3328 3375 3378 3426) 83.0018 Tj +0 -47.4664 Td (gettoken 7156) 56.7907 Tj -13543.7 TJm -(0237 1742 3838 4361) 83.0018 Tj -17.4613 -417.7067 Td +(3475) 17.4741 Tj +17.4613 -56.9598 Td (7156 7241 7245 7257) 83.0018 Tj -6520.6 TJm -(iget 3803) 39.3166 Tj -17.4613 -427.2 Td +(idewait 3332) 52.4222 Tj +17.4613 -66.4531 Td (7270 7271 7307 7311) 83.0018 Tj -8527.14 TJm -(3803 3823 3968 4234) 83.0018 Tj -17.4613 -436.6934 Td +(3332 3358 3380 3416) 83.0018 Tj +17.4613 -75.9465 Td (7333) 17.4741 Tj --16052.1 TJm -(4359) 17.4741 Tj -0 -446.1868 Td -(growproc 1653) 56.7907 Tj --11537.1 TJm -(iinit 3789) 43.6851 Tj -17.4613 -455.6801 Td -(0295 1653 2858) 61.1592 Tj --11035.5 TJm -(0238 1230 3789) 61.1592 Tj -0 -465.1735 Td -(holding 1440) 52.4222 Tj --12038.8 TJm -(ilock 3852) 43.6851 Tj -17.4613 -474.6665 Td -(0313 1378 1404 1440) 83.0018 Tj +-14045.6 TJm +(idtinit 2578) 52.4222 Tj +0 -85.4399 Td +(growproc 1834) 56.7907 Tj +-13543.7 TJm +(0351 1259 2578) 61.1592 Tj +17.4613 -94.9332 Td +(0304 1834 2959) 61.1592 Tj +-9028.94 TJm +(idup 3888) 39.3166 Tj +0 -104.4266 Td +(havedisk1 3327) 61.1592 Tj +-13042 TJm +(0237 1881 3888 4361) 83.0018 Tj +17.4613 -113.9199 Td +(3327 3364 3462) 61.1592 Tj +-9028.94 TJm +(iget 3853) 39.3166 Tj +0 -123.4133 Td +(holding 1444) 52.4222 Tj +-14045.3 TJm +(3794 3818 3853 3873) 83.0018 Tj +17.4613 -132.9067 Td +(0323 1376 1404 1444) 83.0018 Tj -8527.14 TJm -(0239 3852 3858 3878) 83.0018 Tj -17.4613 -484.1598 Td -(1859) 17.4741 Tj --16052.1 TJm -(4364 4481 4511 4531) 83.0018 Tj -0 -493.6532 Td -(ialloc 3952) 48.0537 Tj +(4234 4359) 39.3166 Tj +17.4613 -142.4 Td +(1957) 17.4741 Tj +-14045.6 TJm +(iinit 3789) 43.6851 Tj +0 -151.8934 Td +(ialloc 3802) 48.0537 Tj -14547 TJm +(0238 1231 3789) 61.1592 Tj +17.4613 -161.3867 Td +(0236 3802 3822 4820) 83.0018 Tj +-6520.6 TJm +(ilock 3902) 43.6851 Tj +17.4613 -170.8801 Td +(4821) 17.4741 Tj +-16052.1 TJm +(0239 3902 3908 3928) 83.0018 Tj +0 -180.3735 Td +(IBLOCK 3185) 48.0537 Tj +-14547 TJm +(4364 4479 4511 4531) 83.0018 Tj +17.4613 -189.8664 Td +(3185 3811 3832 3917) 83.0018 Tj +-8527.14 TJm (4672 4683 4693 4762) 83.0018 Tj +0 -199.3598 Td +(I_BUSY 3277) 48.0537 Tj +-14547 TJm +(4774 4809 4813 4823) 83.0018 Tj +17.4613 -208.8532 Td +(3277 3911 3913 3936) 83.0018 Tj +-8527.14 TJm +(4867 4937 5023 6563) 83.0018 Tj +17.4613 -218.3465 Td +(3940 3957 3959) 61.1592 Tj +-11035.5 TJm +(6583 6610) 39.3166 Tj +0 -227.8399 Td +(ICRHI 5674) 43.6851 Tj +-13042.1 TJm +(inb 0403) 34.9481 Tj +17.4613 -237.3332 Td +(5674 5737 5821 5833) 83.0018 Tj +-8527.14 TJm +(0403 0928 0936 1154) 83.0018 Tj +0 -246.8266 Td +(ICRLO 5667) 43.6851 Tj +-15048.7 TJm +(3336 3363 5646 6264) 83.0018 Tj +17.4613 -256.32 Td +(5667 5738 5739 5822) 83.0018 Tj +-8527.14 TJm +(6267 6461 6463) 61.1592 Tj +17.4613 -265.8133 Td +(5824 5834) 39.3166 Tj +-11537.3 TJm +(initlock 1361) 56.7907 Tj +0 -275.3067 Td +(ID 5660) 30.5796 Tj +174.613 -275.3067 Td +(0324 1361 1622 2283) 83.0018 Tj +17.461 -284.8 Td +(5660 5693 5766) 61.1592 Tj +-11035.5 TJm +(2574 3355 3543 3791) 83.0018 Tj +-0.0003 -294.2934 Td +(IDE_BSY 3312) 52.4222 Tj +-14045.3 TJm +(4415 5184 6618 6619) 83.0018 Tj +17.461 -303.7868 Td +(3312 3336) 39.3166 Tj +-11537.3 TJm +(inode 3263) 43.6851 Tj +-0.0003 -313.2801 Td +(IDE_CMD_READ 3317) 74.2647 Tj +-11537 TJm +(0203 0234 0235 0236) 83.0018 Tj +17.461 -322.7735 Td +(3317 3391) 39.3166 Tj +-13543.8 TJm +(0237 0239 0240 0241) 83.0018 Tj +-0.0003 -332.2664 Td +(IDE_CMD_WRITE 3318) 78.6333 Tj +-11035.3 TJm +(0242 0243 0245 0246) 83.0018 Tj +17.461 -341.7598 Td +(3318 3388) 39.3166 Tj +-13543.8 TJm +(0247 0248 0249 1541) 83.0018 Tj +-0.0003 -351.2532 Td +(IDE_DF 3314) 48.0537 Tj +-14547 TJm +(3256 3263 3284 3285) 83.0018 Tj +17.461 -360.7465 Td +(3314 3338) 39.3166 Tj +-13543.8 TJm +(3674 3785 3794 3801) 83.0018 Tj +-0.0003 -370.2399 Td +(IDE_DRDY 3313) 56.7907 Tj +-13543.7 TJm +(3827 3852 3855 3861) 83.0018 Tj +17.461 -379.7332 Td +(3313 3336) 39.3166 Tj +-13543.8 TJm +(3887 3888 3902 3934) 83.0018 Tj +-0.0003 -389.2266 Td +(IDE_ERR 3315) 52.4222 Tj +-14045.3 TJm +(3952 3974 4010 4054) 83.0018 Tj +17.461 -398.72 Td +(3315 3338) 39.3166 Tj +-13543.8 TJm +(4085 4102 4152 4211) 83.0018 Tj +-0.0003 -408.2133 Td +(ideinit 3351) 52.4222 Tj +-14045.3 TJm +(4212 4252 4256 4353) 83.0018 Tj +17.461 -417.7067 Td +(0251 1232 3351) 61.1592 Tj +-11035.5 TJm +(4356 4388 4395 4666) 83.0018 Tj +-0.0003 -427.2 Td +(ideintr 3402) 52.4222 Tj +-14045.3 TJm +(4702 4753 4800 4804) 83.0018 Tj +17.461 -436.6934 Td +(0252 2624 3402) 61.1592 Tj +-11035.5 TJm +(4856 4904 4915 4933) 83.0018 Tj +-0.0003 -446.1868 Td +(idelock 3324) 52.4222 Tj +-14045.3 TJm +(5015 6551 6601) 61.1592 Tj +17.461 -455.6801 Td +(3324 3355 3407 3409) 83.0018 Tj +-6520.6 TJm +(INPUT_BUF 6500) 61.1592 Tj +17.461 -465.1735 Td +(3428 3465 3480 3482) 83.0018 Tj +-8527.14 TJm +(6500 6503 6524 6536) 83.0018 Tj +-0.0003 -474.6665 Td +(iderw 3454) 43.6851 Tj +-15048.7 TJm +(6537 6539 6568) 61.1592 Tj +17.461 -484.1598 Td +(0253 3454 3459 3461) 83.0018 Tj +-6520.6 TJm +(insl 0412) 39.3166 Tj +17.461 -493.6532 Td +(3608 3619) 39.3166 Tj +-13543.8 TJm +(0412 0414 1173 3417) 83.0018 Tj Q Q Q @@ -2170,6 +2175,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -2187,207 +2194,207 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 5) 187.8461 Tj -17.4613 -28.4801 Td -(4774 4809 4813 4825) 83.0018 Tj --8527.14 TJm -(5932) 17.4741 Tj -17.4613 -37.9735 Td -(4867 4937 5020 6444) 83.0018 Tj --6520.6 TJm -(IO_PIC1 5957) 52.4222 Tj -17.4613 -47.4668 Td -(6513 6533) 39.3166 Tj --13543.8 TJm -(5957 5970 5985 5994) 83.0018 Tj -0 -56.9602 Td -(inb 0353) 34.9481 Tj --16052 TJm -(5997 6002 6012 6026) 83.0018 Tj -17.4613 -66.4535 Td -(0353 0928 0936 1154) 83.0018 Tj --8527.14 TJm -(6027) 17.4741 Tj -17.4613 -75.9469 Td -(3336 3363 5646 6214) 83.0018 Tj --6520.6 TJm -(IO_PIC2 5958) 52.4222 Tj -17.4613 -85.4403 Td -(6217 6282 6307 6309) 83.0018 Tj --8527.14 TJm -(5958 5971 5986 6015) 83.0018 Tj -0 -94.9336 Td -(INDIRECT 3168) 56.7907 Tj --13543.7 TJm -(6016 6017 6020 6029) 83.0018 Tj -17.4613 -104.427 Td -(3168 4027 4030 4065) 83.0018 Tj --8527.14 TJm -(6030) 17.4741 Tj -17.4613 -113.9203 Td -(4066 4073) 39.3166 Tj --11537.3 TJm -(IO_RTC 5800) 48.0537 Tj -0 -123.4137 Td -(initlock 1363) 56.7907 Tj --13543.7 TJm -(5800 5813 5814) 61.1592 Tj -17.4613 -132.9071 Td -(0314 1363 1620 2231) 83.0018 Tj --6520.6 TJm -(IO_TIMER1 6609) 61.1592 Tj -17.4613 -142.4004 Td -(2524 3355 3542 3791) 83.0018 Tj --8527.14 TJm -(6609 6618 6628 6629) 83.0018 Tj -17.4613 -151.8938 Td -(4414 5184 6553 6554) 83.0018 Tj --6520.6 TJm -(IPB 3187) 34.9481 Tj -0 -161.3871 Td -(inode 3252) 43.6851 Tj --15048.7 TJm -(3187 3190 3196 3868) 83.0018 Tj -17.4613 -170.8805 Td -(0203 0234 0235 0236) 83.0018 Tj --8527.14 TJm -(3962 3983) 39.3166 Tj -17.4613 -180.3739 Td -(0237 0239 0240 0241) 83.0018 Tj --6520.6 TJm -(iput 3902) 39.3166 Tj -17.4613 -189.8672 Td -(0242 0243 0245 0246) 83.0018 Tj --8527.14 TJm -(0240 2020 3902 3908) 83.0018 Tj -17.4613 -199.3606 Td -(0247 0248 0249 1539) 83.0018 Tj --8527.14 TJm -(3927 4260 4382 4471) 83.0018 Tj -17.4613 -208.8539 Td -(2951 2952 3106 3252) 83.0018 Tj --8527.14 TJm -(4687 4943) 39.3166 Tj -17.4613 -218.3473 Td -(3675 3785 3802 3805) 83.0018 Tj --6520.6 TJm -(IRQ_ERROR 2384) 61.1592 Tj -17.4613 -227.8407 Td -(3811 3837 3838 3852) 83.0018 Tj --8527.14 TJm -(2384 5727) 39.3166 Tj -17.4613 -237.334 Td -(3884 3902 3924 3951) 83.0018 Tj --6520.6 TJm -(IRQ_IDE 2383) 52.4222 Tj -17.4613 -246.8274 Td -(3977 4010 4052 4082) 83.0018 Tj --8527.14 TJm -(2383 2556 3356 3357) 83.0018 Tj -17.4613 -256.3207 Td -(4102 4152 4211 4212) 83.0018 Tj --6520.6 TJm -(IRQ_KBD 2382) 52.4222 Tj -17.4613 -265.8141 Td -(4252 4256 4353 4356) 83.0018 Tj --8527.14 TJm -(2382 2560 6560 6561) 83.0018 Tj -17.4613 -275.3075 Td -(4388 4395 4666 4702) 83.0018 Tj --6520.6 TJm -(IRQ_OFFSET 2379) 65.5277 Tj -17.4613 -284.8008 Td -(4753 4800 4804 4856) 83.0018 Tj --8527.14 TJm -(2379 2547 2556 2560) 83.0018 Tj -17.4613 -294.2942 Td -(4903 4921 4933 5015) 83.0018 Tj --8527.14 TJm -(2564 2591 5707 5714) 83.0018 Tj -17.4613 -303.7875 Td -(6435 6501) 39.3166 Tj --13543.8 TJm -(5727 5917 5931 5997) 83.0018 Tj -0 -313.2809 Td -(INPUT_BUF 6450) 61.1592 Tj --13042 TJm -(6016) 17.4741 Tj -17.4613 -322.7743 Td -(6450 6453 6474 6486) 83.0018 Tj --6520.6 TJm -(IRQ_SLAVE 5960) 61.1592 Tj -17.4613 -332.2676 Td -(6487 6489 6518) 61.1592 Tj --11035.5 TJm -(5960 5964 6002 6017) 83.0018 Tj -0 -341.761 Td -(insl 0362) 39.3166 Tj --13543.8 TJm -(IRQ_SPURIOUS 2385) 74.2647 Tj -17.4613 -351.2543 Td -(0362 1173 3414) 61.1592 Tj --11035.5 TJm -(2385 2564 5707) 61.1592 Tj -0 -360.7477 Td +(Aug 8 01:04 2009 cross-references Page 5) 187.8461 Tj +0 -28.4801 Td (INT_DISABLED 5869) 74.2647 Tj --9530.47 TJm -(IRQ_TIMER 2381) 61.1592 Tj -17.4613 -370.2411 Td -(5869 5917) 39.3166 Tj --13543.8 TJm -(2381 2547 2591 5714) 83.0018 Tj -0 -379.7344 Td -(IOAPIC 5858) 48.0537 Tj --14547 TJm -(6630) 17.4741 Tj -17.4613 -389.2278 Td -(5858 5908) 39.3166 Tj --11537.3 TJm -(isdirempty 4702) 65.5277 Tj -0 -398.7211 Td -(ioapic_enable 5923) 78.6333 Tj --11035.3 TJm -(4702 4709 4778) 61.1592 Tj -17.4613 -408.2145 Td -(0256 3357 5923 6561) 83.0018 Tj --6520.6 TJm -(ismp 5514) 39.3166 Tj -0 -417.7079 Td -(ioapic_id 5516) 61.1592 Tj --13042 TJm -(0276 1233 5514 5613) 83.0018 Tj -17.4613 -427.2012 Td -(0257 5516 5628 5911) 83.0018 Tj --8527.14 TJm -(5905 5925) 39.3166 Tj -17.4613 -436.6946 Td -(5912) 17.4741 Tj --14045.6 TJm -(itrunc 4052) 48.0537 Tj -0 -446.1879 Td -(ioapic_init 5901) 69.8962 Tj --12038.7 TJm -(3675 3911 4052) 61.1592 Tj -17.4613 -455.6813 Td -(0258 1226 5901 5912) 83.0018 Tj --6520.6 TJm -(iunlock 3884) 52.4222 Tj -0 -465.1747 Td -(ioapic_read 5884) 69.8962 Tj --12038.7 TJm -(0241 3884 3887 3926) 83.0018 Tj -17.4613 -474.6676 Td -(5884 5909 5910) 61.1592 Tj --11035.5 TJm -(4371 4483 4514 4534) 83.0018 Tj -0 -484.161 Td -(ioapic_write 5891) 74.2647 Tj -11537 TJm -(4679 4880 4942 6439) 83.0018 Tj -17.4613 -493.6543 Td +(2436 2636 5707) 61.1592 Tj +17.4613 -37.9735 Td +(5869 5917) 39.3166 Tj +-11537.3 TJm +(IRQ_TIMER 2431) 61.1592 Tj +0 -47.4664 Td +(ioapic 5877) 48.0537 Tj +-14547 TJm +(2431 2614 2663 5714) 83.0018 Tj +17.4613 -56.9598 Td +(5607 5627 5628 5874) 83.0018 Tj +-8527.14 TJm +(6680) 17.4741 Tj +17.4613 -66.4531 Td +(5877 5886 5887 5893) 83.0018 Tj +-6520.6 TJm +(isdirempty 4702) 65.5277 Tj +17.4613 -75.9465 Td +(5894 5908) 39.3166 Tj +-13543.8 TJm +(4702 4709 4778) 61.1592 Tj +0 -85.4399 Td +(IOAPIC 5858) 48.0537 Tj +-12540.5 TJm +(ismp 5514) 39.3166 Tj +17.4613 -94.9332 Td +(5858 5908) 39.3166 Tj +-13543.8 TJm +(0277 1233 5514 5613) 83.0018 Tj +0 -104.4266 Td +(ioapicenable 5923) 74.2647 Tj +-11537 TJm +(5905 5925) 39.3166 Tj +17.4613 -113.9199 Td +(0256 3357 5923 6626) 83.0018 Tj +-6520.6 TJm +(itrunc 4054) 48.0537 Tj +0 -123.4133 Td +(ioapicid 5516) 56.7907 Tj +-13543.7 TJm +(3674 3961 4054) 61.1592 Tj +17.4613 -132.9067 Td +(0257 5516 5628 5911) 83.0018 Tj +-6520.6 TJm +(iunlock 3934) 52.4222 Tj +17.4613 -142.4 Td +(5912) 17.4741 Tj +-16052.1 TJm +(0241 3934 3937 3976) 83.0018 Tj +0 -151.8934 Td +(ioapicinit 5901) 65.5277 Tj +-12540.3 TJm +(4371 4481 4514 4534) 83.0018 Tj +17.4613 -161.3867 Td +(0258 1221 5901 5912) 83.0018 Tj +-8527.14 TJm +(4679 4880 4942 6556) 83.0018 Tj +0 -170.8801 Td +(ioapicread 5884) 65.5277 Tj +-12540.3 TJm +(6605) 17.4741 Tj +17.4613 -180.3735 Td +(5884 5909 5910) 61.1592 Tj +-9028.94 TJm +(iunlockput 3974) 65.5277 Tj +0 -189.8664 Td +(ioapicwrite 5891) 69.8962 Tj +-12038.7 TJm +(0242 3974 4366 4375) 83.0018 Tj +17.4613 -199.3598 Td (5891 5917 5918 5931) 83.0018 Tj -8527.14 TJm -(6506) 17.4741 Tj +(4378 4674 4685 4688) 83.0018 Tj +17.4613 -208.8532 Td +(5932) 17.4741 Tj +-16052.1 TJm +(4696 4766 4771 4779) 83.0018 Tj +0 -218.3465 Td +(IO_PIC1 5957) 52.4222 Tj +-14045.3 TJm +(4780 4791 4795 4812) 83.0018 Tj +17.4613 -227.8399 Td +(5957 5970 5985 5994) 83.0018 Tj +-8527.14 TJm +(4816 4840 4869 4877) 83.0018 Tj +17.4613 -237.3332 Td +(5997 6002 6012 6026) 83.0018 Tj +-8527.14 TJm +(4908 4925 4939 5077) 83.0018 Tj +17.4613 -246.8266 Td +(6027) 17.4741 Tj +-16052.1 TJm +(5118) 17.4741 Tj +0 -256.32 Td +(IO_PIC2 5958) 52.4222 Tj +-12038.8 TJm +(iupdate 3827) 52.4222 Tj +17.4613 -265.8133 Td +(5958 5971 5986 6015) 83.0018 Tj +-8527.14 TJm +(0243 3827 3963 4080) 83.0018 Tj +17.4613 -275.3067 Td +(6016 6017 6020 6029) 83.0018 Tj +-8527.14 TJm +(4178 4678 4695 4789) 83.0018 Tj +17.4613 -284.8 Td +(6030) 17.4741 Tj +-16052.1 TJm +(4794 4827 4831) 61.1592 Tj +0 -294.2934 Td +(IO_RTC 5800) 48.0537 Tj +-12540.5 TJm +(I_VALID 3278) 52.4222 Tj +17.4613 -303.7868 Td +(5800 5813 5814) 61.1592 Tj +-11035.5 TJm +(3278 3916 3926 3955) 83.0018 Tj +0 -313.2801 Td +(IO_TIMER1 6659) 61.1592 Tj +-11035.5 TJm +(kalloc 2354) 48.0537 Tj +17.4613 -322.7735 Td +(6659 6668 6678 6679) 83.0018 Tj +-8527.14 TJm +(0261 1283 1772 1812) 83.0018 Tj +0 -332.2664 Td +(IPB 3182) 34.9481 Tj +-16052 TJm +(1838 1865 2354 2360) 83.0018 Tj +17.4613 -341.7598 Td +(3182 3185 3191 3812) 83.0018 Tj +-8527.14 TJm +(2375 5058 5178) 61.1592 Tj +17.4613 -351.2532 Td +(3833 3918) 39.3166 Tj +-11537.3 TJm +(KBDATAP 6104) 52.4222 Tj +0 -360.7465 Td +(iput 3952) 39.3166 Tj +-15550.3 TJm +(6104 6267) 39.3166 Tj +17.4613 -370.2399 Td +(0240 2120 3952 3958) 83.0018 Tj +-6520.6 TJm +(kbdgetc 6256) 52.4222 Tj +17.4613 -379.7332 Td +(3977 4260 4382 4471) 83.0018 Tj +-8527.14 TJm +(6256 6298) 39.3166 Tj +17.4613 -389.2266 Td +(4689 4943) 39.3166 Tj +-11537.3 TJm +(kbdintr 6296) 52.4222 Tj +0 -398.72 Td +(IRQ_COM1 2433) 56.7907 Tj +-13543.7 TJm +(0266 2628 6296) 61.1592 Tj +17.4613 -408.2133 Td +(2433 2631) 39.3166 Tj +-11537.3 TJm +(KBS_DIB 6103) 52.4222 Tj +0 -417.7067 Td +(IRQ_ERROR 2435) 61.1592 Tj +-13042 TJm +(6103 6265) 39.3166 Tj +17.4613 -427.2 Td +(2435 5727) 39.3166 Tj +-11537.3 TJm +(KBSTATP 6102) 52.4222 Tj +0 -436.6934 Td +(IRQ_IDE 2434) 52.4222 Tj +-14045.3 TJm +(6102 6264) 39.3166 Tj +17.4613 -446.1868 Td +(2434 2623 3356 3357) 83.0018 Tj +-6520.6 TJm +(KEY_DEL 6128) 52.4222 Tj +0 -455.6801 Td +(IRQ_KBD 2432) 52.4222 Tj +-14045.3 TJm +(6128 6169 6191 6215) 83.0018 Tj +17.4613 -465.1735 Td +(2432 2627 6625 6626) 83.0018 Tj +-6520.6 TJm +(KEY_DN 6122) 48.0537 Tj +0 -474.6665 Td +(IRQ_SLAVE 5960) 61.1592 Tj +-13042 TJm +(6122 6165 6187 6211) 83.0018 Tj +17.4613 -484.1598 Td +(5960 5964 6002 6017) 83.0018 Tj +-6520.6 TJm +(KEY_END 6120) 52.4222 Tj +0 -493.6532 Td +(IRQ_SPURIOUS 2436) 74.2647 Tj +-11537 TJm +(6120 6168 6190 6214) 83.0018 Tj Q Q q @@ -2404,207 +2411,207 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 6) 187.8461 Tj +(Aug 8 01:04 2009 cross-references Page 6) 187.8461 Tj 0 -28.4801 Td -(iunlockput 3924) 65.5277 Tj --10533.8 TJm -(KEY_RT 6074) 48.0537 Tj -17.4613 -37.9735 Td -(0242 3924 4366 4375) 83.0018 Tj --8527.14 TJm -(6074 6117 6139 6163) 83.0018 Tj -17.4613 -47.4664 Td -(4378 4674 4686 4692) 83.0018 Tj --6520.6 TJm -(KEY_UP 6071) 48.0537 Tj -17.4613 -56.9594 Td -(4696 4766 4771 4779) 83.0018 Tj --8527.14 TJm -(6071 6115 6137 6161) 83.0018 Tj -17.4613 -66.4524 Td -(4780 4787 4791 4812) 83.0018 Tj --6520.6 TJm -(kfree 2255) 43.6851 Tj -17.4613 -75.9453 Td -(4815 4822 4833 4834) 83.0018 Tj --8527.14 TJm -(0262 1662 1731 2069) 83.0018 Tj -17.4613 -85.4383 Td -(4845 4869 4877 4913) 83.0018 Tj --8527.14 TJm -(2070 2236 2255 2260) 83.0018 Tj -17.4613 -94.9313 Td -(4925 4939 5069 5112) 83.0018 Tj --8527.14 TJm -(5101 5111 5202 5228) 83.0018 Tj -0 -104.4246 Td -(iupdate 3977) 52.4222 Tj --12038.8 TJm -(kill 1976) 39.3166 Tj -17.4613 -113.918 Td -(0243 3913 3977 4077) 83.0018 Tj --8527.14 TJm -(0296 1976 2578 2839) 83.0018 Tj -17.4613 -123.411 Td -(4178 4678 4695 4790) 83.0018 Tj --8527.14 TJm -(6817) 17.4741 Tj -17.4613 -132.9039 Td -(4829 4840) 39.3166 Tj --11537.3 TJm -(kinit 2225) 43.6851 Tj -0 -142.3973 Td -(I_BUSY 3266) 48.0537 Tj --14547 TJm -(0263 1227 2225) 61.1592 Tj -17.4613 -151.8907 Td -(3266 3861 3863 3886) 83.0018 Tj --6520.6 TJm -(KSTACKSIZE 0152) 65.5277 Tj -17.4613 -161.3836 Td -(3890 3907 3909 3915) 83.0018 Tj --8527.14 TJm -(0152 1283 1284 1680) 83.0018 Tj -0 -170.877 Td -(I_VALID 3267) 52.4222 Tj --14045.3 TJm -(1719 1723 1731 2070) 83.0018 Tj -17.4613 -180.3703 Td -(3267 3866 3876 3905) 83.0018 Tj --6520.6 TJm -(lapicw 5690) 48.0537 Tj -0 -189.8633 Td -(kalloc 2304) 48.0537 Tj --14547 TJm -(5690 5707 5713 5714) 83.0018 Tj -17.4613 -199.3567 Td -(0261 1283 1657 1719) 83.0018 Tj --8527.14 TJm -(5715 5718 5719 5724) 83.0018 Tj -17.4613 -208.8497 Td -(1730 1764 2231 2304) 83.0018 Tj --8527.14 TJm -(5727 5730 5731 5734) 83.0018 Tj -17.4613 -218.3426 Td -(2310 2328 5052 5178) 83.0018 Tj --8527.14 TJm -(5737 5738 5743 5775) 83.0018 Tj -0 -227.836 Td -(kalloc_lock 2212) 69.8962 Tj --12038.7 TJm -(5821 5822 5824 5833) 83.0018 Tj -17.4613 -237.3293 Td -(2212 2231 2265 2293) 83.0018 Tj --8527.14 TJm -(5834) 17.4741 Tj -17.4613 -246.8223 Td -(2312 2316 2322 2326) 83.0018 Tj --6520.6 TJm -(lapic_eoi 5772) 61.1592 Tj -0 -256.3157 Td -(KBDATAP 6054) 52.4222 Tj --14045.3 TJm -(0271 2554 2558 2562) 83.0018 Tj -17.4613 -265.809 Td -(6054 6217) 39.3166 Tj --13543.8 TJm -(2567 5772) 39.3166 Tj -0 -275.3024 Td -(kbd_getc 6206) 56.7907 Tj --11537.1 TJm -(lapic_init 5701) 65.5277 Tj -17.4613 -284.7958 Td -(6206 6248) 39.3166 Tj --13543.8 TJm -(0272 1220 1258 5701) 83.0018 Tj -0 -294.2891 Td -(kbd_intr 6246) 56.7907 Tj --11537.1 TJm -(lapic_startap 5805) 78.6333 Tj -17.4613 -303.7825 Td -(0266 2561 6246) 61.1592 Tj --11035.5 TJm -(0273 1286 5805) 61.1592 Tj -0 -313.2758 Td -(KBSTATP 6052) 52.4222 Tj --12038.8 TJm -(lgdt 0403) 39.3166 Tj -17.4613 -322.7692 Td -(6052 6214) 39.3166 Tj --13543.8 TJm -(0403 0411 0954 1054) 83.0018 Tj -0 -332.2622 Td -(KBS_DIB 6053) 52.4222 Tj --14045.3 TJm -(1700) 17.4741 Tj -17.4613 -341.7555 Td -(6053 6215) 39.3166 Tj --11537.3 TJm -(lidt 0417) 39.3166 Tj -0 -351.2489 Td -(KEY_DEL 6078) 52.4222 Tj --14045.3 TJm -(0417 0425 2530) 61.1592 Tj -17.4613 -360.7422 Td -(6078 6119 6141 6165) 83.0018 Tj --6520.6 TJm -(LINT0 5679) 43.6851 Tj -0 -370.2356 Td -(KEY_DN 6072) 48.0537 Tj --14547 TJm -(5679 5718) 39.3166 Tj -17.4613 -379.729 Td -(6072 6115 6137 6161) 83.0018 Tj --6520.6 TJm -(LINT1 5680) 43.6851 Tj -0 -389.2223 Td -(KEY_END 6070) 52.4222 Tj --14045.3 TJm +(KEY_HOME 6119) 56.7907 Tj +-13543.7 TJm (5680 5719) 39.3166 Tj -17.4613 -398.7157 Td -(6070 6118 6140 6164) 83.0018 Tj +17.4613 -37.9735 Td +(6119 6168 6190 6214) 83.0018 Tj -6520.6 TJm (LIST 6860) 39.3166 Tj -0 -408.209 Td -(KEY_HOME 6069) 56.7907 Tj --13543.7 TJm +0 -47.4664 Td +(KEY_INS 6127) 52.4222 Tj +-14045.3 TJm (6860 6940 7107 7383) 83.0018 Tj -17.4613 -417.7024 Td -(6069 6118 6140 6164) 83.0018 Tj +17.4613 -56.9598 Td +(6127 6169 6191 6215) 83.0018 Tj -6520.6 TJm (listcmd 6890 7101) 74.2647 Tj -0 -427.1958 Td -(KEY_INS 6077) 52.4222 Tj --14045.3 TJm +0 -66.4531 Td +(KEY_LF 6123) 48.0537 Tj +-14547 TJm (6890 6911 6941 7101) 83.0018 Tj -17.4613 -436.6891 Td -(6077 6119 6141 6165) 83.0018 Tj +17.4613 -75.9465 Td +(6123 6167 6189 6213) 83.0018 Tj -8527.14 TJm (7103 7246 7357 7384) 83.0018 Tj -0 -446.1825 Td -(KEY_LF 6073) 48.0537 Tj --12540.5 TJm -(LPTPORT 6265) 52.4222 Tj -17.4613 -455.6758 Td -(6073 6117 6139 6163) 83.0018 Tj +0 -85.4399 Td +(KEY_PGDN 6126) 56.7907 Tj +-11537.1 TJm +(loadfsgs 0514) 56.7907 Tj +17.4613 -94.9332 Td +(6126 6166 6188 6212) 83.0018 Tj -8527.14 TJm -(6265 6282 6286 6287) 83.0018 Tj -0 -465.1692 Td -(KEY_PGDN 6076) 56.7907 Tj --13543.7 TJm -(6288) 17.4741 Tj -17.4613 -474.6622 Td -(6076 6116 6138 6162) 83.0018 Tj +(0514 1712) 39.3166 Tj +0 -104.4266 Td +(KEY_PGUP 6125) 56.7907 Tj +-11537.1 TJm +(ltr 0479) 34.9481 Tj +17.4613 -113.9199 Td +(6125 6166 6188 6212) 83.0018 Tj +-8527.14 TJm +(0479 0481 1731) 61.1592 Tj +0 -123.4133 Td +(KEY_RT 6124) 48.0537 Tj +-12540.5 TJm +(MAXARGS 6863) 52.4222 Tj +17.4613 -132.9067 Td +(6124 6167 6189 6213) 83.0018 Tj +-8527.14 TJm +(6863 6871 6872 7340) 83.0018 Tj +0 -142.4 Td +(KEY_UP 6121) 48.0537 Tj +-12540.5 TJm +(MAXFILE 3169) 52.4222 Tj +17.4613 -151.8934 Td +(6121 6165 6187 6211) 83.0018 Tj +-8527.14 TJm +(3169 4165 4166) 61.1592 Tj +0 -161.3867 Td +(kfree 2305) 43.6851 Tj +-13042.1 TJm +(memcmp 5311) 48.0537 Tj +17.4613 -170.8801 Td +(0262 1843 1866 2169) 83.0018 Tj +-8527.14 TJm +(0330 5311 5543 5588) 83.0018 Tj +17.4613 -180.3735 Td +(2170 2287 2305 2310) 83.0018 Tj -6520.6 TJm -(lpt_putc 6278) 56.7907 Tj -0 -484.1555 Td -(KEY_PGUP 6075) 56.7907 Tj +(memmove 5327) 52.4222 Tj +17.4613 -189.8668 Td +(5107 5117 5202 5223) 83.0018 Tj +-8527.14 TJm +(0331 1276 1814 1841) 83.0018 Tj +0 -199.3602 Td +(kill 2075) 39.3166 Tj +-15550.3 TJm +(1871 3683 3839 3924) 83.0018 Tj +17.4613 -208.8535 Td +(0305 2075 2650 2933) 83.0018 Tj +-8527.14 TJm +(4121 4171 4329 4331) 83.0018 Tj +17.4613 -218.3469 Td +(6767) 17.4741 Tj +-16052.1 TJm +(5088 5327 6474) 61.1592 Tj +0 -227.8403 Td +(kinit 2277) 43.6851 Tj +-13042.1 TJm +(memset 5304) 48.0537 Tj +17.4613 -237.3336 Td +(0263 1226 2277) 61.1592 Tj +-11035.5 TJm +(0332 1789 1813 1816) 83.0018 Tj +0 -246.827 Td +(ksegment 1703) 56.7907 Tj -13543.7 TJm -(6278 6341) 39.3166 Tj -17.4613 -493.6489 Td -(6075 6116 6138 6162) 83.0018 Tj +(1842 2313 3694 3814) 83.0018 Tj +17.4613 -256.3203 Td +(0309 1219 1257 1703) 83.0018 Tj +-8527.14 TJm +(4784 4959 5061 5075) 83.0018 Tj +0 -265.8137 Td +(KSTACKSIZE 0152) 65.5277 Tj +-12540.3 TJm +(5304 6476 6987 7058) 83.0018 Tj +17.4613 -275.3071 Td +(0152 1283 1284 1730) 83.0018 Tj +-8527.14 TJm +(7069 7085 7106 7119) 83.0018 Tj +17.4613 -284.8004 Td +(1772 1776 1866 2170) 83.0018 Tj -6520.6 TJm -(ltr 0429) 34.9481 Tj +(microdelay 5781) 65.5277 Tj +0 -294.2938 Td +(lapiceoi 5772) 56.7907 Tj +-13543.7 TJm +(0274 5781 5823 5825) 83.0018 Tj +17.4613 -303.7871 Td +(0271 2621 2625 2629) 83.0018 Tj +-8527.14 TJm +(5835) 17.4741 Tj +17.4613 -313.2805 Td +(2633 2639 5772) 61.1592 Tj +-9028.94 TJm +(min 3673) 34.9481 Tj +0 -322.7739 Td +(lapicinit 5701) 61.1592 Tj +-13042 TJm +(3673 4120 4170) 61.1592 Tj +17.4613 -332.2668 Td +(0272 1218 1256 5701) 83.0018 Tj +-6520.6 TJm +(mp 5402) 30.5796 Tj +0 -341.7602 Td +(lapicstartap 5805) 74.2647 Tj +-11537 TJm +(5402 5507 5536 5542) 83.0018 Tj +17.4613 -351.2536 Td +(0273 1286 5805) 61.1592 Tj +-11035.5 TJm +(5543 5544 5555 5560) 83.0018 Tj +0 -360.7469 Td +(lapicw 5690) 48.0537 Tj +-14547 TJm +(5564 5565 5568 5569) 83.0018 Tj +17.4613 -370.2403 Td +(5690 5707 5713 5714) 83.0018 Tj +-8527.14 TJm +(5580 5583 5585 5587) 83.0018 Tj +17.4613 -379.7336 Td +(5715 5718 5719 5724) 83.0018 Tj +-8527.14 TJm +(5594 5604 5610 5642) 83.0018 Tj +17.4613 -389.227 Td +(5727 5730 5731 5734) 83.0018 Tj +-6520.6 TJm +(mpbcpu 5519) 48.0537 Tj +17.4613 -398.7204 Td +(5737 5738 5743 5775) 83.0018 Tj +-8527.14 TJm +(0278 1218 1255 5519) 83.0018 Tj +17.4613 -408.2137 Td +(5821 5822 5824 5833) 83.0018 Tj +-6520.6 TJm +(MPBUS 5452) 43.6851 Tj +17.4613 -417.7071 Td +(5834) 17.4741 Tj +-16052.1 TJm +(5452 5631) 39.3166 Tj +0 -427.2004 Td +(lgdt 0453) 39.3166 Tj +-13543.8 TJm +(mpconf 5413) 48.0537 Tj +17.4613 -436.6938 Td +(0453 0461 0954 1054) 83.0018 Tj +-8527.14 TJm +(5413 5579 5582 5587) 83.0018 Tj +17.4613 -446.1872 Td +(1711) 17.4741 Tj +-16052.1 TJm +(5605) 17.4741 Tj +0 -455.6805 Td +(lidt 0467) 39.3166 Tj +-13543.8 TJm +(mpconfig 5580) 56.7907 Tj +17.4613 -465.1739 Td +(0467 0475 2580) 61.1592 Tj +-11035.5 TJm +(5580 5610) 39.3166 Tj +0 -474.6668 Td +(LINT0 5679) 43.6851 Tj +-13042.1 TJm +(mpinit 5601) 48.0537 Tj +17.4613 -484.1602 Td +(5679 5718) 39.3166 Tj +-13543.8 TJm +(0279 1217 5601 5637) 83.0018 Tj +0 -493.6536 Td +(LINT1 5680) 43.6851 Tj +-15048.7 TJm +(5638) 17.4741 Tj Q Q Q @@ -2633,6 +2640,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -2650,207 +2659,207 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 7) 187.8461 Tj -17.4613 -28.4801 Td -(0429 0431 1701) 61.1592 Tj --11035.5 TJm -(5638) 17.4741 Tj -0 -37.9735 Td -(MAXARGS 6863) 52.4222 Tj --12038.8 TJm -(mp_search 5556) 61.1592 Tj -17.4613 -47.4664 Td -(6863 6871 6872 7340) 83.0018 Tj --8527.14 TJm -(5556 5585) 39.3166 Tj -0 -56.9598 Td -(MAXFILE 3170) 52.4222 Tj --12038.8 TJm -(mp_search1 5537) 65.5277 Tj -17.4613 -66.4531 Td -(3170 4165 4166) 61.1592 Tj --11035.5 TJm -(5537 5564 5568 5571) 83.0018 Tj -0 -75.9465 Td -(memcmp 5315) 48.0537 Tj --12540.5 TJm -(NADDRS 3166) 48.0537 Tj -17.4613 -85.4399 Td -(0320 5315 5543 5588) 83.0018 Tj --8527.14 TJm -(3166 3179 3263) 61.1592 Tj -0 -94.9332 Td -(memmove 5331) 52.4222 Tj --12038.8 TJm -(namecmp 4203) 52.4222 Tj -17.4613 -104.4266 Td -(0321 1276 1660 1727) 83.0018 Tj --8527.14 TJm -(0244 4203 4228 4765) 83.0018 Tj -17.4613 -113.9199 Td -(1737 1780 3684 3874) 83.0018 Tj --6520.6 TJm -(namei 4389) 43.6851 Tj -17.4613 -123.4133 Td -(3989 4121 4171 4328) 83.0018 Tj --8527.14 TJm -(0245 1765 4389 4670) 83.0018 Tj -17.4613 -132.9067 Td -(4330 5080 5331 6320) 83.0018 Tj --8527.14 TJm -(4865 4935 5018) 61.1592 Tj -0 -142.4 Td -(memset 5303) 48.0537 Tj --12540.5 TJm -(nameiparent 4396) 69.8962 Tj -17.4613 -151.8934 Td -(0322 1217 1661 1746) 83.0018 Tj --8527.14 TJm -(0246 4396 4681 4760) 83.0018 Tj -17.4613 -161.3867 Td -(1766 2263 3695 3964) 83.0018 Tj --8527.14 TJm -(4807) 17.4741 Tj -17.4613 -170.8801 Td -(4784 4959 5055 5067) 83.0018 Tj --6520.6 TJm -(NBUF 0156) 39.3166 Tj -17.4613 -180.3735 Td -(5303 6322 6987 7058) 83.0018 Tj --8527.14 TJm -(0156 3529 3553) 61.1592 Tj -17.4613 -189.8668 Td -(7069 7085 7106 7119) 83.0018 Tj --6520.6 TJm -(NCPU 0153) 39.3166 Tj -0 -199.3602 Td -(microdelay 5781) 65.5277 Tj --12540.3 TJm -(0153 1568 5512) 61.1592 Tj -17.4613 -208.8535 Td -(5781 5823 5825 5835) 83.0018 Tj --6520.6 TJm -(NDEV 0158) 39.3166 Tj -0 -218.3469 Td -(min 3674) 34.9481 Tj --16052 TJm -(0158 4108 4158 4407) 83.0018 Tj -17.4613 -227.8403 Td -(3674 4120 4170) 61.1592 Tj --9028.94 TJm -(NDIRECT 3167) 52.4222 Tj -0 -237.3336 Td -(mp 5402) 30.5796 Tj -174.613 -237.3336 Td -(3166 3167 3170 4015) 83.0018 Tj -17.461 -246.827 Td -(5402 5507 5536 5542) 83.0018 Tj --8527.14 TJm -(4023 4058) 39.3166 Tj -17.461 -256.3203 Td -(5543 5544 5555 5560) 83.0018 Tj --6520.6 TJm -(NELEM 0346) 43.6851 Tj -17.461 -265.8137 Td -(5564 5565 5568 5569) 83.0018 Tj --8527.14 TJm -(0346 2123 2779 4961) 83.0018 Tj -17.461 -275.3071 Td -(5580 5583 5585 5587) 83.0018 Tj --6520.6 TJm -(NFILE 0155) 43.6851 Tj -17.461 -284.8004 Td -(5594 5604 5610 5642) 83.0018 Tj --8527.14 TJm -(0155 4409 4424) 61.1592 Tj --0.0003 -294.2938 Td -(MPBUS 5452) 43.6851 Tj --13042.1 TJm -(NINDIRECT 3169) 61.1592 Tj -17.461 -303.7871 Td -(5452 5631) 39.3166 Tj --13543.8 TJm -(3169 3170 4025 4068) 83.0018 Tj --0.0003 -313.2805 Td -(mpconf 5413) 48.0537 Tj --12540.5 TJm -(NINODE 0157) 48.0537 Tj -17.461 -322.7739 Td -(5413 5579 5582 5587) 83.0018 Tj --8527.14 TJm -(0157 3785 3811) 61.1592 Tj -17.461 -332.2672 Td -(5605) 17.4741 Tj --14045.6 TJm -(NO 6056) 30.5796 Tj --0.0003 -341.7606 Td +(Aug 8 01:04 2009 cross-references Page 7) 187.8461 Tj +0 -28.4801 Td (mpioapic 5439) 56.7907 Tj --13543.7 TJm -(6056 6102 6105 6107) 83.0018 Tj -17.461 -351.2539 Td +-11537.1 TJm +(NINDIRECT 3168) 61.1592 Tj +17.4613 -37.9735 Td (5439 5607 5627 5629) 83.0018 Tj -8527.14 TJm -(6108 6109 6110 6112) 83.0018 Tj --0.0003 -360.7473 Td +(3168 3169 4022 4070) 83.0018 Tj +0 -47.4664 Td +(MPIOAPIC 5453) 56.7907 Tj +-11537.1 TJm +(NINODE 0157) 48.0537 Tj +17.4613 -56.9598 Td +(5453 5626) 39.3166 Tj +-13543.8 TJm +(0157 3785 3861) 61.1592 Tj +0 -66.4531 Td (MPIOINTR 5454) 56.7907 Tj --13543.7 TJm -(6124 6127 6129 6130) 83.0018 Tj -17.461 -370.2407 Td +-11537.1 TJm +(NO 6106) 30.5796 Tj +17.4613 -75.9465 Td (5454 5632) 39.3166 Tj -13543.8 TJm -(6131 6132 6134 6152) 83.0018 Tj --0.0003 -379.734 Td +(6106 6152 6155 6157) 83.0018 Tj +0 -85.4399 Td (MPLINTR 5455) 52.4222 Tj -14045.3 TJm -(6153 6155 6156 6157) 83.0018 Tj -17.461 -389.2274 Td +(6158 6159 6160 6162) 83.0018 Tj +17.4613 -94.9332 Td (5455 5633) 39.3166 Tj -13543.8 TJm -(6158) 17.4741 Tj --0.0003 -398.7207 Td +(6174 6177 6179 6180) 83.0018 Tj +0 -104.4266 Td (mpmain 1253) 48.0537 Tj --12540.5 TJm -(NOFILE 0154) 48.0537 Tj -17.461 -408.2141 Td -(1208 1239 1253 1255) 83.0018 Tj +-14547 TJm +(6181 6182 6184 6202) 83.0018 Tj +17.4613 -113.9199 Td +(1211 1239 1253 1258) 83.0018 Tj -8527.14 TJm -(0154 1538 1739 2013) 83.0018 Tj -17.461 -417.7075 Td +(6203 6205 6206 6207) 83.0018 Tj +17.4613 -123.4133 Td (1285) 17.4741 Tj -16052.1 TJm -(4571 4587) 39.3166 Tj --0.0003 -427.2008 Td +(6208) 17.4741 Tj +0 -132.9067 Td (mpproc 5428) 48.0537 Tj -12540.5 TJm -(NPROC 0150) 43.6851 Tj -17.461 -436.6942 Td +(NOFILE 0154) 48.0537 Tj +17.4613 -142.4 Td (5428 5606 5619 5624) 83.0018 Tj -8527.14 TJm -(0150 1610 1633 1821) 83.0018 Tj --0.0003 -446.1875 Td -(mp_bcpu 5519) 52.4222 Tj --14045.3 TJm -(1957 1981 2029 2062) 83.0018 Tj -17.461 -455.6809 Td -(0277 1220 1257 5519) 83.0018 Tj --8527.14 TJm -(2119) 17.4741 Tj --0.0003 -465.1743 Td -(mp_config 5580) 61.1592 Tj --11035.5 TJm -(NSEGS 1506) 43.6851 Tj -17.461 -474.6672 Td -(5580 5610) 39.3166 Tj +(0154 1540 1878 2113) 83.0018 Tj +0 -151.8934 Td +(MPPROC 5451) 48.0537 Tj +-14547 TJm +(4570 4586) 39.3166 Tj +17.4613 -161.3867 Td +(5451 5618) 39.3166 Tj +-11537.3 TJm +(NPROC 0150) 43.6851 Tj +0 -170.8801 Td +(mpsearch 5556) 56.7907 Tj +-13543.7 TJm +(0150 1610 1669 1760) 83.0018 Tj +17.4613 -180.3735 Td +(5556 5585) 39.3166 Tj -13543.8 TJm -(1506 1562) 39.3166 Tj --0.0003 -484.1606 Td -(mp_init 5601) 52.4222 Tj --12038.8 TJm +(1918 2057 2080 2129) 83.0018 Tj +0 -189.8664 Td +(mpsearch1 5537) 61.1592 Tj +-13042 TJm +(2162) 17.4741 Tj +17.4613 -199.3598 Td +(5537 5564 5568 5571) 83.0018 Tj +-6520.6 TJm +(NSEGS 1508) 43.6851 Tj +0 -208.8532 Td +(namecmp 4203) 52.4222 Tj +-14045.3 TJm +(1508 1561) 39.3166 Tj +17.4613 -218.3465 Td +(0244 4203 4228 4765) 83.0018 Tj +-6520.6 TJm (nulterminate 7352) 74.2647 Tj -17.461 -493.654 Td -(0278 1219 5601 5637) 83.0018 Tj --8527.14 TJm +0 -227.8399 Td +(namei 4389) 43.6851 Tj +-15048.7 TJm (7215 7230 7352 7373) 83.0018 Tj +17.4613 -237.3332 Td +(0245 1826 4389 4670) 83.0018 Tj +-8527.14 TJm +(7379 7380 7385 7386) 83.0018 Tj +17.4613 -246.8266 Td +(4865 4935 5021) 61.1592 Tj +-11035.5 TJm +(7391) 17.4741 Tj +0 -256.32 Td +(nameiparent 4396) 69.8962 Tj +-10032.1 TJm +(NUMLOCK 6113) 52.4222 Tj +17.4613 -265.8133 Td +(0246 4354 4369 4381) 83.0018 Tj +-8527.14 TJm +(6113 6146) 39.3166 Tj +17.4613 -275.3067 Td +(4396 4681 4760 4807) 83.0018 Tj +-6520.6 TJm +(O_CREATE 3053) 56.7907 Tj +0 -284.8 Td +(namex 4354) 43.6851 Tj +-15048.7 TJm +(3053 4861 7278 7281) 83.0018 Tj +17.4613 -294.2934 Td +(4354 4392 4398) 61.1592 Tj +-9028.94 TJm +(O_RDONLY 3050) 56.7907 Tj +0 -303.7868 Td +(NBUF 0156) 39.3166 Tj +-15550.3 TJm +(3050 4868 7275) 61.1592 Tj +17.4613 -313.2801 Td +(0156 3531 3553) 61.1592 Tj +-9028.94 TJm +(O_RDWR 3052) 48.0537 Tj +0 -322.7735 Td +(ncpu 5515) 39.3166 Tj +-15550.3 TJm +(3052 4886 6814 6816) 83.0018 Tj +17.4613 -332.2664 Td +(1224 1278 1569 3357) 83.0018 Tj +-8527.14 TJm +(7007) 17.4741 Tj +17.4613 -341.7598 Td +(5515 5609 5620 5622) 83.0018 Tj +-6520.6 TJm +(outb 0421) 39.3166 Tj +17.4613 -351.2532 Td +(5623) 17.4741 Tj +-16052.1 TJm +(0421 0933 0941 1164) 83.0018 Tj +0 -360.7465 Td +(NCPU 0153) 39.3166 Tj +-15550.3 TJm +(1165 1166 1167 1168) 83.0018 Tj +17.4613 -370.2399 Td +(0153 1568 5512) 61.1592 Tj +-11035.5 TJm +(1169 3361 3370 3381) 83.0018 Tj +0 -379.7332 Td +(NDEV 0158) 39.3166 Tj +-15550.3 TJm +(3382 3383 3384 3385) 83.0018 Tj +17.4613 -389.2266 Td +(0158 4108 4158 4406) 83.0018 Tj +-8527.14 TJm +(3386 3388 3391 5645) 83.0018 Tj +0 -398.72 Td +(NDIRECT 3167) 52.4222 Tj +-14045.3 TJm +(5646 5813 5814 5970) 83.0018 Tj +17.4613 -408.2133 Td +(3167 3169 3178 3274) 83.0018 Tj +-8527.14 TJm +(5971 5985 5986 5994) 83.0018 Tj +17.4613 -417.7067 Td +(4015 4020 4024 4025) 83.0018 Tj +-8527.14 TJm +(5997 6002 6012 6015) 83.0018 Tj +17.4613 -427.2 Td +(4060 4067 4068 4075) 83.0018 Tj +-8527.14 TJm +(6016 6017 6020 6026) 83.0018 Tj +17.4613 -436.6934 Td +(4076) 17.4741 Tj +-16052.1 TJm +(6027 6029 6030 6460) 83.0018 Tj +0 -446.1868 Td +(NELEM 0362) 43.6851 Tj +-15048.7 TJm +(6462 6479 6480 6481) 83.0018 Tj +17.4613 -455.6801 Td +(0362 1672 2879 4961) 83.0018 Tj +-8527.14 TJm +(6482 6677 6678 6679) 83.0018 Tj +0 -465.1735 Td +(nextpid 1615) 52.4222 Tj +-12038.8 TJm +(outsl 0433) 43.6851 Tj +17.4613 -474.6665 Td +(1615 1768) 39.3166 Tj +-13543.8 TJm +(0433 0435 3389) 61.1592 Tj +0 -484.1598 Td +(NFILE 0155) 43.6851 Tj +-13042.1 TJm +(outw 0427) 39.3166 Tj +17.4613 -493.6532 Td +(0155 4409 4425) 61.1592 Tj +-11035.5 TJm +(0427 0982 0984 1082) 83.0018 Tj Q Q q @@ -2867,207 +2876,207 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 8) 187.8461 Tj +(Aug 8 01:04 2009 cross-references Page 8) 187.8461 Tj 17.4613 -28.4801 Td -(7379 7380 7385 7386) 83.0018 Tj --8527.14 TJm -(6901 6920 6953 7032) 83.0018 Tj -17.4613 -37.9735 Td -(7391) 17.4741 Tj --16052.1 TJm -(7045 7228 7272 7306) 83.0018 Tj -0 -47.4664 Td -(NUMLOCK 6063) 52.4222 Tj --14045.3 TJm -(7310 7336 7341) 61.1592 Tj -17.4613 -56.9598 Td -(6063 6096) 39.3166 Tj --11537.3 TJm -(parseblock 7301) 65.5277 Tj -0 -66.4531 Td -(outb 0371) 39.3166 Tj --15550.3 TJm -(7301 7306 7325) 61.1592 Tj -17.4613 -75.9465 Td -(0371 0933 0941 1164) 83.0018 Tj --6520.6 TJm -(parsecmd 7218) 56.7907 Tj -17.4613 -85.4399 Td -(1165 1166 1167 1168) 83.0018 Tj --8527.14 TJm -(6902 7025 7218) 61.1592 Tj -17.4613 -94.9332 Td -(1169 3361 3370 3381) 83.0018 Tj --6520.6 TJm -(parseexec 7317) 61.1592 Tj -17.4613 -104.4266 Td -(3382 3383 3384 3385) 83.0018 Tj --8527.14 TJm -(7214 7255 7317) 61.1592 Tj -17.4613 -113.9199 Td -(3386 3388 3391 5645) 83.0018 Tj --6520.6 TJm -(parseline 7235) 61.1592 Tj -17.4613 -123.4133 Td -(5646 5813 5814 5970) 83.0018 Tj --8527.14 TJm -(7212 7224 7235 7246) 83.0018 Tj -17.4613 -132.9067 Td -(5971 5985 5986 5994) 83.0018 Tj --8527.14 TJm -(7308) 17.4741 Tj -17.4613 -142.4 Td -(5997 6002 6012 6015) 83.0018 Tj --6520.6 TJm -(parsepipe 7251) 61.1592 Tj -17.4613 -151.8934 Td -(6016 6017 6020 6026) 83.0018 Tj --8527.14 TJm -(7213 7239 7251 7258) 83.0018 Tj -17.4613 -161.3867 Td -(6027 6029 6030 6286) 83.0018 Tj --6520.6 TJm -(parseredirs 7264) 69.8962 Tj -17.4613 -170.8801 Td -(6287 6288 6306 6308) 83.0018 Tj --8527.14 TJm -(7264 7312 7331 7342) 83.0018 Tj -17.4613 -180.3735 Td -(6325 6326 6327 6328) 83.0018 Tj --6520.6 TJm -(PCINT 5678) 43.6851 Tj -17.4613 -189.8668 Td -(6627 6628 6629) 61.1592 Tj --11035.5 TJm -(5678 5724) 39.3166 Tj -0 -199.3602 Td -(outsl 0383) 43.6851 Tj --13042.1 TJm -(peek 7201) 39.3166 Tj -17.4613 -208.8535 Td -(0383 3389) 39.3166 Tj --13543.8 TJm -(7201 7225 7240 7244) 83.0018 Tj -0 -218.3469 Td -(outw 0377) 39.3166 Tj --15550.3 TJm -(7256 7269 7305 7309) 83.0018 Tj -17.4613 -227.8403 Td -(0377 1143 1144) 61.1592 Tj --11035.5 TJm -(7324 7332) 39.3166 Tj -0 -237.3336 Td -(O_CREATE 3003) 56.7907 Tj --11537.1 TJm -(pic_enable 5975) 65.5277 Tj -17.4613 -246.827 Td -(3003 4861 7278 7281) 83.0018 Tj --8527.14 TJm -(0282 3356 5975 6560) 83.0018 Tj -0 -256.3203 Td -(O_RDONLY 3000) 56.7907 Tj +(1084) 17.4741 Tj +-14045.6 TJm +(picsetmask 5967) 65.5277 Tj +0 -37.9735 Td +(O_WRONLY 3051) 56.7907 Tj -13543.7 TJm -(6630) 17.4741 Tj -17.4613 -265.8137 Td -(3000 7275) 39.3166 Tj --11537.3 TJm -(pic_init 5982) 56.7907 Tj -0 -275.3071 Td -(O_RDWR 3002) 48.0537 Tj --14547 TJm -(0283 1225 5982) 61.1592 Tj -17.4613 -284.8004 Td -(3002 4868 4886 6764) 83.0018 Tj --6520.6 TJm -(pic_setmask 5967) 69.8962 Tj -17.4613 -294.2938 Td -(6766 7007) 39.3166 Tj --13543.8 TJm (5967 5977 6033) 61.1592 Tj -0 -303.7871 Td -(O_WRONLY 3001) 56.7907 Tj --11537.1 TJm -(pinit 1618) 43.6851 Tj -17.4613 -313.2805 Td -(3001 4868 4885 4886) 83.0018 Tj --8527.14 TJm -(0297 1223 1618) 61.1592 Tj -17.4613 -322.7739 Td -(7278 7281) 39.3166 Tj --11537.3 TJm -(pipe 5160) 39.3166 Tj -0 -332.2668 Td +17.4613 -47.4664 Td +(3051 4885 4886 7278) 83.0018 Tj +-6520.6 TJm +(pinit 1620) 43.6851 Tj +17.4613 -56.9598 Td +(7281) 17.4741 Tj +-16052.1 TJm +(0306 1227 1620) 61.1592 Tj +0 -66.4531 Td (PAGE 0151) 39.3166 Tj --15550.3 TJm -(0204 0287 0288 0289) 83.0018 Tj -17.4613 -341.7602 Td -(0151 0152 1763 2233) 83.0018 Tj +-13543.8 TJm +(pipe 5160) 39.3166 Tj +17.4613 -75.9465 Td +(0151 0152 1811 2284) 83.0018 Tj -8527.14 TJm -(3105 4469 4509 4529) 83.0018 Tj -17.4613 -351.2536 Td -(2235 2236 2259 2309) 83.0018 Tj +(0204 0288 0289 0290) 83.0018 Tj +17.4613 -85.4399 Td +(2285 2309 2359 5054) 83.0018 Tj +-8527.14 TJm +(3255 4469 4509 4529) 83.0018 Tj +17.4613 -94.9332 Td +(5057 5178 5202 5223) 83.0018 Tj -8527.14 TJm (5160 5172 5178 5184) 83.0018 Tj -17.4613 -360.7469 Td -(5049 5051 5178 5202) 83.0018 Tj +0 -104.4266 Td +(panic 6401 7032) 65.5277 Tj +-12540.3 TJm +(5188 5192 5211 5230) 83.0018 Tj +17.4613 -113.9199 Td +(0219 1377 1405 1469) 83.0018 Tj -8527.14 TJm -(5188 5192 5215 5251) 83.0018 Tj -17.4613 -370.2403 Td -(5228) 17.4741 Tj --16052.1 TJm -(5273 6813 6952 6953) 83.0018 Tj -0 -379.7336 Td -(panic 6565 7032) 65.5277 Tj --10533.8 TJm -(pipealloc 5170) 61.1592 Tj -17.4613 -389.227 Td -(0219 1379 1405 1469) 83.0018 Tj --8527.14 TJm -(0286 4984 5170) 61.1592 Tj -17.4613 -398.7204 Td -(1471 1856 1858 1860) 83.0018 Tj +(5251 6763 6952 6953) 83.0018 Tj +17.4613 -123.4133 Td +(1471 1958 1960 1962) 83.0018 Tj -6520.6 TJm -(pipeclose 5215) 61.1592 Tj -17.4613 -408.2137 Td -(1862 1906 1909 2010) 83.0018 Tj +(PIPE 6859) 39.3166 Tj +17.4613 -132.9067 Td +(1964 2006 2009 2110) 83.0018 Tj -8527.14 TJm -(0287 4469 5215) 61.1592 Tj -17.4613 -417.7071 Td -(2041 2260 2271 2310) 83.0018 Tj +(6859 6950 7086 7377) 83.0018 Tj +17.4613 -142.4 Td +(2140 2310 2321 2360) 83.0018 Tj +-6520.6 TJm +(pipealloc 5170) 61.1592 Tj +17.4613 -151.8934 Td +(2647 3378 3459 3461) 83.0018 Tj +-8527.14 TJm +(0287 4984 5170) 61.1592 Tj +17.4613 -161.3867 Td +(3463 3596 3617 3627) 83.0018 Tj +-6520.6 TJm +(pipeclose 5211) 61.1592 Tj +17.4613 -170.8801 Td +(3725 3743 3822 3873) 83.0018 Tj +-8527.14 TJm +(0288 4469 5211) 61.1592 Tj +17.4613 -180.3735 Td +(3908 3928 3937 3958) 83.0018 Tj -6520.6 TJm (pipecmd 6884 7080) 74.2647 Tj -17.4613 -427.2004 Td -(2575 3378 3459 3461) 83.0018 Tj +17.4613 -189.8668 Td +(4036 4219 4267 4275) 83.0018 Tj -8527.14 TJm (6884 6912 6951 7080) 83.0018 Tj -17.4613 -436.6938 Td -(3463 3596 3617 3627) 83.0018 Tj +17.4613 -199.3602 Td +(4442 4458 4517 4537) 83.0018 Tj -8527.14 TJm (7082 7258 7358 7378) 83.0018 Tj -17.4613 -446.1872 Td -(3725 3743 3823 3858) 83.0018 Tj +17.4613 -208.8535 Td +(4709 4777 4786 4821) 83.0018 Tj -6520.6 TJm -(piperead 5273) 56.7907 Tj -17.4613 -455.6805 Td -(3878 3887 3908 3972) 83.0018 Tj +(piperead 5251) 56.7907 Tj +17.4613 -218.3469 Td +(4834 4838 5638 6401) 83.0018 Tj -8527.14 TJm -(0288 4509 5273) 61.1592 Tj -17.4613 -465.1739 Td -(4047 4219 4267 4275) 83.0018 Tj +(0289 4509 5251) 61.1592 Tj +17.4613 -227.8403 Td +(6408 6901 6920 6953) 83.0018 Tj -6520.6 TJm (PIPESIZE 5158) 56.7907 Tj -17.4613 -474.6672 Td -(4442 4458 4473 4517) 83.0018 Tj +17.4613 -237.3336 Td +(7032 7045 7228 7272) 83.0018 Tj -8527.14 TJm -(5158 5166 5257 5265) 83.0018 Tj -17.4613 -484.1606 Td -(4537 4709 4777 4786) 83.0018 Tj +(5158 5162 5236 5244) 83.0018 Tj +17.4613 -246.827 Td +(7306 7310 7336 7341) 83.0018 Tj -8527.14 TJm -(5288) 17.4741 Tj -17.4613 -493.654 Td -(4843 5638 6565 6572) 83.0018 Tj +(5266) 17.4741 Tj +0 -256.3203 Td +(panicked 6316) 56.7907 Tj +-11537.1 TJm +(pipewrite 5230) 61.1592 Tj +17.4613 -265.8137 Td +(6316 6414 6489) 61.1592 Tj +-11035.5 TJm +(0290 4529 5230) 61.1592 Tj +0 -275.3071 Td +(parseblock 7301) 65.5277 Tj +-10533.8 TJm +(popcli 1466) 48.0537 Tj +17.4613 -284.8004 Td +(7301 7306 7325) 61.1592 Tj +-11035.5 TJm +(0327 1421 1466 1469) 83.0018 Tj +0 -294.2938 Td +(parsecmd 7218) 56.7907 Tj +-13543.7 TJm +(1471 1732) 39.3166 Tj +17.4613 -303.7871 Td +(6902 7025 7218) 61.1592 Tj +-9028.94 TJm +(printint 6324) 56.7907 Tj +0 -313.2805 Td +(parseexec 7317) 61.1592 Tj +-13042 TJm +(6324 6374 6378) 61.1592 Tj +17.4613 -322.7739 Td +(7214 7255 7317) 61.1592 Tj +-9028.94 TJm +(proc 1529) 39.3166 Tj +0 -332.2668 Td +(parseline 7235) 61.1592 Tj +-13042 TJm +(0205 0301 0342 0343) 83.0018 Tj +17.4613 -341.7602 Td +(7212 7224 7235 7246) 83.0018 Tj +-8527.14 TJm +(1204 1208 1357 1529) 83.0018 Tj +17.4613 -351.2536 Td +(7308) 17.4741 Tj +-16052.1 TJm +(1535 1578 1605 1610) 83.0018 Tj +0 -360.7469 Td +(parsepipe 7251) 61.1592 Tj +-13042 TJm +(1613 1665 1669 1753) 83.0018 Tj +17.4613 -370.2403 Td +(7213 7239 7251 7258) 83.0018 Tj +-8527.14 TJm +(1756 1760 1804 1857) 83.0018 Tj +0 -379.7336 Td +(parseredirs 7264) 69.8962 Tj +-12038.7 TJm +(1910 1918 2055 2057) 83.0018 Tj +17.4613 -389.227 Td +(7264 7312 7331 7342) 83.0018 Tj +-8527.14 TJm +(2077 2080 2106 2129) 83.0018 Tj +0 -398.7204 Td +(PCINT 5678) 43.6851 Tj +-15048.7 TJm +(2155 2162 2554 2650) 83.0018 Tj +17.4613 -408.2137 Td +(5678 5724) 39.3166 Tj +-13543.8 TJm +(2754 2766 2778 2905) 83.0018 Tj +0 -417.7071 Td +(peek 7201) 39.3166 Tj +-15550.3 TJm +(3306 3667 4555 5003) 83.0018 Tj +17.4613 -427.2004 Td +(7201 7225 7240 7244) 83.0018 Tj +-8527.14 TJm +(5154 5510 5606 5619) 83.0018 Tj +17.4613 -436.6938 Td +(7256 7269 7305 7309) 83.0018 Tj +-8527.14 TJm +(5620 5621 6311) 61.1592 Tj +17.4613 -446.1872 Td +(7324 7332) 39.3166 Tj +-11537.3 TJm +(procdump 1654) 56.7907 Tj +0 -455.6805 Td +(picenable 5975) 61.1592 Tj +-13042 TJm +(0307 1654 6520) 61.1592 Tj +17.4613 -465.1739 Td +(0283 3356 5975 6625) 83.0018 Tj -6520.6 TJm -(pipewrite 5251) 61.1592 Tj +(proghdr 0874) 52.4222 Tj +17.4613 -474.6672 Td +(6680) 17.4741 Tj +-16052.1 TJm +(0874 1119 1133 5016) 83.0018 Tj +0 -484.1606 Td +(picinit 5982) 52.4222 Tj +-12038.8 TJm +(pushcli 1455) 52.4222 Tj +17.4613 -493.654 Td +(0284 1220 5982) 61.1592 Tj +-11035.5 TJm +(0326 1375 1455 1724) 83.0018 Tj Q Q Q @@ -3096,6 +3105,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -3113,207 +3124,207 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 9) 187.8461 Tj -17.4613 -28.4801 Td -(0289 4529 5251) 61.1592 Tj --11035.5 TJm -(5758) 17.4741 Tj -0 -37.9735 Td -(popcli 1466) 48.0537 Tj --12540.5 TJm -(REDIR 6858) 43.6851 Tj -17.4613 -47.4664 Td -(0317 1417 1466 1469) 83.0018 Tj --8527.14 TJm -(6858 6930 7070 7371) 83.0018 Tj -17.4613 -56.9598 Td -(1471 1702 1795) 61.1592 Tj --9028.94 TJm -(redircmd 6875 7064) 78.6333 Tj -0 -66.4531 Td -(printint 6351) 56.7907 Tj --13543.7 TJm -(6875 6913 6931 7064) 83.0018 Tj -17.4613 -75.9465 Td -(6351 6403 6407) 61.1592 Tj --11035.5 TJm -(7066 7275 7278 7281) 83.0018 Tj -0 -85.4399 Td -(proc 1529) 39.3166 Tj --15550.3 TJm -(7359 7372) 39.3166 Tj -17.4613 -94.9332 Td -(0205 0292 0293 0300) 83.0018 Tj --6520.6 TJm -(REG_ID 5860) 48.0537 Tj -17.4613 -104.4266 Td -(0332 0333 1204 1357) 83.0018 Tj --8527.14 TJm -(5860 5910) 39.3166 Tj -17.4613 -113.9199 Td -(1529 1535 1559 1605) 83.0018 Tj --6520.6 TJm -(REG_TABLE 5862) 61.1592 Tj -17.4613 -123.4133 Td -(1610 1611 1626 1630) 83.0018 Tj --8527.14 TJm -(5862 5917 5918 5931) 83.0018 Tj -17.4613 -132.9067 Td -(1634 1672 1708 1709) 83.0018 Tj --8527.14 TJm -(5932) 17.4741 Tj -17.4613 -142.4 Td -(1712 1759 1788 1791) 83.0018 Tj --6520.6 TJm -(REG_VER 5861) 52.4222 Tj -17.4613 -151.8934 Td -(1810 1822 1955 1957) 83.0018 Tj --8527.14 TJm -(5861 5909) 39.3166 Tj -17.4613 -161.3867 Td -(1978 1981 2006 2029) 83.0018 Tj --6520.6 TJm -(release 1402) 52.4222 Tj -17.4613 -170.8801 Td -(2055 2063 2115 2120) 83.0018 Tj --8527.14 TJm -(0315 1402 1405 1638) 83.0018 Tj -17.4613 -180.3735 Td -(2504 2578 2654 2666) 83.0018 Tj --8527.14 TJm -(1642 1839 1874 1883) 83.0018 Tj -17.4613 -189.8668 Td -(2678 2804 2810 3306) 83.0018 Tj --8527.14 TJm -(1919 1932 1969 1987) 83.0018 Tj -17.4613 -199.3602 Td -(3667 4555 5003 5154) 83.0018 Tj --8527.14 TJm -(1991 2076 2085 2293) 83.0018 Tj -17.4613 -208.8535 Td -(5510 5606 5619 5620) 83.0018 Tj --8527.14 TJm -(2316 2322 2326 2552) 83.0018 Tj -17.4613 -218.3469 Td -(5621 6261) 39.3166 Tj --13543.8 TJm -(2874 2879 3408 3425) 83.0018 Tj -0 -227.8403 Td -(procdump 2104) 56.7907 Tj --13543.7 TJm -(3482 3581 3592 3641) 83.0018 Tj -17.4613 -237.3336 Td -(0298 2104 6470) 61.1592 Tj --11035.5 TJm -(3814 3830 3842 3864) 83.0018 Tj -0 -246.827 Td -(proc_table_lock 1608) 87.3703 Tj --10032 TJm -(3892 3910 3919 4428) 83.0018 Tj -17.4613 -256.3203 Td -(1608 1620 1632 1638) 83.0018 Tj --8527.14 TJm -(4432 4444 4460 4466) 83.0018 Tj -17.4613 -265.8137 Td -(1642 1820 1839 1859) 83.0018 Tj --8527.14 TJm -(5225 5259 5268 5280) 83.0018 Tj -17.4613 -275.3071 Td -(1860 1871 1874 1883) 83.0018 Tj --8527.14 TJm -(5291 6431 6443 6497) 83.0018 Tj -17.4613 -284.8004 Td -(1917 1918 1931 1932) 83.0018 Tj --8527.14 TJm -(6512 6532) 39.3166 Tj -17.4613 -294.2938 Td -(1967 1969 1980 1987) 83.0018 Tj --6520.6 TJm -(ROOTDEV 0159) 52.4222 Tj -17.4613 -303.7871 Td -(1991 2023 2058 2076) 83.0018 Tj --8527.14 TJm -(0159 4359) 39.3166 Tj -17.4613 -313.2805 Td -(2085 2090) 39.3166 Tj --11537.3 TJm -(run 2214) 34.9481 Tj -0 -322.7739 Td -(proghdr 0824) 52.4222 Tj --14045.3 TJm -(2111 2214 2215 2218) 83.0018 Tj -17.4613 -332.2668 Td -(0824 1119 1132 5016) 83.0018 Tj --8527.14 TJm -(2257 2266 2267 2269) 83.0018 Tj -0 -341.7602 Td -(pushcli 1455) 52.4222 Tj --14045.3 TJm -(2307) 17.4741 Tj -17.4613 -351.2536 Td -(0316 1377 1455 1676) 83.0018 Tj --6520.6 TJm -(runcmd 6906) 48.0537 Tj -17.4613 -360.7469 Td -(1793) 17.4741 Tj --16052.1 TJm -(6906 6920 6937 6943) 83.0018 Tj -0 -370.2403 Td -(readi 4102) 43.6851 Tj --15048.7 TJm +(Aug 8 01:04 2009 cross-references Page 9) 187.8461 Tj +0 -28.4801 Td +(readeflags 0485) 65.5277 Tj +-12540.3 TJm (6945 6959 6966 6977) 83.0018 Tj -17.4613 -379.7336 Td -(0247 4102 4266 4512) 83.0018 Tj +17.4613 -37.9735 Td +(0485 1459 1468 1963) 83.0018 Tj -8527.14 TJm (7025) 17.4741 Tj -17.4613 -389.227 Td -(4708 4709 5027 5032) 83.0018 Tj --6520.6 TJm +17.4613 -47.4664 Td +(5758) 17.4741 Tj +-14045.6 TJm (RUNNING 1526) 52.4222 Tj -17.4613 -398.7204 Td -(5059 5065) 39.3166 Tj --13543.8 TJm -(1526 1831 1857 2111) 83.0018 Tj -0 -408.2137 Td -(readsb 3679) 48.0537 Tj --14547 TJm -(2591) 17.4741 Tj -17.4613 -417.7071 Td -(3679 3711 3738 3959) 83.0018 Tj +0 -56.9598 Td +(readi 4102) 43.6851 Tj +-15048.7 TJm +(1526 1661 1927 1961) 83.0018 Tj +17.4613 -66.4531 Td +(0247 4102 4266 4512) 83.0018 Tj +-8527.14 TJm +(2663) 17.4741 Tj +17.4613 -75.9461 Td +(4708 4709 5026 5034) 83.0018 Tj -6520.6 TJm (safestrcpy 5375) 65.5277 Tj -0 -427.2004 Td +17.4613 -85.4391 Td +(5065 5073) 39.3166 Tj +-13543.8 TJm +(0333 1825 5104 5375) 83.0018 Tj +0 -94.9324 Td +(readsb 3678) 48.0537 Tj +-12540.5 TJm +(sched 1953) 43.6851 Tj +17.4613 -104.4258 Td +(3678 3711 3738 3809) 83.0018 Tj +-8527.14 TJm +(1953 1958 1960 1962) 83.0018 Tj +0 -113.9192 Td (readsect 1160) 56.7907 Tj -13543.7 TJm -(0323 1781 5097 5375) 83.0018 Tj -17.4613 -436.6938 Td +(1964 1977 2025 2139) 83.0018 Tj +17.4613 -123.4125 Td (1160 1195) 39.3166 Tj -11537.3 TJm -(sched 1853) 43.6851 Tj -0 -446.1872 Td +(scheduler 1908) 61.1592 Tj +0 -132.9059 Td (readseg 1179) 52.4222 Tj -14045.3 TJm -(1853 1856 1858 1860) 83.0018 Tj -17.4613 -455.6805 Td -(1113 1125 1135 1179) 83.0018 Tj +(0308 1263 1908) 61.1592 Tj +17.4613 -142.3992 Td +(1113 1126 1137 1179) 83.0018 Tj +-6520.6 TJm +(SCROLLLOCK 6114) 65.5277 Tj +0 -151.8926 Td +(REDIR 6858) 43.6851 Tj +-15048.7 TJm +(6114 6147) 39.3166 Tj +17.4613 -161.386 Td +(6858 6930 7070 7371) 83.0018 Tj +-6520.6 TJm +(SECTSIZE 1111) 56.7907 Tj +0 -170.8793 Td +(redircmd 6875 7064) 78.6333 Tj +-11035.3 TJm +(1111 1173 1186 1189) 83.0018 Tj +17.4613 -180.3727 Td +(6875 6913 6931 7064) 83.0018 Tj -8527.14 TJm -(1862 1873 1925 2040) 83.0018 Tj -0 -465.1739 Td -(read_ebp 0392) 56.7907 Tj --11537.1 TJm -(scheduler 1808) 61.1592 Tj -17.4613 -474.6668 Td -(0392 5762) 39.3166 Tj +(1194) 17.4741 Tj +17.4613 -189.8657 Td +(7066 7275 7278 7281) 83.0018 Tj +-6520.6 TJm +(SEG 0701) 34.9481 Tj +17.4613 -199.3586 Td +(7359 7372) 39.3166 Tj -13543.8 TJm -(0299 1263 1808) 61.1592 Tj -0 -484.1602 Td -(read_eflags 0435) 69.8962 Tj --10032.1 TJm -(SCROLLLOCK 6064) 65.5277 Tj -17.4613 -493.6536 Td -(0435 1459 1468 1855) 83.0018 Tj +(0701 1708 1709 1710) 83.0018 Tj +0 -208.852 Td +(REG_ID 5860) 48.0537 Tj +-14547 TJm +(1725 1726) 39.3166 Tj +17.4613 -218.3453 Td +(5860 5910) 39.3166 Tj +-11537.3 TJm +(SEG16 0706) 43.6851 Tj +0 -227.8387 Td +(REG_TABLE 5862) 61.1592 Tj +-13042 TJm +(0706 1727) 39.3166 Tj +17.4613 -237.3321 Td +(5862 5917 5918 5931) 83.0018 Tj +-6520.6 TJm +(SEG_ASM 0608) 52.4222 Tj +17.4613 -246.825 Td +(5932) 17.4741 Tj +-16052.1 TJm +(0608 0992 0993 1092) 83.0018 Tj +0 -256.3184 Td +(REG_VER 5861) 52.4222 Tj +-14045.3 TJm +(1093) 17.4741 Tj +17.4613 -265.8118 Td +(5861 5909) 39.3166 Tj +-11537.3 TJm +(segdesc 0677) 52.4222 Tj +0 -275.3051 Td +(release 1402) 52.4222 Tj +-14045.3 TJm +(0450 0453 0677 0701) 83.0018 Tj +17.4613 -284.7985 Td +(0325 1402 1405 1763) 83.0018 Tj -8527.14 TJm -(6064 6097) 39.3166 Tj +(0706 1561) 39.3166 Tj +17.4613 -294.2914 Td +(1769 1934 1978 1987) 83.0018 Tj +-6520.6 TJm +(SEG_KCODE 0907 1021 1502 2500) 126.6869 Tj +17.4613 -303.7844 Td +(2019 2032 2068 2086) 83.0018 Tj +-8527.14 TJm +(0961 1061 1502 1708) 83.0018 Tj +17.4613 -313.2774 Td +(2090 2176 2183 2343) 83.0018 Tj +-8527.14 TJm +(2571 2572) 39.3166 Tj +17.4613 -322.7704 Td +(2369 2373 2619 2975) 83.0018 Tj +-6520.6 TJm +(SEG_KCPU 1504 2502) 78.6333 Tj +17.4613 -332.2633 Td +(2980 3409 3428 3482) 83.0018 Tj +-8527.14 TJm +(1504 1710 1712 2518) 83.0018 Tj +17.4613 -341.7563 Td +(3578 3592 3641 3864) 83.0018 Tj +-6520.6 TJm +(SEG_KDATA 0908 1022 1503 2501) 126.6869 Tj +17.4613 -351.2493 Td +(3880 3892 3914 3942) 83.0018 Tj +-8527.14 TJm +(0966 1066 1503 1709) 83.0018 Tj +17.4613 -360.7422 Td +(3960 3969 4428 4432) 83.0018 Tj +-8527.14 TJm +(1729 2515) 39.3166 Tj +17.4613 -370.2352 Td +(4444 4460 4466 5222) 83.0018 Tj +-6520.6 TJm +(SEG_NULLASM 0604) 69.8962 Tj +17.4613 -379.7282 Td +(5225 5238 5247 5258) 83.0018 Tj +-8527.14 TJm +(0604 0991 1091) 61.1592 Tj +17.4613 -389.2212 Td +(5269 6398 6547 6562) 83.0018 Tj +-6520.6 TJm +(SEG_TSS 1507) 52.4222 Tj +17.4613 -398.7141 Td +(6582 6609) 39.3166 Tj +-13543.8 TJm +(1507 1727 1728 1731) 83.0018 Tj +0 -408.2075 Td +(ROOTDEV 0159) 52.4222 Tj +-12038.8 TJm +(SEG_UCODE 1505) 61.1592 Tj +17.4613 -417.7008 Td +(0159 4359) 39.3166 Tj +-13543.8 TJm +(1505 1725 1817) 61.1592 Tj +0 -427.1942 Td +(ROOTINO 3157) 52.4222 Tj +-12038.8 TJm +(SEG_UDATA 1506) 61.1592 Tj +17.4613 -436.6876 Td +(3157 4359) 39.3166 Tj +-13543.8 TJm +(1506 1726 1818) 61.1592 Tj +0 -446.1809 Td +(run 2262) 34.9481 Tj +-14045.5 TJm +(SETGATE 0821) 52.4222 Tj +17.4613 -455.6743 Td +(1661 2262 2263 2269) 83.0018 Tj +-8527.14 TJm +(0821 2571 2572) 61.1592 Tj +17.4613 -465.1673 Td +(2307 2316 2317 2319) 83.0018 Tj +-6520.6 TJm +(SHIFT 6108) 43.6851 Tj +17.4613 -474.6602 Td +(2357) 17.4741 Tj +-16052.1 TJm +(6108 6136 6137 6285) 83.0018 Tj +0 -484.1536 Td +(runcmd 6906) 48.0537 Tj +-12540.5 TJm +(skipelem 4315) 56.7907 Tj +17.4613 -493.6469 Td +(6906 6920 6937 6943) 83.0018 Tj +-8527.14 TJm +(4315 4363) 39.3166 Tj Q Q q @@ -3330,207 +3341,207 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 10) 192.2146 Tj +(Aug 8 01:04 2009 cross-references Page 10) 192.2146 Tj 0 -28.4801 Td -(SECTSIZE 1111) 56.7907 Tj --13543.7 TJm -(5156 5165 6258 6270) 83.0018 Tj -17.4613 -37.9735 Td -(1111 1125 1173 1186) 83.0018 Tj --8527.14 TJm -(6452) 17.4741 Tj -17.4613 -47.4664 Td -(1189 1194) 39.3166 Tj --11537.3 TJm -(start 0912 1026 6707) 87.3703 Tj -0 -56.9598 Td -(SEG 0654) 34.9481 Tj --16052 TJm -(0911 0912 0974 1025) 83.0018 Tj -17.4613 -66.4531 Td -(0654 1685 1686 1690) 83.0018 Tj --8527.14 TJm -(1026 1073 1074 2229) 83.0018 Tj -17.4613 -75.9461 Td -(1691) 17.4741 Tj --16052.1 TJm -(2232 2233 2236 6706) 83.0018 Tj -0 -85.4395 Td -(SEG16 0659) 43.6851 Tj +(sleep 2003) 43.6851 Tj -15048.7 TJm -(6707) 17.4741 Tj -17.4613 -94.9328 Td -(0659 1687) 39.3166 Tj --11537.3 TJm -(stat 3050) 39.3166 Tj -0 -104.4262 Td -(segdesc 0627) 52.4222 Tj --14045.3 TJm -(0207 0230 0248 3050) 83.0018 Tj -17.4613 -113.9196 Td -(0400 0403 0627 0651) 83.0018 Tj --8527.14 TJm -(3665 4082 4478 4553) 83.0018 Tj -17.4613 -123.4125 Td -(0654 0659 1562) 61.1592 Tj --11035.5 TJm -(4654 6753) 39.3166 Tj -0 -132.9059 Td -(SEG_ASM 0558) 52.4222 Tj --12038.8 TJm -(stati 4082) 43.6851 Tj -17.4613 -142.3992 Td -(0558 0985 0986 1081) 83.0018 Tj --8527.14 TJm -(0248 4082 4482) 61.1592 Tj -17.4613 -151.8922 Td -(1082) 17.4741 Tj --14045.6 TJm -(STA_R 0567 0671) 65.5277 Tj -0 -161.3856 Td -(SEG_KCODE 1501) 61.1592 Tj --13042 TJm -(0567 0671 0985 1081) 83.0018 Tj -17.4613 -170.8789 Td -(1501 1685 2521 2522) 83.0018 Tj --8527.14 TJm -(1685 1690) 39.3166 Tj -0 -180.3723 Td -(SEG_KDATA 1502) 61.1592 Tj --11035.5 TJm -(STA_W 0566 0670) 65.5277 Tj -17.4613 -189.8653 Td -(1502 1678 1686) 61.1592 Tj --11035.5 TJm -(0566 0670 0986 1082) 83.0018 Tj -0 -199.3586 Td -(SEG_NULL 0651) 56.7907 Tj --13543.7 TJm -(1686 1691) 39.3166 Tj -17.4613 -208.852 Td -(0651 1684 1693 1694) 83.0018 Tj --6520.6 TJm -(STA_X 0563 0667) 65.5277 Tj -0 -218.3453 Td -(SEG_NULLASM 0554) 69.8962 Tj --12038.7 TJm -(0563 0667 0985 1081) 83.0018 Tj -17.4613 -227.8387 Td -(0554 0984 1080) 61.1592 Tj --11035.5 TJm -(1685 1690) 39.3166 Tj -0 -237.3321 Td -(SEG_TSS 1505) 52.4222 Tj --12038.8 TJm -(sti 0470) 34.9481 Tj -17.4613 -246.8254 Td -(1505 1687 1688 1701) 83.0018 Tj --8527.14 TJm -(0470 0472 1473 1817) 83.0018 Tj -0 -256.3188 Td -(SEG_UCODE 1503) 61.1592 Tj --11035.5 TJm -(strlen 5389) 48.0537 Tj -17.4613 -265.8121 Td -(1503 1690 1693 1767) 83.0018 Tj --8527.14 TJm -(0324 5044 5078 5389) 83.0018 Tj -0 -275.3055 Td -(SEG_UDATA 1504) 61.1592 Tj --13042 TJm -(7019 7223) 39.3166 Tj -17.4613 -284.7989 Td -(1504 1691 1694 1768) 83.0018 Tj --6520.6 TJm -(strncmp 5351) 52.4222 Tj -0 -294.2922 Td -(SETGATE 0771) 52.4222 Tj --14045.3 TJm -(0325 4205 5351) 61.1592 Tj -17.4613 -303.7856 Td -(0771 2521 2522) 61.1592 Tj --9028.94 TJm -(strncpy 5361) 52.4222 Tj -0 -313.2789 Td -(setupsegs 1672) 61.1592 Tj --13042 TJm -(0326 4272 5361) 61.1592 Tj -17.4613 -322.7723 Td -(0300 1259 1665 1672) 83.0018 Tj --6520.6 TJm -(STS_IG32 0685) 56.7907 Tj -17.4613 -332.2653 Td -(1830 1837 5106) 61.1592 Tj --11035.5 TJm -(0685 0777) 39.3166 Tj -0 -341.7586 Td -(SHIFT 6058) 43.6851 Tj --13042.1 TJm -(STS_T32A 0682) 56.7907 Tj -17.4613 -351.252 Td -(6058 6086 6087 6235) 83.0018 Tj --8527.14 TJm -(0682 1687) 39.3166 Tj -0 -360.7454 Td -(skipelem 4314) 56.7907 Tj --11537.1 TJm -(STS_TG32 0686) 56.7907 Tj -17.4613 -370.2387 Td -(4314 4363) 39.3166 Tj --13543.8 TJm -(0686 0777) 39.3166 Tj -0 -379.7321 Td -(sleep 1903) 43.6851 Tj --13042.1 TJm -(STUB 6803 6810 6811 6812 6813 6814) 148.5295 Tj -17.4613 -389.2254 Td -(0301 1903 1906 1909) 83.0018 Tj --8527.14 TJm -(6810 6811 6812 6813) 83.0018 Tj -17.4613 -398.7184 Td -(2090 2109 2877 3480) 83.0018 Tj --8527.14 TJm -(6814 6815 6816 6817) 83.0018 Tj -17.4613 -408.2114 Td -(3577 3862 5263 5283) 83.0018 Tj --8527.14 TJm -(6818 6819 6820 6821) 83.0018 Tj -17.4613 -417.7043 Td -(6516 6829) 39.3166 Tj --13543.8 TJm -(6822 6823 6824 6825) 83.0018 Tj -0 -427.1977 Td -(spinlock 1301) 56.7907 Tj --13543.7 TJm -(6826 6827 6828 6829) 83.0018 Tj -17.4613 -436.6911 Td -(0206 0301 0311 0313) 83.0018 Tj +(0733 0827) 39.3166 Tj +17.4613 -37.9735 Td +(0311 1659 2003 2006) 83.0018 Tj -6520.6 TJm (sum 5525) 34.9481 Tj -17.4613 -446.184 Td -(0314 0315 0343 1301) 83.0018 Tj +17.4613 -47.4664 Td +(2009 2188 2978 3480) 83.0018 Tj -8527.14 TJm (5525 5527 5529 5531) 83.0018 Tj -17.4613 -455.677 Td -(1358 1363 1375 1402) 83.0018 Tj +17.4613 -56.9594 Td +(3581 3912 5242 5261) 83.0018 Tj -8527.14 TJm (5532 5543 5592) 61.1592 Tj -17.4613 -465.17 Td -(1440 1606 1608 1903) 83.0018 Tj --6520.6 TJm -(superblock 3160) 65.5277 Tj -17.4613 -474.663 Td -(2210 2212 2507 2512) 83.0018 Tj +17.4613 -66.4524 Td +(6566 6779) 39.3166 Tj +-11537.3 TJm +(superblock 3161) 65.5277 Tj +0 -75.9457 Td +(spinlock 1301) 56.7907 Tj +-13543.7 TJm +(3161 3678 3708 3733) 83.0018 Tj +17.4613 -85.4391 Td +(0206 0311 0321 0323) 83.0018 Tj -8527.14 TJm -(3160 3679 3708 3733) 83.0018 Tj -17.4613 -484.1559 Td -(3309 3324 3526 3530) 83.0018 Tj --8527.14 TJm -(3957) 17.4741 Tj -17.4613 -493.6489 Td -(3668 3784 4404 4408) 83.0018 Tj +(3807) 17.4741 Tj +17.4613 -94.9321 Td +(0324 0325 0354 1301) 83.0018 Tj -6520.6 TJm (SVR 5664) 34.9481 Tj +17.4613 -104.425 Td +(1358 1361 1373 1402) 83.0018 Tj +-8527.14 TJm +(5664 5707) 39.3166 Tj +17.4613 -113.918 Td +(1444 1606 1609 2003) 83.0018 Tj +-6520.6 TJm +(swtch 2208) 43.6851 Tj +17.4613 -123.411 Td +(2260 2268 2557 2562) 83.0018 Tj +-8527.14 TJm +(0318 1928 1967 2207) 83.0018 Tj +17.4613 -132.9039 Td +(3309 3324 3526 3530) 83.0018 Tj +-8527.14 TJm +(2208) 17.4741 Tj +17.4613 -142.3969 Td +(3668 3784 4404 4408) 83.0018 Tj +-6520.6 TJm +(syscall 2874) 52.4222 Tj +17.4613 -151.8899 Td +(5156 5161 6308 6319) 83.0018 Tj +-8527.14 TJm +(0344 2607 2756 2874) 83.0018 Tj +17.4613 -161.3829 Td +(6502) 17.4741 Tj +-14045.6 TJm +(SYSCALL 6753 6760 6761 6762 6763 67) 152.898 Tj +0 -170.8762 Td +(STA_R 0617 0718) 65.5277 Tj +-12540.3 TJm +(6760 6761 6762 6763) 83.0018 Tj +17.4613 -180.3696 Td +(0617 0718 0992 1092) 83.0018 Tj +-8527.14 TJm +(6764 6765 6766 6767) 83.0018 Tj +17.4613 -189.8625 Td +(1708 1725) 39.3166 Tj +-13543.8 TJm +(6768 6769 6770 6771) 83.0018 Tj +0 -199.3559 Td +(start 0914 1028 6707) 87.3703 Tj +-10032 TJm +(6772 6773 6774 6775) 83.0018 Tj +17.4613 -208.8493 Td +(0913 0914 0975 1027) 83.0018 Tj +-8527.14 TJm +(6776 6777 6778 6779) 83.0018 Tj +17.4613 -218.3422 Td +(1028 1075 1076 6706) 83.0018 Tj +-6520.6 TJm +(sys_chdir 4930) 61.1592 Tj +17.4613 -227.8352 Td +(6707) 17.4741 Tj +-16052.1 TJm +(2829 2851 4930) 61.1592 Tj +0 -237.3286 Td +(stat 3104) 39.3166 Tj +-13543.8 TJm +(SYS_chdir 2716) 61.1592 Tj +17.4613 -246.8219 Td +(0207 0230 0248 3104) 83.0018 Tj +-8527.14 TJm +(2716 2851) 39.3166 Tj +17.4613 -256.3149 Td +(3665 4085 4476 4553) 83.0018 Tj +-6520.6 TJm +(sys_close 4639) 61.1592 Tj +17.4613 -265.8079 Td +(4654 6803) 39.3166 Tj +-13543.8 TJm +(2830 2852 4639) 61.1592 Tj +0 -275.3012 Td +(stati 4085) 43.6851 Tj +-13042.1 TJm +(SYS_close 2707) 61.1592 Tj +17.4613 -284.7946 Td +(0248 4085 4480) 61.1592 Tj +-11035.5 TJm +(2707 2852) 39.3166 Tj +0 -294.2879 Td +(STA_W 0616 0717) 65.5277 Tj +-10533.8 TJm +(sys_dup 4601) 52.4222 Tj +17.4613 -303.7813 Td +(0616 0717 0993 1093) 83.0018 Tj +-8527.14 TJm +(2831 2853 4601) 61.1592 Tj +17.4613 -313.2743 Td +(1709 1710 1726) 61.1592 Tj +-9028.94 TJm +(SYS_dup 2717) 52.4222 Tj +0 -322.7676 Td +(STA_X 0613 0714) 65.5277 Tj +-12540.3 TJm +(2717 2853) 39.3166 Tj +17.4613 -332.2606 Td +(0613 0714 0992 1092) 83.0018 Tj +-6520.6 TJm +(sys_exec 4951) 56.7907 Tj +17.4613 -341.7536 Td +(1708 1725) 39.3166 Tj +-13543.8 TJm +(2832 2854 4951) 61.1592 Tj +0 -351.2469 Td +(sti 0527) 34.9481 Tj +-14045.5 TJm +(SYS_exec 2709) 56.7907 Tj +17.4613 -360.7403 Td +(0527 0529 1473 1914) 83.0018 Tj +-8527.14 TJm +(2709 2854 6711) 61.1592 Tj +0 -370.2337 Td +(stosb 0442) 43.6851 Tj +-13042.1 TJm +(sys_exit 2914) 56.7907 Tj +17.4613 -379.727 Td +(0442 0444 1139 5306) 83.0018 Tj +-8527.14 TJm +(2833 2855 2914) 61.1592 Tj +0 -389.2204 Td +(strlen 5389) 48.0537 Tj +-12540.5 TJm +(SYS_exit 2702) 56.7907 Tj +17.4613 -398.7137 Td +(0334 5046 5086 5389) 83.0018 Tj +-8527.14 TJm +(2702 2855 6716) 61.1592 Tj +17.4613 -408.2067 Td +(7019 7223) 39.3166 Tj +-11537.3 TJm +(sys_fork 2908) 56.7907 Tj +0 -417.7001 Td +(strncmp 5351) 52.4222 Tj +-14045.3 TJm +(2834 2856 2908) 61.1592 Tj +17.4613 -427.1934 Td +(0335 4205 5351) 61.1592 Tj +-9028.94 TJm +(SYS_fork 2701) 56.7907 Tj +0 -436.6868 Td +(strncpy 5361) 52.4222 Tj +-14045.3 TJm +(2701 2856) 39.3166 Tj +17.4613 -446.1801 Td +(0336 4272 5361) 61.1592 Tj +-9028.94 TJm +(sys_fstat 4651) 61.1592 Tj +0 -455.6735 Td +(STS_IG32 0732) 56.7907 Tj +-13543.7 TJm +(2835 2857 4651) 61.1592 Tj +17.4613 -465.1669 Td +(0732 0827) 39.3166 Tj +-11537.3 TJm +(SYS_fstat 2713) 61.1592 Tj +0 -474.6598 Td +(STS_T32A 0729) 56.7907 Tj +-13543.7 TJm +(2713 2857) 39.3166 Tj +17.4613 -484.1532 Td +(0729 1727) 39.3166 Tj +-11537.3 TJm +(sys_getpid 2937) 65.5277 Tj +0 -493.6466 Td +(STS_TG32 0733) 56.7907 Tj +-13543.7 TJm +(2836 2858 2937) 61.1592 Tj Q Q Q @@ -3559,6 +3570,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -3576,207 +3589,207 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 11) 192.2146 Tj -17.4613 -28.4801 Td -(5664 5707) 39.3166 Tj --11537.3 TJm -(ticks 2513) 43.6851 Tj -0 -37.9735 Td -(swtch 2156) 43.6851 Tj --15048.7 TJm -(0341 2513 2550 2551) 83.0018 Tj -17.4613 -47.4664 Td -(0308 1832 1864 2155) 83.0018 Tj --8527.14 TJm -(2871 2872 2877) 61.1592 Tj +(Aug 8 01:04 2009 cross-references Page 11) 192.2146 Tj +0 -28.4801 Td +(SYS_getpid 2718) 65.5277 Tj +-10533.8 TJm +(taskstate 0751) 61.1592 Tj +17.4613 -37.9735 Td +(2718 2858) 39.3166 Tj +-13543.8 TJm +(0751 1560) 39.3166 Tj +0 -47.4664 Td +(sys_kill 2927) 56.7907 Tj +-11537.1 TJm +(TDCR 5685) 39.3166 Tj 17.4613 -56.9598 Td -(2156) 17.4741 Tj --14045.6 TJm -(tickslock 2512) 61.1592 Tj +(2837 2859 2927) 61.1592 Tj +-11035.5 TJm +(5685 5713) 39.3166 Tj 0 -66.4531 Td -(syscall 2774) 52.4222 Tj --14045.3 TJm -(0343 2512 2524 2549) 83.0018 Tj +(SYS_kill 2708) 56.7907 Tj +-11537.1 TJm +(T_DEV 3102) 43.6851 Tj 17.4613 -75.9465 Td -(0334 2540 2656 2774) 83.0018 Tj --8527.14 TJm -(2552 2870 2874 2877) 83.0018 Tj +(2708 2859) 39.3166 Tj +-13543.8 TJm +(3102 4107 4157 4923) 83.0018 Tj 0 -85.4399 Td -(SYS_chdir 2616) 61.1592 Tj --13042 TJm -(2879) 17.4741 Tj +(sys_link 4663) 56.7907 Tj +-11537.1 TJm +(T_DIR 3100) 43.6851 Tj 17.4613 -94.9332 Td -(2616 2751) 39.3166 Tj --11537.3 TJm -(TICR 5683) 39.3166 Tj +(2838 2860 4663) 61.1592 Tj +-11035.5 TJm +(3100 4218 4365 4673) 83.0018 Tj 0 -104.4266 Td -(SYS_close 2607) 61.1592 Tj --13042 TJm -(5683 5715) 39.3166 Tj +(SYS_link 2714) 56.7907 Tj +-13543.7 TJm +(4778 4787 4829 4868) 83.0018 Tj 17.4613 -113.9199 Td -(2607 2752) 39.3166 Tj +(2714 2860) 39.3166 Tj +-13543.8 TJm +(4906 4938) 39.3166 Tj +0 -123.4133 Td +(sys_mkdir 4901) 61.1592 Tj +-11035.5 TJm +(T_FILE 3101) 48.0537 Tj +17.4613 -132.9067 Td +(2839 2861 4901) 61.1592 Tj +-11035.5 TJm +(3101 4814 4862) 61.1592 Tj +0 -142.4 Td +(SYS_mkdir 2715) 61.1592 Tj +-11035.5 TJm +(ticks 2563) 43.6851 Tj +17.4613 -151.8934 Td +(2715 2861) 39.3166 Tj +-13543.8 TJm +(0352 2563 2617 2618) 83.0018 Tj +0 -161.3867 Td +(sys_mknod 4913) 61.1592 Tj +-13042 TJm +(2972 2973 2978) 61.1592 Tj +17.4613 -170.8801 Td +(2840 2862 4913) 61.1592 Tj +-9028.94 TJm +(tickslock 2562) 61.1592 Tj +0 -180.3735 Td +(SYS_mknod 2711) 61.1592 Tj +-13042 TJm +(0354 2562 2574 2616) 83.0018 Tj +17.4613 -189.8664 Td +(2711 2862) 39.3166 Tj +-13543.8 TJm +(2619 2971 2975 2978) 83.0018 Tj +0 -199.3598 Td +(sys_open 4851) 56.7907 Tj +-13543.7 TJm +(2980) 17.4741 Tj +17.4613 -208.8532 Td +(2841 2863 4851) 61.1592 Tj +-9028.94 TJm +(TICR 5683) 39.3166 Tj +0 -218.3465 Td +(SYS_open 2710) 56.7907 Tj +-13543.7 TJm +(5683 5715) 39.3166 Tj +17.4613 -227.8399 Td +(2710 2863) 39.3166 Tj -11537.3 TJm (TIMER 5675) 43.6851 Tj -0 -123.4133 Td -(SYS_dup 2617) 52.4222 Tj --14045.3 TJm -(5675 5714) 39.3166 Tj -17.4613 -132.9067 Td -(2617 2753) 39.3166 Tj --11537.3 TJm -(TIMER_16BIT 6621) 69.8962 Tj -0 -142.4 Td -(SYS_exec 2609) 56.7907 Tj --13543.7 TJm -(6621 6627) 39.3166 Tj -17.4613 -151.8934 Td -(2609 2754 6711) 61.1592 Tj --9028.94 TJm -(TIMER_DIV 6616) 61.1592 Tj -0 -161.3867 Td -(SYS_exit 2602) 56.7907 Tj --13543.7 TJm -(6616 6628 6629) 61.1592 Tj -17.4613 -170.8801 Td -(2602 2755 6716) 61.1592 Tj --9028.94 TJm -(TIMER_FREQ 6615) 65.5277 Tj -0 -180.3735 Td -(SYS_fork 2601) 56.7907 Tj --13543.7 TJm -(6615 6616) 39.3166 Tj -17.4613 -189.8664 Td -(2601 2756) 39.3166 Tj --11537.3 TJm -(timer_init 6624) 65.5277 Tj -0 -199.3598 Td -(SYS_fstat 2613) 61.1592 Tj --13042 TJm -(0337 1234 6624) 61.1592 Tj -17.4613 -208.8532 Td -(2613 2757) 39.3166 Tj --11537.3 TJm -(TIMER_MODE 6618) 65.5277 Tj -0 -218.3465 Td -(SYS_getpid 2618) 65.5277 Tj --12540.3 TJm -(6618 6627) 39.3166 Tj -17.4613 -227.8399 Td -(2618 2758) 39.3166 Tj --11537.3 TJm -(TIMER_RATEGEN 6620) 78.6333 Tj 0 -237.3332 Td -(SYS_kill 2608) 56.7907 Tj +(sys_pipe 4976) 56.7907 Tj -13543.7 TJm -(6620 6627) 39.3166 Tj +(5675 5714) 39.3166 Tj 17.4613 -246.8266 Td -(2608 2759) 39.3166 Tj --11537.3 TJm -(TIMER_SEL0 6619) 65.5277 Tj +(2842 2864 4976) 61.1592 Tj +-9028.94 TJm +(TIMER_16BIT 6671) 69.8962 Tj 0 -256.32 Td -(SYS_link 2614) 56.7907 Tj +(SYS_pipe 2704) 56.7907 Tj -13543.7 TJm -(6619 6627) 39.3166 Tj +(6671 6677) 39.3166 Tj 17.4613 -265.8133 Td -(2614 2760) 39.3166 Tj +(2704 2864) 39.3166 Tj -11537.3 TJm -(TPR 5662) 34.9481 Tj +(TIMER_DIV 6666) 61.1592 Tj 0 -275.3067 Td -(SYS_mkdir 2615) 61.1592 Tj --13042 TJm -(5662 5743) 39.3166 Tj +(sys_read 4615) 56.7907 Tj +-13543.7 TJm +(6666 6678 6679) 61.1592 Tj 17.4613 -284.8 Td -(2615 2761) 39.3166 Tj --11537.3 TJm -(trap 2534) 39.3166 Tj +(2843 2865 4615) 61.1592 Tj +-9028.94 TJm +(TIMER_FREQ 6665) 65.5277 Tj 0 -294.2934 Td -(SYS_mknod 2611) 61.1592 Tj --13042 TJm -(2402 2404 2469 2534) 83.0018 Tj +(SYS_read 2706) 56.7907 Tj +-13543.7 TJm +(6665 6666) 39.3166 Tj 17.4613 -303.7868 Td -(2611 2762) 39.3166 Tj --13543.8 TJm -(2573 2575 2578) 61.1592 Tj +(2706 2865) 39.3166 Tj +-11537.3 TJm +(timerinit 6674) 61.1592 Tj 0 -313.2801 Td -(SYS_open 2610) 56.7907 Tj --11537.1 TJm -(trapframe 0477) 61.1592 Tj +(sys_sbrk 2951) 56.7907 Tj +-13543.7 TJm +(0347 1234 6674) 61.1592 Tj 17.4613 -322.7735 Td -(2610 2763) 39.3166 Tj --13543.8 TJm -(0477 1541 1615 1723) 83.0018 Tj +(2844 2866 2951) 61.1592 Tj +-9028.94 TJm +(TIMER_MODE 6668) 65.5277 Tj 0 -332.2664 Td -(SYS_pipe 2604) 56.7907 Tj +(SYS_sbrk 2719) 56.7907 Tj -13543.7 TJm -(2534) 17.4741 Tj +(6668 6677) 39.3166 Tj 17.4613 -341.7598 Td -(2604 2764) 39.3166 Tj +(2719 2866) 39.3166 Tj -11537.3 TJm -(trapret 2474) 52.4222 Tj +(TIMER_RATEGEN 6670) 78.6333 Tj 0 -351.2532 Td -(SYS_read 2606) 56.7907 Tj --13543.7 TJm -(2473 2474 2486) 61.1592 Tj +(sys_sleep 2965) 61.1592 Tj +-13042 TJm +(6670 6677) 39.3166 Tj 17.4613 -360.7465 Td -(2606 2765) 39.3166 Tj --11537.3 TJm -(tvinit 2516) 48.0537 Tj +(2845 2867 2965) 61.1592 Tj +-9028.94 TJm +(TIMER_SEL0 6669) 65.5277 Tj 0 -370.2399 Td -(SYS_sbrk 2619) 56.7907 Tj --13543.7 TJm -(0342 1228 2516) 61.1592 Tj +(SYS_sleep 2720) 61.1592 Tj +-13042 TJm +(6669 6677) 39.3166 Tj 17.4613 -379.7332 Td -(2619 2766) 39.3166 Tj +(2720 2867) 39.3166 Tj -11537.3 TJm -(T_DEV 3184) 43.6851 Tj +(T_IRQ0 2429) 48.0537 Tj 0 -389.2266 Td -(SYS_sleep 2620) 61.1592 Tj --13042 TJm -(3184 4107 4157 4911) 83.0018 Tj -17.4613 -398.72 Td -(2620 2767) 39.3166 Tj --11537.3 TJm -(T_DIR 3182) 43.6851 Tj -0 -408.2133 Td -(SYS_unlink 2612) 65.5277 Tj +(sys_unlink 4751) 65.5277 Tj -12540.3 TJm -(3182 4218 4365 4673) 83.0018 Tj +(2429 2614 2623 2627) 83.0018 Tj +17.4613 -398.72 Td +(2846 2868 4751) 61.1592 Tj +-11035.5 TJm +(2631 2635 2636 2663) 83.0018 Tj +0 -408.2133 Td +(SYS_unlink 2712) 65.5277 Tj +-12540.3 TJm +(5707 5714 5727 5917) 83.0018 Tj 17.4613 -417.7067 Td -(2612 2768) 39.3166 Tj +(2712 2868) 39.3166 Tj -13543.8 TJm -(4778 4838 4868 4923) 83.0018 Tj +(5931 5997 6016) 61.1592 Tj 0 -427.2 Td -(SYS_wait 2603) 56.7907 Tj --13543.7 TJm -(4938) 17.4741 Tj +(sys_wait 2921) 56.7907 Tj +-11537.1 TJm +(TPR 5662) 34.9481 Tj 17.4613 -436.6934 Td -(2603 2769) 39.3166 Tj --11537.3 TJm -(T_FILE 3183) 48.0537 Tj +(2847 2869 2921) 61.1592 Tj +-11035.5 TJm +(5662 5743) 39.3166 Tj 0 -446.1868 Td -(SYS_write 2605) 61.1592 Tj --13042 TJm -(3183 4862) 39.3166 Tj +(SYS_wait 2703) 56.7907 Tj +-11537.1 TJm +(trap 2601) 39.3166 Tj 17.4613 -455.6801 Td -(2605 2770) 39.3166 Tj --11537.3 TJm -(T_SYSCALL 2376) 61.1592 Tj +(2703 2869) 39.3166 Tj +-13543.8 TJm +(2452 2454 2524 2601) 83.0018 Tj 0 -465.1735 Td -(taskstate 0701) 61.1592 Tj +(sys_write 4627) 61.1592 Tj -13042 TJm -(2376 2522 2536 6712) 83.0018 Tj +(2645 2647 2650) 61.1592 Tj 17.4613 -474.6665 Td -(0701 1561) 39.3166 Tj --13543.8 TJm -(6717 6807) 39.3166 Tj +(2848 2870 4627) 61.1592 Tj +-9028.94 TJm +(trapframe 0552) 61.1592 Tj 0 -484.1598 Td -(TDCR 5685) 39.3166 Tj --13543.8 TJm -(userinit 1757) 56.7907 Tj +(SYS_write 2705) 61.1592 Tj +-13042 TJm +(0552 1536 1780 2601) 83.0018 Tj 17.4613 -493.6532 Td -(5685 5713) 39.3166 Tj --13543.8 TJm -(0302 1235 1757) 61.1592 Tj +(2705 2870) 39.3166 Tj +-11537.3 TJm +(trapret 2529) 52.4222 Tj Q Q q @@ -3793,55 +3806,73 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 cross-references Page 12) 192.2146 Tj -0 -28.4801 Td +(Aug 8 01:04 2009 cross-references Page 12) 192.2146 Tj +17.4613 -28.4801 Td +(1617 1785 2528 2529) 83.0018 Tj +-6520.6 TJm +(waitdisk 1151) 56.7907 Tj +0 -37.9735 Td +(T_SYSCALL 2426) 61.1592 Tj +-13042 TJm +(1151 1163 1172) 61.1592 Tj +17.4613 -47.4664 Td +(2426 2572 2603 6712) 83.0018 Tj +-6520.6 TJm +(wakeup 2064) 48.0537 Tj +17.4613 -56.9598 Td +(6717 6757) 39.3166 Tj +-13543.8 TJm +(0314 2064 2618 3422) 83.0018 Tj +0 -66.4531 Td +(tvinit 2566) 48.0537 Tj +-14547 TJm +(3639 3941 3966 5216) 83.0018 Tj +17.4613 -75.9465 Td +(0353 1228 2566) 61.1592 Tj +-11035.5 TJm +(5219 5241 5246 5268) 83.0018 Tj +0 -85.4399 Td +(usegment 1722) 56.7907 Tj +-13543.7 TJm +(6541) 17.4741 Tj +17.4613 -94.9332 Td +(0310 1722 1846 1926) 83.0018 Tj +-6520.6 TJm +(wakeup1 2053) 52.4222 Tj +17.4613 -104.4266 Td +(5112) 17.4741 Tj +-16052.1 TJm +(2053 2067 2126 2133) 83.0018 Tj +0 -113.9199 Td +(userinit 1802) 56.7907 Tj +-11537.1 TJm +(writei 4152) 48.0537 Tj +17.4613 -123.4133 Td +(0312 1235 1802) 61.1592 Tj +-11035.5 TJm +(0249 4152 4274 4532) 83.0018 Tj +0 -132.9067 Td (VER 5661) 34.9481 Tj -16052 TJm -(6491) 17.4741 Tj -17.4613 -37.9735 Td +(4785 4786) 39.3166 Tj +17.4613 -142.4 Td (5661 5723) 39.3166 Tj -11537.3 TJm -(wakeup1 1953) 52.4222 Tj -0 -47.4664 Td -(wait 2053) 39.3166 Tj +(xchg 0501) 39.3166 Tj +0 -151.8934 Td +(wait 2153) 39.3166 Tj -15550.3 TJm -(1953 1968 2026 2033) 83.0018 Tj -17.4613 -56.9598 Td -(0303 2053 2829 6783) 83.0018 Tj +(0501 1260 1382 1419) 83.0018 Tj +17.4613 -161.3867 Td +(0313 2153 2923 6762) 83.0018 Tj -6520.6 TJm -(writei 4152) 48.0537 Tj -17.4613 -66.4531 Td -(6812 6944 6970 6971) 83.0018 Tj +(yield 1973) 43.6851 Tj +17.4613 -170.8801 Td +(6833 6944 6970 6971) 83.0018 Tj -8527.14 TJm -(0249 4152 4274 4532) 83.0018 Tj -17.4613 -75.9465 Td +(0315 1973 2664) 61.1592 Tj +17.4613 -180.3735 Td (7026) 17.4741 Tj --16052.1 TJm -(4785 4786) 39.3166 Tj -0 -85.4399 Td -(waitdisk 1151) 56.7907 Tj --11537.1 TJm -(xchg 0451) 39.3166 Tj -17.4613 -94.9332 Td -(1151 1163 1172) 61.1592 Tj --11035.5 TJm -(0451 1260 1384 1415) 83.0018 Tj -0 -104.4266 Td -(wakeup 1965) 48.0537 Tj --12540.5 TJm -(yield 1869) 43.6851 Tj -17.4613 -113.9199 Td -(0304 1965 2551 3419) 83.0018 Tj --8527.14 TJm -(0305 1869 2592) 61.1592 Tj -17.4613 -123.4133 Td -(3639 3891 3916 5220) 83.0018 Tj --6520.6 TJm -(_namei 4354) 48.0537 Tj -17.4613 -132.9067 Td -(5223 5262 5267 5290) 83.0018 Tj --8527.14 TJm -(4354 4392 4398) 61.1592 Tj Q Q Q @@ -3870,6 +3901,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -3887,7 +3920,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/types.h Page 1) 166.0035 Tj +(Aug 8 01:04 2009 xv6/types.h Page 1) 166.0035 Tj 0 -28.4801 Td (0100 typedef unsigned int uint;) 144.161 Tj 0 -37.9735 Td @@ -4006,7 +4039,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/param.h Page 1) 166.0035 Tj +(Aug 8 01:04 2009 xv6/param.h Page 1) 166.0035 Tj 0 -28.4801 Td (0150 #define NPROC 64 // maximum number of processes) 262.1109 Tj 0 -37.9735 Td @@ -4141,6 +4174,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -4158,7 +4193,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/defs.h Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/defs.h Page 1) 161.635 Tj 0 -28.4801 Td (0200 struct buf;) 69.8962 Tj 0 -37.9735 Td @@ -4192,11 +4227,11 @@ q 0 -170.8805 Td (0215 // console.c) 74.2647 Tj 0 -180.3739 Td -(0216 void console_init\(void\);) 174.7406 Tj +(0216 void consoleinit\(void\);) 170.3721 Tj 0 -189.8672 Td (0217 void cprintf\(char*, ...\);) 179.1091 Tj 0 -199.3606 Td -(0218 void console_intr\(int\(*\)\(void\)\);) 209.6887 Tj +(0218 void consoleintr\(int\(*\)\(void\)\);) 205.3202 Tj 0 -208.8539 Td (0219 void panic\(char*\) __attribute__\(\(noreturn\)\ \);) 262.1109 Tj @@ -4279,25 +4314,25 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/defs.h Page 2) 161.635 Tj +(Aug 8 01:04 2009 xv6/defs.h Page 2) 161.635 Tj 0 -28.4801 Td (0250 // ide.c) 56.7907 Tj 0 -37.9735 Td -(0251 void ide_init\(void\);) 157.2665 Tj +(0251 void ideinit\(void\);) 152.898 Tj 0 -47.4668 Td -(0252 void ide_intr\(void\);) 157.2665 Tj +(0252 void ideintr\(void\);) 152.898 Tj 0 -56.9602 Td -(0253 void ide_rw\(struct buf *\);) 183.4776 Tj +(0253 void iderw\(struct buf*\);) 174.7406 Tj 0 -66.4535 Td (0254 ) 21.8426 Tj 0 -75.9469 Td (0255 // ioapic.c) 69.8962 Tj 0 -85.4403 Td -(0256 void ioapic_enable\(int irq, int cpu\);) 231.5313 Tj +(0256 void ioapicenable\(int irq, int cpu\);) 227.1628 Tj 0 -94.9336 Td -(0257 extern uchar ioapic_id;) 135.4239 Tj +(0257 extern uchar ioapicid;) 131.0554 Tj 0 -104.427 Td -(0258 void ioapic_init\(void\);) 170.3721 Tj +(0258 void ioapicinit\(void\);) 166.0035 Tj 0 -113.9203 Td (0259 ) 21.8426 Tj 0 -123.4137 Td @@ -4313,7 +4348,7 @@ q 0 -170.8805 Td (0265 // kbd.c) 56.7907 Tj 0 -180.3739 Td -(0266 void kbd_intr\(void\);) 157.2665 Tj +(0266 void kbdintr\(void\);) 152.898 Tj 0 -189.8672 Td (0267 ) 21.8426 Tj 0 -199.3606 Td @@ -4323,64 +4358,63 @@ q 0 -218.3473 Td (0270 extern volatile uint* lapic;) 157.2665 Tj 0 -227.8407 Td -(0271 void lapic_eoi\(void\);) 161.635 Tj +(0271 void lapiceoi\(void\);) 157.2665 Tj 0 -237.334 Td -(0272 void lapic_init\(int\);) 161.635 Tj +(0272 void lapicinit\(int\);) 157.2665 Tj 0 -246.8274 Td -(0273 void lapic_startap\(uchar, uint\);) 209.6887 Tj +(0273 void lapicstartap\(uchar, uint\);) 205.3202 Tj 0 -256.3207 Td -(0274 ) 21.8426 Tj +(0274 void microdelay\(int\);) 161.635 Tj 0 -265.8141 Td -(0275 // mp.c) 52.4222 Tj +(0275 ) 21.8426 Tj 0 -275.3075 Td -(0276 extern int ismp;) 113.5814 Tj +(0276 // mp.c) 52.4222 Tj 0 -284.8008 Td -(0277 int mp_bcpu\(void\);) 152.898 Tj +(0277 extern int ismp;) 113.5814 Tj 0 -294.2942 Td -(0278 void mp_init\(void\);) 152.898 Tj +(0278 int mpbcpu\(void\);) 148.5295 Tj 0 -303.7875 Td -(0279 void mp_startthem\(void\);) 174.7406 Tj +(0279 void mpinit\(void\);) 148.5295 Tj 0 -313.2809 Td -(0280 ) 21.8426 Tj +(0280 void mpstartthem\(void\);) 170.3721 Tj 0 -322.7743 Td -(0281 // picirq.c) 69.8962 Tj +(0281 ) 21.8426 Tj 0 -332.2676 Td -(0282 void pic_enable\(int\);) 161.635 Tj +(0282 // picirq.c) 69.8962 Tj 0 -341.761 Td -(0283 void pic_init\(void\);) 157.2665 Tj +(0283 void picenable\(int\);) 157.2665 Tj 0 -351.2543 Td -(0284 ) 21.8426 Tj +(0284 void picinit\(void\);) 152.898 Tj 0 -360.7477 Td -(0285 // pipe.c) 61.1592 Tj +(0285 ) 21.8426 Tj 0 -370.2411 Td -(0286 int pipealloc\(struct file**, struct file**\);) 266.4794 Tj +(0286 // pipe.c) 61.1592 Tj 0 -379.7344 Td -(0287 void pipeclose\(struct pipe*, int\);) 218.4257 Tj +(0287 int pipealloc\(struct file**, struct file**\);) 266.4794 Tj 0 -389.2278 Td -(0288 int piperead\(struct pipe*, char*, int\);) 244.6368 Tj +(0288 void pipeclose\(struct pipe*, int\);) 218.4257 Tj 0 -398.7211 Td -(0289 int pipewrite\(struct pipe*, char*, int\);) 249.0053 Tj +(0289 int piperead\(struct pipe*, char*, int\);) 244.6368 Tj 0 -408.2145 Td -(0290 ) 21.8426 Tj +(0290 int pipewrite\(struct pipe*, char*, int\);) 249.0053 Tj 0 -417.7079 Td -(0291 // proc.c) 61.1592 Tj +(0291 ) 21.8426 Tj 0 -427.2012 Td -(0292 struct proc* copyproc\(struct proc*\);) 192.2146 Tj +(0292 ) 21.8426 Tj 0 -436.6946 Td -(0293 struct proc* curproc\(void\);) 152.898 Tj +(0293 ) 21.8426 Tj 0 -446.1879 Td -(0294 void exit\(void\);) 139.7925 Tj +(0294 ) 21.8426 Tj 0 -455.6813 Td -(0295 int growproc\(int\);) 152.898 Tj +(0295 ) 21.8426 Tj 0 -465.1747 Td -(0296 int kill\(int\);) 135.4239 Tj +(0296 ) 21.8426 Tj 0 -474.668 Td -(0297 void pinit\(void\);) 144.161 Tj +(0297 ) 21.8426 Tj 0 -484.1614 Td -(0298 void procdump\(void\);) 157.2665 Tj +(0298 ) 21.8426 Tj 0 -493.6547 Td -(0299 void scheduler\(void\) __attribute__\(\(noretur\ -n\)\);) 275.2164 Tj +(0299 ) 21.8426 Tj 0 -522.1348 Td (Sheet 02) 34.9481 Tj Q @@ -4411,6 +4445,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -4428,103 +4464,105 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/defs.h Page 3) 161.635 Tj +(Aug 8 01:04 2009 xv6/defs.h Page 3) 161.635 Tj 0 -28.4801 Td -(0300 void setupsegs\(struct proc*\);) 196.5831 Tj +(0300 // proc.c) 61.1592 Tj 0 -37.9735 Td -(0301 void sleep\(void*, struct spinlock*\);) 227.1628 Tj +(0301 struct proc* copyproc\(struct proc*\);) 192.2146 Tj 0 -47.4668 Td -(0302 void userinit\(void\);) 157.2665 Tj +(0302 void exit\(void\);) 139.7925 Tj 0 -56.9602 Td -(0303 int wait\(void\);) 139.7925 Tj +(0303 int fork\(void\);) 139.7925 Tj 0 -66.4535 Td -(0304 void wakeup\(void*\);) 152.898 Tj +(0304 int growproc\(int\);) 152.898 Tj 0 -75.9469 Td -(0305 void yield\(void\);) 144.161 Tj +(0305 int kill\(int\);) 135.4239 Tj 0 -85.4403 Td -(0306 ) 21.8426 Tj +(0306 void pinit\(void\);) 144.161 Tj 0 -94.9336 Td -(0307 // swtch.S) 65.5277 Tj +(0307 void procdump\(void\);) 157.2665 Tj 0 -104.427 Td -(0308 void swtch\(struct context*, struct context*\);) 266.4794 Tj +(0308 void scheduler\(void\) __attribute__\(\(noretur\ +n\)\);) 275.2164 Tj 0 -113.9203 Td -(0309 ) 21.8426 Tj +(0309 void ksegment\(void\);) 157.2665 Tj 0 -123.4137 Td -(0310 // spinlock.c) 78.6333 Tj +(0310 void usegment\(void\);) 157.2665 Tj 0 -132.9071 Td -(0311 void acquire\(struct spinlock*\);) 205.3202 Tj +(0311 void sleep\(void*, struct spinlock*\);) 227.1628 Tj 0 -142.4004 Td -(0312 void getcallerpcs\(void*, uint*\);) 209.6887 Tj +(0312 void userinit\(void\);) 157.2665 Tj 0 -151.8938 Td -(0313 int holding\(struct spinlock*\);) 205.3202 Tj +(0313 int wait\(void\);) 139.7925 Tj 0 -161.3871 Td -(0314 void initlock\(struct spinlock*, char*\);) 240.2683 Tj +(0314 void wakeup\(void*\);) 152.898 Tj 0 -170.8805 Td -(0315 void release\(struct spinlock*\);) 205.3202 Tj +(0315 void yield\(void\);) 144.161 Tj 0 -180.3739 Td -(0316 void pushcli\(\);) 135.4239 Tj +(0316 ) 21.8426 Tj 0 -189.8672 Td -(0317 void popcli\(\);) 131.0554 Tj +(0317 // swtch.S) 65.5277 Tj 0 -199.3606 Td -(0318 ) 21.8426 Tj +(0318 void swtch\(struct context**, struct context*\)\ +;) 270.8479 Tj 0 -208.8539 Td -(0319 // string.c) 69.8962 Tj +(0319 ) 21.8426 Tj 0 -218.3473 Td -(0320 int memcmp\(const void*, const void*, uint\);) 262.1109 Tj +(0320 // spinlock.c) 78.6333 Tj 0 -227.8407 Td -(0321 void* memmove\(void*, const void*, uint\);) 240.2683 Tj +(0321 void acquire\(struct spinlock*\);) 205.3202 Tj 0 -237.334 Td -(0322 void* memset\(void*, int, uint\);) 200.9517 Tj +(0322 void getcallerpcs\(void*, uint*\);) 209.6887 Tj 0 -246.8274 Td -(0323 char* safestrcpy\(char*, const char*, int\);) 249.0053 Tj +(0323 int holding\(struct spinlock*\);) 205.3202 Tj 0 -256.3207 Td -(0324 int strlen\(const char*\);) 179.1091 Tj +(0324 void initlock\(struct spinlock*, char*\);) 240.2683 Tj 0 -265.8141 Td -(0325 int strncmp\(const char*, const char*, uint\);) 266.4794 Tj +(0325 void release\(struct spinlock*\);) 205.3202 Tj 0 -275.3075 Td -(0326 char* strncpy\(char*, const char*, int\);) 235.8998 Tj +(0326 void pushcli\(\);) 135.4239 Tj 0 -284.8008 Td -(0327 ) 21.8426 Tj +(0327 void popcli\(\);) 131.0554 Tj 0 -294.2942 Td -(0328 // syscall.c) 74.2647 Tj +(0328 ) 21.8426 Tj 0 -303.7875 Td -(0329 int argint\(int, int*\);) 170.3721 Tj +(0329 // string.c) 69.8962 Tj 0 -313.2809 Td -(0330 int argptr\(int, char**, int\);) 200.9517 Tj +(0330 int memcmp\(const void*, const void*, uint\);) 262.1109 Tj 0 -322.7743 Td -(0331 int argstr\(int, char**\);) 179.1091 Tj +(0331 void* memmove\(void*, const void*, uint\);) 240.2683 Tj 0 -332.2676 Td -(0332 int fetchint\(struct proc*, uint, int*\);) 244.6368 Tj +(0332 void* memset\(void*, int, uint\);) 200.9517 Tj 0 -341.761 Td -(0333 int fetchstr\(struct proc*, uint, char**\);) 253.3738 Tj +(0333 char* safestrcpy\(char*, const char*, int\);) 249.0053 Tj 0 -351.2543 Td -(0334 void syscall\(void\);) 152.898 Tj +(0334 int strlen\(const char*\);) 179.1091 Tj 0 -360.7477 Td -(0335 ) 21.8426 Tj +(0335 int strncmp\(const char*, const char*, uint\);) 266.4794 Tj 0 -370.2411 Td -(0336 // timer.c) 65.5277 Tj +(0336 char* strncpy\(char*, const char*, int\);) 235.8998 Tj 0 -379.7344 Td -(0337 void timer_init\(void\);) 166.0035 Tj +(0337 ) 21.8426 Tj 0 -389.2278 Td -(0338 ) 21.8426 Tj +(0338 // syscall.c) 74.2647 Tj 0 -398.7211 Td -(0339 // trap.c) 61.1592 Tj +(0339 int argint\(int, int*\);) 170.3721 Tj 0 -408.2145 Td -(0340 void idtinit\(void\);) 152.898 Tj +(0340 int argptr\(int, char**, int\);) 200.9517 Tj 0 -417.7079 Td -(0341 extern int ticks;) 117.9499 Tj +(0341 int argstr\(int, char**\);) 179.1091 Tj 0 -427.2012 Td -(0342 void tvinit\(void\);) 148.5295 Tj +(0342 int fetchint\(struct proc*, uint, int*\);) 244.6368 Tj 0 -436.6946 Td -(0343 extern struct spinlock tickslock;) 166.0035 Tj +(0343 int fetchstr\(struct proc*, uint, char**\);) 253.3738 Tj 0 -446.1879 Td -(0344 ) 21.8426 Tj +(0344 void syscall\(void\);) 152.898 Tj 0 -455.6813 Td -(0345 // number of elements in fixed-size array) 200.9517 Tj +(0345 ) 21.8426 Tj 0 -465.1747 Td -(0346 #define NELEM\(x\) \(sizeof\(x\)/sizeof\(\(x\)[0]\)\)) 209.6887 Tj +(0346 // timer.c) 65.5277 Tj 0 -474.668 Td -(0347 ) 21.8426 Tj +(0347 void timerinit\(void\);) 161.635 Tj 0 -484.1614 Td (0348 ) 21.8426 Tj 0 -493.6547 Td @@ -4547,110 +4585,105 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/x86.h Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/defs.h Page 4) 161.635 Tj 0 -28.4801 Td -(0350 // Routines to let C code use special x86 instructions.) 262.1109 Tj +(0350 // trap.c) 61.1592 Tj 0 -37.9735 Td -(0351 ) 21.8426 Tj +(0351 void idtinit\(void\);) 152.898 Tj 0 -47.4668 Td -(0352 static inline uchar) 104.8443 Tj +(0352 extern int ticks;) 117.9499 Tj 0 -56.9602 Td -(0353 inb\(ushort port\)) 91.7388 Tj +(0353 void tvinit\(void\);) 148.5295 Tj 0 -66.4535 Td -(0354 {) 26.2111 Tj +(0354 extern struct spinlock tickslock;) 166.0035 Tj 0 -75.9469 Td -(0355 uchar data;) 78.6333 Tj +(0355 ) 21.8426 Tj 0 -85.4403 Td -(0356 ) 21.8426 Tj +(0356 // uart.c) 61.1592 Tj 0 -94.9336 Td -(0357 asm volatile\("in %1,%0" : "=a" \(data\) : "d" \(port\)\)\ -;) 257.7424 Tj +(0357 void uartinit\(void\);) 157.2665 Tj 0 -104.427 Td -(0358 return data;) 83.0018 Tj +(0358 void uartintr\(void\);) 157.2665 Tj 0 -113.9203 Td -(0359 }) 26.2111 Tj +(0359 void uartputc\(int\);) 152.898 Tj 0 -123.4137 Td (0360 ) 21.8426 Tj 0 -132.9071 Td -(0361 static inline void) 100.4758 Tj +(0361 // number of elements in fixed-size array) 200.9517 Tj 0 -142.4004 Td -(0362 insl\(int port, void *addr, int cnt\)) 174.7406 Tj +(0362 #define NELEM\(x\) \(sizeof\(x\)/sizeof\(\(x\)[0]\)\)) 209.6887 Tj 0 -151.8938 Td -(0363 {) 26.2111 Tj +(0363 ) 21.8426 Tj 0 -161.3871 Td -(0364 asm volatile\("cld\\n\\trepne\\n\\tinsl" :) 209.6887 Tj +(0364 ) 21.8426 Tj 0 -170.8805 Td -(0365 "=D" \(addr\), "=c" \(cnt\) :) 227.1628 Tj +(0365 ) 21.8426 Tj 0 -180.3739 Td -(0366 "d" \(port\), "0" \(addr\), "1" \(cnt\)\ - :) 262.1109 Tj +(0366 ) 21.8426 Tj 0 -189.8672 Td -(0367 "memory", "cc"\);) 174.7406 Tj +(0367 ) 21.8426 Tj 0 -199.3606 Td -(0368 }) 26.2111 Tj +(0368 ) 21.8426 Tj 0 -208.8539 Td (0369 ) 21.8426 Tj 0 -218.3473 Td -(0370 static inline void) 100.4758 Tj +(0370 ) 21.8426 Tj 0 -227.8407 Td -(0371 outb\(ushort port, uchar data\)) 148.5295 Tj +(0371 ) 21.8426 Tj 0 -237.334 Td -(0372 {) 26.2111 Tj +(0372 ) 21.8426 Tj 0 -246.8274 Td -(0373 asm volatile\("out %0,%1" : : "a" \(data\), "d" \(port\)\ -\);) 262.1109 Tj +(0373 ) 21.8426 Tj 0 -256.3207 Td -(0374 }) 26.2111 Tj +(0374 ) 21.8426 Tj 0 -265.8141 Td (0375 ) 21.8426 Tj 0 -275.3075 Td -(0376 static inline void) 100.4758 Tj +(0376 ) 21.8426 Tj 0 -284.8008 Td -(0377 outw\(ushort port, ushort data\)) 152.898 Tj +(0377 ) 21.8426 Tj 0 -294.2942 Td -(0378 {) 26.2111 Tj +(0378 ) 21.8426 Tj 0 -303.7875 Td -(0379 asm volatile\("out %0,%1" : : "a" \(data\), "d" \(port\)\ -\);) 262.1109 Tj +(0379 ) 21.8426 Tj 0 -313.2809 Td -(0380 }) 26.2111 Tj +(0380 ) 21.8426 Tj 0 -322.7743 Td (0381 ) 21.8426 Tj 0 -332.2676 Td -(0382 static inline void) 100.4758 Tj +(0382 ) 21.8426 Tj 0 -341.761 Td -(0383 outsl\(int port, const void *addr, int cnt\)) 205.3202 Tj +(0383 ) 21.8426 Tj 0 -351.2543 Td -(0384 {) 26.2111 Tj +(0384 ) 21.8426 Tj 0 -360.7477 Td -(0385 asm volatile\("cld\\n\\trepne\\n\\toutsl" :) 209.6887 Tj +(0385 ) 21.8426 Tj 0 -370.2411 Td -(0386 "=S" \(addr\), "=c" \(cnt\) :) 227.1628 Tj +(0386 ) 21.8426 Tj 0 -379.7344 Td -(0387 "d" \(port\), "0" \(addr\), "1" \(cnt\)\ - :) 262.1109 Tj +(0387 ) 21.8426 Tj 0 -389.2278 Td -(0388 "cc"\);) 131.0554 Tj +(0388 ) 21.8426 Tj 0 -398.7211 Td -(0389 }) 26.2111 Tj +(0389 ) 21.8426 Tj 0 -408.2145 Td (0390 ) 21.8426 Tj 0 -417.7079 Td -(0391 static inline uint) 100.4758 Tj +(0391 ) 21.8426 Tj 0 -427.2012 Td -(0392 read_ebp\(void\)) 83.0018 Tj +(0392 ) 21.8426 Tj 0 -436.6946 Td -(0393 {) 26.2111 Tj +(0393 ) 21.8426 Tj 0 -446.1879 Td -(0394 uint ebp;) 69.8962 Tj +(0394 ) 21.8426 Tj 0 -455.6813 Td (0395 ) 21.8426 Tj 0 -465.1747 Td -(0396 asm volatile\("movl %%ebp, %0" : "=a" \(ebp\)\);) 222.7942 Tj +(0396 ) 21.8426 Tj 0 -474.668 Td -(0397 return ebp;) 78.6333 Tj +(0397 ) 21.8426 Tj 0 -484.1614 Td -(0398 }) 26.2111 Tj +(0398 ) 21.8426 Tj 0 -493.6547 Td (0399 ) 21.8426 Tj 0 -522.1348 Td @@ -4683,6 +4716,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -4700,105 +4735,108 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/x86.h Page 2) 157.2665 Tj +(Aug 8 01:04 2009 xv6/x86.h Page 1) 157.2665 Tj 0 -28.4801 Td -(0400 struct segdesc;) 87.3703 Tj +(0400 // Routines to let C code use special x86 instructions.) 262.1109 Tj 0 -37.9735 Td (0401 ) 21.8426 Tj 0 -47.4668 Td -(0402 static inline void) 100.4758 Tj +(0402 static inline uchar) 104.8443 Tj 0 -56.9602 Td -(0403 lgdt\(struct segdesc *p, int size\)) 166.0035 Tj +(0403 inb\(ushort port\)) 91.7388 Tj 0 -66.4535 Td (0404 {) 26.2111 Tj 0 -75.9469 Td -(0405 volatile ushort pd[3];) 126.6869 Tj +(0405 uchar data;) 78.6333 Tj 0 -85.4403 Td (0406 ) 21.8426 Tj 0 -94.9336 Td -(0407 pd[0] = size-1;) 96.1073 Tj +(0407 asm volatile\("in %1,%0" : "=a" \(data\) : "d" \(port\)\)\ +;) 257.7424 Tj 0 -104.427 Td -(0408 pd[1] = \(uint\)p;) 100.4758 Tj +(0408 return data;) 83.0018 Tj 0 -113.9203 Td -(0409 pd[2] = \(uint\)p >> 16;) 126.6869 Tj +(0409 }) 26.2111 Tj 0 -123.4137 Td (0410 ) 21.8426 Tj 0 -132.9071 Td -(0411 asm volatile\("lgdt \(%0\)" : : "r" \(pd\)\);) 200.9517 Tj +(0411 static inline void) 100.4758 Tj 0 -142.4004 Td -(0412 }) 26.2111 Tj +(0412 insl\(int port, void *addr, int cnt\)) 174.7406 Tj 0 -151.8938 Td -(0413 ) 21.8426 Tj +(0413 {) 26.2111 Tj 0 -161.3871 Td -(0414 struct gatedesc;) 91.7388 Tj +(0414 asm volatile\("cld; rep insl" :) 161.635 Tj 0 -170.8805 Td -(0415 ) 21.8426 Tj +(0415 "=D" \(addr\), "=c" \(cnt\) :) 196.5831 Tj 0 -180.3739 Td -(0416 static inline void) 100.4758 Tj +(0416 "d" \(port\), "0" \(addr\), "1" \(cnt\) :) 240.2683 Tj 0 -189.8672 Td -(0417 lidt\(struct gatedesc *p, int size\)) 170.3721 Tj +(0417 "memory", "cc"\);) 157.2665 Tj 0 -199.3606 Td -(0418 {) 26.2111 Tj +(0418 }) 26.2111 Tj 0 -208.8539 Td -(0419 volatile ushort pd[3];) 126.6869 Tj +(0419 ) 21.8426 Tj 0 -218.3473 Td -(0420 ) 21.8426 Tj +(0420 static inline void) 100.4758 Tj 0 -227.8407 Td -(0421 pd[0] = size-1;) 96.1073 Tj +(0421 outb\(ushort port, uchar data\)) 148.5295 Tj 0 -237.334 Td -(0422 pd[1] = \(uint\)p;) 100.4758 Tj +(0422 {) 26.2111 Tj 0 -246.8274 Td -(0423 pd[2] = \(uint\)p >> 16;) 126.6869 Tj +(0423 asm volatile\("out %0,%1" : : "a" \(data\), "d" \(port\)\ +\);) 262.1109 Tj 0 -256.3207 Td -(0424 ) 21.8426 Tj +(0424 }) 26.2111 Tj 0 -265.8141 Td -(0425 asm volatile\("lidt \(%0\)" : : "r" \(pd\)\);) 200.9517 Tj +(0425 ) 21.8426 Tj 0 -275.3075 Td -(0426 }) 26.2111 Tj +(0426 static inline void) 100.4758 Tj 0 -284.8008 Td -(0427 ) 21.8426 Tj +(0427 outw\(ushort port, ushort data\)) 152.898 Tj 0 -294.2942 Td -(0428 static inline void) 100.4758 Tj +(0428 {) 26.2111 Tj 0 -303.7875 Td -(0429 ltr\(ushort sel\)) 87.3703 Tj +(0429 asm volatile\("out %0,%1" : : "a" \(data\), "d" \(port\)\ +\);) 262.1109 Tj 0 -313.2809 Td -(0430 {) 26.2111 Tj +(0430 }) 26.2111 Tj 0 -322.7743 Td -(0431 asm volatile\("ltr %0" : : "r" \(sel\)\);) 192.2146 Tj +(0431 ) 21.8426 Tj 0 -332.2676 Td -(0432 }) 26.2111 Tj +(0432 static inline void) 100.4758 Tj 0 -341.761 Td -(0433 ) 21.8426 Tj +(0433 outsl\(int port, const void *addr, int cnt\)) 205.3202 Tj 0 -351.2543 Td -(0434 static inline uint) 100.4758 Tj +(0434 {) 26.2111 Tj 0 -360.7477 Td -(0435 read_eflags\(void\)) 96.1073 Tj +(0435 asm volatile\("cld; rep outsl" :) 166.0035 Tj 0 -370.2411 Td -(0436 {) 26.2111 Tj +(0436 "=S" \(addr\), "=c" \(cnt\) :) 196.5831 Tj 0 -379.7344 Td -(0437 uint eflags;) 83.0018 Tj +(0437 "d" \(port\), "0" \(addr\), "1" \(cnt\) :) 240.2683 Tj 0 -389.2278 Td -(0438 asm volatile\("pushfl; popl %0" : "=r" \(eflags\)\);) 240.2683 Tj +(0438 "cc"\);) 113.5814 Tj 0 -398.7211 Td -(0439 return eflags;) 91.7388 Tj +(0439 }) 26.2111 Tj 0 -408.2145 Td -(0440 }) 26.2111 Tj +(0440 ) 21.8426 Tj 0 -417.7079 Td -(0441 ) 21.8426 Tj +(0441 static inline void) 100.4758 Tj 0 -427.2012 Td -(0442 static inline void) 100.4758 Tj +(0442 stosb\(void *addr, int data, int cnt\)) 179.1091 Tj 0 -436.6946 Td -(0443 write_eflags\(uint eflags\)) 131.0554 Tj +(0443 {) 26.2111 Tj 0 -446.1879 Td -(0444 {) 26.2111 Tj +(0444 asm volatile\("cld; rep stosb" :) 166.0035 Tj 0 -455.6813 Td -(0445 asm volatile\("pushl %0; popfl" : : "r" \(eflags\)\);) 244.6368 Tj +(0445 "=D" \(addr\), "=c" \(cnt\) :) 196.5831 Tj 0 -465.1747 Td -(0446 }) 26.2111 Tj +(0446 "0" \(addr\), "1" \(cnt\), "a" \(data\) :) 240.2683 Tj 0 -474.668 Td -(0447 ) 21.8426 Tj +(0447 "memory", "cc"\);) 157.2665 Tj 0 -484.1614 Td -(0448 ) 21.8426 Tj +(0448 }) 26.2111 Tj 0 -493.6547 Td (0449 ) 21.8426 Tj 0 -522.1348 Td @@ -4819,107 +4857,107 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/x86.h Page 3) 157.2665 Tj +(Aug 8 01:04 2009 xv6/x86.h Page 2) 157.2665 Tj 0 -28.4801 Td -(0450 static inline uint) 100.4758 Tj +(0450 struct segdesc;) 87.3703 Tj 0 -37.9735 Td -(0451 xchg\(volatile uint *addr, uint newval\)) 187.8461 Tj +(0451 ) 21.8426 Tj 0 -47.4668 Td -(0452 {) 26.2111 Tj +(0452 static inline void) 100.4758 Tj 0 -56.9602 Td -(0453 uint result;) 83.0018 Tj +(0453 lgdt\(struct segdesc *p, int size\)) 166.0035 Tj 0 -66.4535 Td -(0454 ) 21.8426 Tj +(0454 {) 26.2111 Tj 0 -75.9469 Td -(0455 // The + in "+m" denotes a read-modify-write operand.) 262.1109 Tj +(0455 volatile ushort pd[3];) 126.6869 Tj 0 -85.4403 Td -(0456 asm volatile\("lock; xchgl %0, %1" :) 183.4776 Tj +(0456 ) 21.8426 Tj 0 -94.9336 Td -(0457 "+m" \(*addr\), "=a" \(result\) :) 214.0572 Tj +(0457 pd[0] = size-1;) 96.1073 Tj 0 -104.427 Td -(0458 "1" \(newval\) :) 148.5295 Tj +(0458 pd[1] = \(uint\)p;) 100.4758 Tj 0 -113.9203 Td -(0459 "cc"\);) 113.5814 Tj +(0459 pd[2] = \(uint\)p >> 16;) 126.6869 Tj 0 -123.4137 Td -(0460 return result;) 91.7388 Tj +(0460 ) 21.8426 Tj 0 -132.9071 Td -(0461 }) 26.2111 Tj +(0461 asm volatile\("lgdt \(%0\)" : : "r" \(pd\)\);) 200.9517 Tj 0 -142.4004 Td -(0462 ) 21.8426 Tj +(0462 }) 26.2111 Tj 0 -151.8938 Td -(0463 static inline void) 100.4758 Tj +(0463 ) 21.8426 Tj 0 -161.3871 Td -(0464 cli\(void\)) 61.1592 Tj +(0464 struct gatedesc;) 91.7388 Tj 0 -170.8805 Td -(0465 {) 26.2111 Tj +(0465 ) 21.8426 Tj 0 -180.3739 Td -(0466 asm volatile\("cli"\);) 117.9499 Tj +(0466 static inline void) 100.4758 Tj 0 -189.8672 Td -(0467 }) 26.2111 Tj +(0467 lidt\(struct gatedesc *p, int size\)) 170.3721 Tj 0 -199.3606 Td -(0468 ) 21.8426 Tj +(0468 {) 26.2111 Tj 0 -208.8539 Td -(0469 static inline void) 100.4758 Tj +(0469 volatile ushort pd[3];) 126.6869 Tj 0 -218.3473 Td -(0470 sti\(void\)) 61.1592 Tj +(0470 ) 21.8426 Tj 0 -227.8407 Td -(0471 {) 26.2111 Tj +(0471 pd[0] = size-1;) 96.1073 Tj 0 -237.334 Td -(0472 asm volatile\("sti"\);) 117.9499 Tj +(0472 pd[1] = \(uint\)p;) 100.4758 Tj 0 -246.8274 Td -(0473 }) 26.2111 Tj +(0473 pd[2] = \(uint\)p >> 16;) 126.6869 Tj 0 -256.3207 Td (0474 ) 21.8426 Tj 0 -265.8141 Td -(0475 // Layout of the trap frame built on the stack by the) 253.3738 Tj +(0475 asm volatile\("lidt \(%0\)" : : "r" \(pd\)\);) 200.9517 Tj 0 -275.3075 Td -(0476 // hardware and by trapasm.S, and passed to trap\(\).) 244.6368 Tj +(0476 }) 26.2111 Tj 0 -284.8008 Td -(0477 struct trapframe {) 100.4758 Tj +(0477 ) 21.8426 Tj 0 -294.2942 Td -(0478 // registers as pushed by pusha) 166.0035 Tj +(0478 static inline void) 100.4758 Tj 0 -303.7875 Td -(0479 uint edi;) 69.8962 Tj +(0479 ltr\(ushort sel\)) 87.3703 Tj 0 -313.2809 Td -(0480 uint esi;) 69.8962 Tj +(0480 {) 26.2111 Tj 0 -322.7743 Td -(0481 uint ebp;) 69.8962 Tj +(0481 asm volatile\("ltr %0" : : "r" \(sel\)\);) 192.2146 Tj 0 -332.2676 Td -(0482 uint oesp; // useless & ignored) 187.8461 Tj +(0482 }) 26.2111 Tj 0 -341.761 Td -(0483 uint ebx;) 69.8962 Tj +(0483 ) 21.8426 Tj 0 -351.2543 Td -(0484 uint edx;) 69.8962 Tj +(0484 static inline uint) 100.4758 Tj 0 -360.7477 Td -(0485 uint ecx;) 69.8962 Tj +(0485 readeflags\(void\)) 91.7388 Tj 0 -370.2411 Td -(0486 uint eax;) 69.8962 Tj +(0486 {) 26.2111 Tj 0 -379.7344 Td -(0487 ) 21.8426 Tj +(0487 uint eflags;) 83.0018 Tj 0 -389.2278 Td -(0488 // rest of trap frame) 122.3184 Tj +(0488 asm volatile\("pushfl; popl %0" : "=r" \(eflags\)\);) 240.2683 Tj 0 -398.7211 Td -(0489 ushort es;) 74.2647 Tj +(0489 return eflags;) 91.7388 Tj 0 -408.2145 Td -(0490 ushort padding1;) 100.4758 Tj +(0490 }) 26.2111 Tj 0 -417.7079 Td -(0491 ushort ds;) 74.2647 Tj +(0491 ) 21.8426 Tj 0 -427.2012 Td -(0492 ushort padding2;) 100.4758 Tj +(0492 ) 21.8426 Tj 0 -436.6946 Td -(0493 uint trapno;) 83.0018 Tj +(0493 ) 21.8426 Tj 0 -446.1879 Td (0494 ) 21.8426 Tj 0 -455.6813 Td -(0495 // below here defined by x86 hardware) 192.2146 Tj +(0495 ) 21.8426 Tj 0 -465.1747 Td -(0496 uint err;) 69.8962 Tj +(0496 ) 21.8426 Tj 0 -474.668 Td -(0497 uint eip;) 69.8962 Tj +(0497 ) 21.8426 Tj 0 -484.1614 Td -(0498 ushort cs;) 74.2647 Tj +(0498 ) 21.8426 Tj 0 -493.6547 Td -(0499 ushort padding3;) 100.4758 Tj +(0499 ) 21.8426 Tj 0 -522.1348 Td (Sheet 04) 34.9481 Tj Q @@ -4950,6 +4988,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -4967,70 +5007,69 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/x86.h Page 4) 157.2665 Tj +(Aug 8 01:04 2009 xv6/x86.h Page 3) 157.2665 Tj 0 -28.4801 Td -(0500 uint eflags;) 83.0018 Tj +(0500 static inline uint) 100.4758 Tj 0 -37.9735 Td -(0501 ) 21.8426 Tj +(0501 xchg\(volatile uint *addr, uint newval\)) 187.8461 Tj 0 -47.4668 Td -(0502 // below here only when crossing rings, such as from use\ -r to kernel) 323.2701 Tj +(0502 {) 26.2111 Tj 0 -56.9602 Td -(0503 uint esp;) 69.8962 Tj +(0503 uint result;) 83.0018 Tj 0 -66.4535 Td -(0504 ushort ss;) 74.2647 Tj +(0504 ) 21.8426 Tj 0 -75.9469 Td -(0505 ushort padding4;) 100.4758 Tj +(0505 // The + in "+m" denotes a read-modify-write operand.) 262.1109 Tj 0 -85.4403 Td -(0506 };) 30.5796 Tj +(0506 asm volatile\("lock; xchgl %0, %1" :) 183.4776 Tj 0 -94.9336 Td -(0507 ) 21.8426 Tj +(0507 "+m" \(*addr\), "=a" \(result\) :) 214.0572 Tj 0 -104.427 Td -(0508 ) 21.8426 Tj +(0508 "1" \(newval\) :) 148.5295 Tj 0 -113.9203 Td -(0509 ) 21.8426 Tj +(0509 "cc"\);) 113.5814 Tj 0 -123.4137 Td -(0510 ) 21.8426 Tj +(0510 return result;) 91.7388 Tj 0 -132.9071 Td -(0511 ) 21.8426 Tj +(0511 }) 26.2111 Tj 0 -142.4004 Td (0512 ) 21.8426 Tj 0 -151.8938 Td -(0513 ) 21.8426 Tj +(0513 static inline void) 100.4758 Tj 0 -161.3871 Td -(0514 ) 21.8426 Tj +(0514 loadfsgs\(ushort v\)) 100.4758 Tj 0 -170.8805 Td -(0515 ) 21.8426 Tj +(0515 {) 26.2111 Tj 0 -180.3739 Td -(0516 ) 21.8426 Tj +(0516 asm volatile\("movw %0, %%fs" : : "r" \(v\)\);) 214.0572 Tj 0 -189.8672 Td -(0517 ) 21.8426 Tj +(0517 asm volatile\("movw %0, %%gs" : : "r" \(v\)\);) 214.0572 Tj 0 -199.3606 Td -(0518 ) 21.8426 Tj +(0518 }) 26.2111 Tj 0 -208.8539 Td (0519 ) 21.8426 Tj 0 -218.3473 Td -(0520 ) 21.8426 Tj +(0520 static inline void) 100.4758 Tj 0 -227.8407 Td -(0521 ) 21.8426 Tj +(0521 cli\(void\)) 61.1592 Tj 0 -237.334 Td -(0522 ) 21.8426 Tj +(0522 {) 26.2111 Tj 0 -246.8274 Td -(0523 ) 21.8426 Tj +(0523 asm volatile\("cli"\);) 117.9499 Tj 0 -256.3207 Td -(0524 ) 21.8426 Tj +(0524 }) 26.2111 Tj 0 -265.8141 Td (0525 ) 21.8426 Tj 0 -275.3075 Td -(0526 ) 21.8426 Tj +(0526 static inline void) 100.4758 Tj 0 -284.8008 Td -(0527 ) 21.8426 Tj +(0527 sti\(void\)) 61.1592 Tj 0 -294.2942 Td -(0528 ) 21.8426 Tj +(0528 {) 26.2111 Tj 0 -303.7875 Td -(0529 ) 21.8426 Tj +(0529 asm volatile\("sti"\);) 117.9499 Tj 0 -313.2809 Td -(0530 ) 21.8426 Tj +(0530 }) 26.2111 Tj 0 -322.7743 Td (0531 ) 21.8426 Tj 0 -332.2676 Td @@ -5087,89 +5126,80 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/asm.h Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/x86.h Page 4) 157.2665 Tj 0 -28.4801 Td -(0550 //) 30.5796 Tj +(0550 // Layout of the trap frame built on the stack by the) 253.3738 Tj 0 -37.9735 Td -(0551 // assembler macros to create x86 segments) 205.3202 Tj +(0551 // hardware and by trapasm.S, and passed to trap\(\).) 244.6368 Tj 0 -47.4668 Td -(0552 //) 30.5796 Tj +(0552 struct trapframe {) 100.4758 Tj 0 -56.9602 Td -(0553 ) 21.8426 Tj +(0553 // registers as pushed by pusha) 166.0035 Tj 0 -66.4535 Td -(0554 #define SEG_NULLASM \ - \\) 305.796 Tj +(0554 uint edi;) 69.8962 Tj 0 -75.9469 Td -(0555 .word 0, 0; \ - \\) 305.796 Tj +(0555 uint esi;) 69.8962 Tj 0 -85.4403 Td -(0556 .byte 0, 0, 0, 0) 126.6869 Tj +(0556 uint ebp;) 69.8962 Tj 0 -94.9336 Td -(0557 ) 21.8426 Tj +(0557 uint oesp; // useless & ignored) 187.8461 Tj 0 -104.427 Td -(0558 #define SEG_ASM\(type,base,lim\) \ - \\) 305.796 Tj +(0558 uint ebx;) 69.8962 Tj 0 -113.9203 Td -(0559 .word \(\(\(lim\) >> 12\) & 0xffff\), \(\(base\) &\ - 0xffff\); \\) 305.796 Tj +(0559 uint edx;) 69.8962 Tj 0 -123.4137 Td -(0560 .byte \(\(\(base\) >> 16\) & 0xff\), \(0x90 | \(ty\ -pe\)\), \\) 305.796 Tj +(0560 uint ecx;) 69.8962 Tj 0 -132.9071 Td -(0561 \(0xC0 | \(\(\(lim\) >> 28\) & 0xf\)\), \(\ -\(\(base\) >> 24\) & 0xff\)) 332.0071 Tj +(0561 uint eax;) 69.8962 Tj 0 -142.4004 Td (0562 ) 21.8426 Tj 0 -151.8938 Td -(0563 #define STA_X 0x8 // Executable segment) 235.8998 Tj +(0563 // rest of trap frame) 122.3184 Tj 0 -161.3871 Td -(0564 #define STA_E 0x4 // Expand down \(non-executabl\ -e segments\)) 318.9016 Tj +(0564 ushort gs;) 74.2647 Tj 0 -170.8805 Td -(0565 #define STA_C 0x4 // Conforming code segment \(e\ -xecutable only\)) 336.3756 Tj +(0565 ushort padding1;) 100.4758 Tj 0 -180.3739 Td -(0566 #define STA_W 0x2 // Writeable \(non-executable \ -segments\)) 310.1645 Tj +(0566 ushort fs;) 74.2647 Tj 0 -189.8672 Td -(0567 #define STA_R 0x2 // Readable \(executable segme\ -nts\)) 288.322 Tj +(0567 ushort padding2;) 100.4758 Tj 0 -199.3606 Td -(0568 #define STA_A 0x1 // Accessed) 192.2146 Tj +(0568 ushort es;) 74.2647 Tj 0 -208.8539 Td -(0569 ) 21.8426 Tj +(0569 ushort padding3;) 100.4758 Tj 0 -218.3473 Td -(0570 ) 21.8426 Tj +(0570 ushort ds;) 74.2647 Tj 0 -227.8407 Td -(0571 ) 21.8426 Tj +(0571 ushort padding4;) 100.4758 Tj 0 -237.334 Td -(0572 ) 21.8426 Tj +(0572 uint trapno;) 83.0018 Tj 0 -246.8274 Td (0573 ) 21.8426 Tj 0 -256.3207 Td -(0574 ) 21.8426 Tj +(0574 // below here defined by x86 hardware) 192.2146 Tj 0 -265.8141 Td -(0575 ) 21.8426 Tj +(0575 uint err;) 69.8962 Tj 0 -275.3075 Td -(0576 ) 21.8426 Tj +(0576 uint eip;) 69.8962 Tj 0 -284.8008 Td -(0577 ) 21.8426 Tj +(0577 ushort cs;) 74.2647 Tj 0 -294.2942 Td -(0578 ) 21.8426 Tj +(0578 ushort padding5;) 100.4758 Tj 0 -303.7875 Td -(0579 ) 21.8426 Tj +(0579 uint eflags;) 83.0018 Tj 0 -313.2809 Td (0580 ) 21.8426 Tj 0 -322.7743 Td -(0581 ) 21.8426 Tj +(0581 // below here only when crossing rings, such as from use\ +r to kernel) 323.2701 Tj 0 -332.2676 Td -(0582 ) 21.8426 Tj +(0582 uint esp;) 69.8962 Tj 0 -341.761 Td -(0583 ) 21.8426 Tj +(0583 ushort ss;) 74.2647 Tj 0 -351.2543 Td -(0584 ) 21.8426 Tj +(0584 ushort padding6;) 100.4758 Tj 0 -360.7477 Td -(0585 ) 21.8426 Tj +(0585 };) 30.5796 Tj 0 -370.2411 Td (0586 ) 21.8426 Tj 0 -379.7344 Td @@ -5228,6 +5258,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -5245,103 +5277,101 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/mmu.h Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/asm.h Page 1) 157.2665 Tj 0 -28.4801 Td -(0600 // This file contains definitions for the) 200.9517 Tj +(0600 //) 30.5796 Tj 0 -37.9735 Td -(0601 // x86 memory management unit \(MMU\).) 179.1091 Tj +(0601 // assembler macros to create x86 segments) 205.3202 Tj 0 -47.4668 Td -(0602 ) 21.8426 Tj +(0602 //) 30.5796 Tj 0 -56.9602 Td -(0603 // Eflags register) 100.4758 Tj +(0603 ) 21.8426 Tj 0 -66.4535 Td -(0604 #define FL_CF 0x00000001 // Carry Flag) 253.3738 Tj +(0604 #define SEG_NULLASM \ + \\) 305.796 Tj 0 -75.9469 Td -(0605 #define FL_PF 0x00000004 // Parity Flag) 257.7424 Tj +(0605 .word 0, 0; \ + \\) 305.796 Tj 0 -85.4403 Td -(0606 #define FL_AF 0x00000010 // Auxiliary carry\ - Flag) 297.059 Tj +(0606 .byte 0, 0, 0, 0) 126.6869 Tj 0 -94.9336 Td -(0607 #define FL_ZF 0x00000040 // Zero Flag) 249.0053 Tj +(0607 ) 21.8426 Tj 0 -104.427 Td -(0608 #define FL_SF 0x00000080 // Sign Flag) 249.0053 Tj +(0608 #define SEG_ASM\(type,base,lim\) \ + \\) 305.796 Tj 0 -113.9203 Td -(0609 #define FL_TF 0x00000100 // Trap Flag) 249.0053 Tj +(0609 .word \(\(\(lim\) >> 12\) & 0xffff\), \(\(base\) &\ + 0xffff\); \\) 305.796 Tj 0 -123.4137 Td -(0610 #define FL_IF 0x00000200 // Interrupt Enabl\ -e) 279.5849 Tj +(0610 .byte \(\(\(base\) >> 16\) & 0xff\), \(0x90 | \(ty\ +pe\)\), \\) 305.796 Tj 0 -132.9071 Td -(0611 #define FL_DF 0x00000400 // Direction Flag) 270.8479 Tj +(0611 \(0xC0 | \(\(\(lim\) >> 28\) & 0xf\)\), \(\ +\(\(base\) >> 24\) & 0xff\)) 332.0071 Tj 0 -142.4004 Td -(0612 #define FL_OF 0x00000800 // Overflow Flag) 266.4794 Tj +(0612 ) 21.8426 Tj 0 -151.8938 Td -(0613 #define FL_IOPL_MASK 0x00003000 // I/O Privilege L\ -evel bitmask) 327.6386 Tj +(0613 #define STA_X 0x8 // Executable segment) 235.8998 Tj 0 -161.3871 Td -(0614 #define FL_IOPL_0 0x00000000 // IOPL == 0) 257.7424 Tj +(0614 #define STA_E 0x4 // Expand down \(non-executabl\ +e segments\)) 318.9016 Tj 0 -170.8805 Td -(0615 #define FL_IOPL_1 0x00001000 // IOPL == 1) 257.7424 Tj +(0615 #define STA_C 0x4 // Conforming code segment \(e\ +xecutable only\)) 336.3756 Tj 0 -180.3739 Td -(0616 #define FL_IOPL_2 0x00002000 // IOPL == 2) 257.7424 Tj +(0616 #define STA_W 0x2 // Writeable \(non-executable \ +segments\)) 310.1645 Tj 0 -189.8672 Td -(0617 #define FL_IOPL_3 0x00003000 // IOPL == 3) 257.7424 Tj +(0617 #define STA_R 0x2 // Readable \(executable segme\ +nts\)) 288.322 Tj 0 -199.3606 Td -(0618 #define FL_NT 0x00004000 // Nested Task) 257.7424 Tj +(0618 #define STA_A 0x1 // Accessed) 192.2146 Tj 0 -208.8539 Td -(0619 #define FL_RF 0x00010000 // Resume Flag) 257.7424 Tj +(0619 ) 21.8426 Tj 0 -218.3473 Td -(0620 #define FL_VM 0x00020000 // Virtual 8086 mo\ -de) 283.9534 Tj +(0620 ) 21.8426 Tj 0 -227.8407 Td -(0621 #define FL_AC 0x00040000 // Alignment Check) 275.2164 Tj +(0621 ) 21.8426 Tj 0 -237.334 Td -(0622 #define FL_VIF 0x00080000 // Virtual Interru\ -pt Flag) 305.796 Tj +(0622 ) 21.8426 Tj 0 -246.8274 Td -(0623 #define FL_VIP 0x00100000 // Virtual Interru\ -pt Pending) 318.9016 Tj +(0623 ) 21.8426 Tj 0 -256.3207 Td -(0624 #define FL_ID 0x00200000 // ID flag) 240.2683 Tj +(0624 ) 21.8426 Tj 0 -265.8141 Td (0625 ) 21.8426 Tj 0 -275.3075 Td -(0626 // Segment Descriptor) 113.5814 Tj +(0626 ) 21.8426 Tj 0 -284.8008 Td -(0627 struct segdesc {) 91.7388 Tj +(0627 ) 21.8426 Tj 0 -294.2942 Td -(0628 uint lim_15_0 : 16; // Low bits of segment limit) 244.6368 Tj +(0628 ) 21.8426 Tj 0 -303.7875 Td -(0629 uint base_15_0 : 16; // Low bits of segment base address) 275.2164 Tj +(0629 ) 21.8426 Tj 0 -313.2809 Td -(0630 uint base_23_16 : 8; // Middle bits of segment base addr\ -ess) 288.322 Tj +(0630 ) 21.8426 Tj 0 -322.7743 Td -(0631 uint type : 4; // Segment type \(see STS_ constant\ -s\)) 279.5849 Tj +(0631 ) 21.8426 Tj 0 -332.2676 Td -(0632 uint s : 1; // 0 = system, 1 = application) 253.3738 Tj +(0632 ) 21.8426 Tj 0 -341.761 Td -(0633 uint dpl : 2; // Descriptor Privilege Level) 249.0053 Tj +(0633 ) 21.8426 Tj 0 -351.2543 Td -(0634 uint p : 1; // Present) 166.0035 Tj +(0634 ) 21.8426 Tj 0 -360.7477 Td -(0635 uint lim_19_16 : 4; // High bits of segment limit) 249.0053 Tj +(0635 ) 21.8426 Tj 0 -370.2411 Td -(0636 uint avl : 1; // Unused \(available for software \ -use\)) 288.322 Tj +(0636 ) 21.8426 Tj 0 -379.7344 Td -(0637 uint rsv1 : 1; // Reserved) 170.3721 Tj +(0637 ) 21.8426 Tj 0 -389.2278 Td -(0638 uint db : 1; // 0 = 16-bit segment, 1 = 32-bit s\ -egment) 301.4275 Tj +(0638 ) 21.8426 Tj 0 -398.7211 Td -(0639 uint g : 1; // Granularity: limit scaled by 4K \ -when set) 310.1645 Tj +(0639 ) 21.8426 Tj 0 -408.2145 Td -(0640 uint base_31_24 : 8; // High bits of segment base addres\ -s) 279.5849 Tj +(0640 ) 21.8426 Tj 0 -417.7079 Td -(0641 };) 30.5796 Tj +(0641 ) 21.8426 Tj 0 -427.2012 Td (0642 ) 21.8426 Tj 0 -436.6946 Td @@ -5376,103 +5406,103 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/mmu.h Page 2) 157.2665 Tj +(Aug 8 01:04 2009 xv6/mmu.h Page 1) 157.2665 Tj 0 -28.4801 Td -(0650 // Null segment) 87.3703 Tj +(0650 // This file contains definitions for the) 200.9517 Tj 0 -37.9735 Td -(0651 #define SEG_NULL \(struct segdesc\){ 0,0,0,0,0,0,0,\ -0,0,0,0,0,0 }) 323.2701 Tj +(0651 // x86 memory management unit \(MMU\).) 179.1091 Tj 0 -47.4668 Td (0652 ) 21.8426 Tj 0 -56.9602 Td -(0653 // Normal segment) 96.1073 Tj +(0653 // Eflags register) 100.4758 Tj 0 -66.4535 Td -(0654 #define SEG\(type, base, lim, dpl\) \(struct segdesc\) \ - \\) 340.7441 Tj +(0654 #define FL_CF 0x00000001 // Carry Flag) 253.3738 Tj 0 -75.9469 Td -(0655 { \(\(lim\) >> 12\) & 0xffff, \(base\) & 0xffff, \(\(base\)\ - >> 16\) & 0xff, \\) 340.7441 Tj +(0655 #define FL_PF 0x00000004 // Parity Flag) 257.7424 Tj 0 -85.4403 Td -(0656 type, 1, dpl, 1, \(uint\) \(lim\) >> 28, 0, 0, 1, 1, \ - \\) 340.7441 Tj +(0656 #define FL_AF 0x00000010 // Auxiliary carry\ + Flag) 297.059 Tj 0 -94.9336 Td -(0657 \(uint\) \(base\) >> 24 }) 131.0554 Tj +(0657 #define FL_ZF 0x00000040 // Zero Flag) 249.0053 Tj 0 -104.427 Td -(0658 ) 21.8426 Tj +(0658 #define FL_SF 0x00000080 // Sign Flag) 249.0053 Tj 0 -113.9203 Td -(0659 #define SEG16\(type, base, lim, dpl\) \(struct segdesc\) \ - \\) 340.7441 Tj +(0659 #define FL_TF 0x00000100 // Trap Flag) 249.0053 Tj 0 -123.4137 Td -(0660 { \(lim\) & 0xffff, \(base\) & 0xffff, \(\(base\) >> 16\) \ -& 0xff, \\) 340.7441 Tj +(0660 #define FL_IF 0x00000200 // Interrupt Enabl\ +e) 279.5849 Tj 0 -132.9071 Td -(0661 type, 1, dpl, 1, \(uint\) \(lim\) >> 16, 0, 0, 1, 0, \ - \\) 340.7441 Tj +(0661 #define FL_DF 0x00000400 // Direction Flag) 270.8479 Tj 0 -142.4004 Td -(0662 \(uint\) \(base\) >> 24 }) 131.0554 Tj +(0662 #define FL_OF 0x00000800 // Overflow Flag) 266.4794 Tj 0 -151.8938 Td -(0663 ) 21.8426 Tj +(0663 #define FL_IOPL_MASK 0x00003000 // I/O Privilege L\ +evel bitmask) 327.6386 Tj 0 -161.3871 Td -(0664 #define DPL_USER 0x3 // User DPL) 192.2146 Tj +(0664 #define FL_IOPL_0 0x00000000 // IOPL == 0) 257.7424 Tj 0 -170.8805 Td -(0665 ) 21.8426 Tj +(0665 #define FL_IOPL_1 0x00001000 // IOPL == 1) 257.7424 Tj 0 -180.3739 Td -(0666 // Application segment type bits) 161.635 Tj +(0666 #define FL_IOPL_2 0x00002000 // IOPL == 2) 257.7424 Tj 0 -189.8672 Td -(0667 #define STA_X 0x8 // Executable segment) 235.8998 Tj +(0667 #define FL_IOPL_3 0x00003000 // IOPL == 3) 257.7424 Tj 0 -199.3606 Td -(0668 #define STA_E 0x4 // Expand down \(non-executabl\ -e segments\)) 318.9016 Tj +(0668 #define FL_NT 0x00004000 // Nested Task) 257.7424 Tj 0 -208.8539 Td -(0669 #define STA_C 0x4 // Conforming code segment \(e\ -xecutable only\)) 336.3756 Tj +(0669 #define FL_RF 0x00010000 // Resume Flag) 257.7424 Tj 0 -218.3473 Td -(0670 #define STA_W 0x2 // Writeable \(non-executable \ -segments\)) 310.1645 Tj +(0670 #define FL_VM 0x00020000 // Virtual 8086 mo\ +de) 283.9534 Tj 0 -227.8407 Td -(0671 #define STA_R 0x2 // Readable \(executable segme\ -nts\)) 288.322 Tj +(0671 #define FL_AC 0x00040000 // Alignment Check) 275.2164 Tj 0 -237.334 Td -(0672 #define STA_A 0x1 // Accessed) 192.2146 Tj +(0672 #define FL_VIF 0x00080000 // Virtual Interru\ +pt Flag) 305.796 Tj 0 -246.8274 Td -(0673 ) 21.8426 Tj +(0673 #define FL_VIP 0x00100000 // Virtual Interru\ +pt Pending) 318.9016 Tj 0 -256.3207 Td -(0674 // System segment type bits) 139.7925 Tj +(0674 #define FL_ID 0x00200000 // ID flag) 240.2683 Tj 0 -265.8141 Td -(0675 #define STS_T16A 0x1 // Available 16-bit TSS) 244.6368 Tj +(0675 ) 21.8426 Tj 0 -275.3075 Td -(0676 #define STS_LDT 0x2 // Local Descriptor Table) 253.3738 Tj +(0676 // Segment Descriptor) 113.5814 Tj 0 -284.8008 Td -(0677 #define STS_T16B 0x3 // Busy 16-bit TSS) 222.7942 Tj +(0677 struct segdesc {) 91.7388 Tj 0 -294.2942 Td -(0678 #define STS_CG16 0x4 // 16-bit Call Gate) 227.1628 Tj +(0678 uint lim_15_0 : 16; // Low bits of segment limit) 244.6368 Tj 0 -303.7875 Td -(0679 #define STS_TG 0x5 // Task Gate / Coum Transmitio\ -ns) 283.9534 Tj +(0679 uint base_15_0 : 16; // Low bits of segment base address) 275.2164 Tj 0 -313.2809 Td -(0680 #define STS_IG16 0x6 // 16-bit Interrupt Gate) 249.0053 Tj +(0680 uint base_23_16 : 8; // Middle bits of segment base addr\ +ess) 288.322 Tj 0 -322.7743 Td -(0681 #define STS_TG16 0x7 // 16-bit Trap Gate) 227.1628 Tj +(0681 uint type : 4; // Segment type \(see STS_ constant\ +s\)) 279.5849 Tj 0 -332.2676 Td -(0682 #define STS_T32A 0x9 // Available 32-bit TSS) 244.6368 Tj +(0682 uint s : 1; // 0 = system, 1 = application) 253.3738 Tj 0 -341.761 Td -(0683 #define STS_T32B 0xB // Busy 32-bit TSS) 222.7942 Tj +(0683 uint dpl : 2; // Descriptor Privilege Level) 249.0053 Tj 0 -351.2543 Td -(0684 #define STS_CG32 0xC // 32-bit Call Gate) 227.1628 Tj +(0684 uint p : 1; // Present) 166.0035 Tj 0 -360.7477 Td -(0685 #define STS_IG32 0xE // 32-bit Interrupt Gate) 249.0053 Tj +(0685 uint lim_19_16 : 4; // High bits of segment limit) 249.0053 Tj 0 -370.2411 Td -(0686 #define STS_TG32 0xF // 32-bit Trap Gate) 227.1628 Tj +(0686 uint avl : 1; // Unused \(available for software \ +use\)) 288.322 Tj 0 -379.7344 Td -(0687 ) 21.8426 Tj +(0687 uint rsv1 : 1; // Reserved) 170.3721 Tj 0 -389.2278 Td -(0688 ) 21.8426 Tj +(0688 uint db : 1; // 0 = 16-bit segment, 1 = 32-bit s\ +egment) 301.4275 Tj 0 -398.7211 Td -(0689 ) 21.8426 Tj +(0689 uint g : 1; // Granularity: limit scaled by 4K \ +when set) 310.1645 Tj 0 -408.2145 Td -(0690 ) 21.8426 Tj +(0690 uint base_31_24 : 8; // High bits of segment base addres\ +s) 279.5849 Tj 0 -417.7079 Td -(0691 ) 21.8426 Tj +(0691 };) 30.5796 Tj 0 -427.2012 Td (0692 ) 21.8426 Tj 0 -436.6946 Td @@ -5519,6 +5549,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -5536,90 +5568,98 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/mmu.h Page 3) 157.2665 Tj +(Aug 8 01:04 2009 xv6/mmu.h Page 2) 157.2665 Tj 0 -28.4801 Td -(0700 // Task state segment format) 144.161 Tj +(0700 // Normal segment) 96.1073 Tj 0 -37.9735 Td -(0701 struct taskstate {) 100.4758 Tj +(0701 #define SEG\(type, base, lim, dpl\) \(struct segdesc\) \ + \\) 340.7441 Tj 0 -47.4668 Td -(0702 uint link; // Old ts selector) 192.2146 Tj +(0702 { \(\(lim\) >> 12\) & 0xffff, \(base\) & 0xffff, \(\(base\)\ + >> 16\) & 0xff, \\) 340.7441 Tj 0 -56.9602 Td -(0703 uint esp0; // Stack pointers and segment selecto\ -rs) 283.9534 Tj +(0703 type, 1, dpl, 1, \(uint\) \(lim\) >> 28, 0, 0, 1, 1, \ + \\) 340.7441 Tj 0 -66.4535 Td -(0704 ushort ss0; // after an increase in privilege l\ -evel) 292.6905 Tj +(0704 \(uint\) \(base\) >> 24 }) 131.0554 Tj 0 -75.9469 Td -(0705 ushort padding1;) 100.4758 Tj +(0705 ) 21.8426 Tj 0 -85.4403 Td -(0706 uint *esp1;) 78.6333 Tj +(0706 #define SEG16\(type, base, lim, dpl\) \(struct segdesc\) \ + \\) 340.7441 Tj 0 -94.9336 Td -(0707 ushort ss1;) 78.6333 Tj +(0707 { \(lim\) & 0xffff, \(base\) & 0xffff, \(\(base\) >> 16\) \ +& 0xff, \\) 340.7441 Tj 0 -104.427 Td -(0708 ushort padding2;) 100.4758 Tj +(0708 type, 1, dpl, 1, \(uint\) \(lim\) >> 16, 0, 0, 1, 0, \ + \\) 340.7441 Tj 0 -113.9203 Td -(0709 uint *esp2;) 78.6333 Tj +(0709 \(uint\) \(base\) >> 24 }) 131.0554 Tj 0 -123.4137 Td -(0710 ushort ss2;) 78.6333 Tj +(0710 ) 21.8426 Tj 0 -132.9071 Td -(0711 ushort padding3;) 100.4758 Tj +(0711 #define DPL_USER 0x3 // User DPL) 192.2146 Tj 0 -142.4004 Td -(0712 void *cr3; // Page directory base) 209.6887 Tj +(0712 ) 21.8426 Tj 0 -151.8938 Td -(0713 uint *eip; // Saved state from last task switch) 270.8479 Tj +(0713 // Application segment type bits) 161.635 Tj 0 -161.3871 Td -(0714 uint eflags;) 83.0018 Tj +(0714 #define STA_X 0x8 // Executable segment) 235.8998 Tj 0 -170.8805 Td -(0715 uint eax; // More saved state \(registers\)) 249.0053 Tj +(0715 #define STA_E 0x4 // Expand down \(non-executabl\ +e segments\)) 318.9016 Tj 0 -180.3739 Td -(0716 uint ecx;) 69.8962 Tj +(0716 #define STA_C 0x4 // Conforming code segment \(e\ +xecutable only\)) 336.3756 Tj 0 -189.8672 Td -(0717 uint edx;) 69.8962 Tj +(0717 #define STA_W 0x2 // Writeable \(non-executable \ +segments\)) 310.1645 Tj 0 -199.3606 Td -(0718 uint ebx;) 69.8962 Tj +(0718 #define STA_R 0x2 // Readable \(executable segme\ +nts\)) 288.322 Tj 0 -208.8539 Td -(0719 uint *esp;) 74.2647 Tj +(0719 #define STA_A 0x1 // Accessed) 192.2146 Tj 0 -218.3473 Td -(0720 uint *ebp;) 74.2647 Tj +(0720 ) 21.8426 Tj 0 -227.8407 Td -(0721 uint esi;) 69.8962 Tj +(0721 // System segment type bits) 139.7925 Tj 0 -237.334 Td -(0722 uint edi;) 69.8962 Tj +(0722 #define STS_T16A 0x1 // Available 16-bit TSS) 244.6368 Tj 0 -246.8274 Td -(0723 ushort es; // Even more saved state \(segment se\ -lectors\)) 305.796 Tj +(0723 #define STS_LDT 0x2 // Local Descriptor Table) 253.3738 Tj 0 -256.3207 Td -(0724 ushort padding4;) 100.4758 Tj +(0724 #define STS_T16B 0x3 // Busy 16-bit TSS) 222.7942 Tj 0 -265.8141 Td -(0725 ushort cs;) 74.2647 Tj +(0725 #define STS_CG16 0x4 // 16-bit Call Gate) 227.1628 Tj 0 -275.3075 Td -(0726 ushort padding5;) 100.4758 Tj +(0726 #define STS_TG 0x5 // Task Gate / Coum Transmitio\ +ns) 283.9534 Tj 0 -284.8008 Td -(0727 ushort ss;) 74.2647 Tj +(0727 #define STS_IG16 0x6 // 16-bit Interrupt Gate) 249.0053 Tj 0 -294.2942 Td -(0728 ushort padding6;) 100.4758 Tj +(0728 #define STS_TG16 0x7 // 16-bit Trap Gate) 227.1628 Tj 0 -303.7875 Td -(0729 ushort ds;) 74.2647 Tj +(0729 #define STS_T32A 0x9 // Available 32-bit TSS) 244.6368 Tj 0 -313.2809 Td -(0730 ushort padding7;) 100.4758 Tj +(0730 #define STS_T32B 0xB // Busy 32-bit TSS) 222.7942 Tj 0 -322.7743 Td -(0731 ushort fs;) 74.2647 Tj +(0731 #define STS_CG32 0xC // 32-bit Call Gate) 227.1628 Tj 0 -332.2676 Td -(0732 ushort padding8;) 100.4758 Tj +(0732 #define STS_IG32 0xE // 32-bit Interrupt Gate) 249.0053 Tj 0 -341.761 Td -(0733 ushort gs;) 74.2647 Tj +(0733 #define STS_TG32 0xF // 32-bit Trap Gate) 227.1628 Tj 0 -351.2543 Td -(0734 ushort padding9;) 100.4758 Tj +(0734 ) 21.8426 Tj 0 -360.7477 Td -(0735 ushort ldt;) 78.6333 Tj +(0735 ) 21.8426 Tj 0 -370.2411 Td -(0736 ushort padding10;) 104.8443 Tj +(0736 ) 21.8426 Tj 0 -379.7344 Td -(0737 ushort t; // Trap on task switch) 209.6887 Tj +(0737 ) 21.8426 Tj 0 -389.2278 Td -(0738 ushort iomb; // I/O map base address) 214.0572 Tj +(0738 ) 21.8426 Tj 0 -398.7211 Td -(0739 };) 30.5796 Tj +(0739 ) 21.8426 Tj 0 -408.2145 Td (0740 ) 21.8426 Tj 0 -417.7079 Td @@ -5658,107 +5698,90 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/mmu.h Page 4) 157.2665 Tj +(Aug 8 01:04 2009 xv6/mmu.h Page 3) 157.2665 Tj 0 -28.4801 Td -(0750 // Gate descriptors for interrupts and traps) 214.0572 Tj +(0750 // Task state segment format) 144.161 Tj 0 -37.9735 Td -(0751 struct gatedesc {) 96.1073 Tj +(0751 struct taskstate {) 100.4758 Tj 0 -47.4668 Td -(0752 uint off_15_0 : 16; // low 16 bits of offset in segmen\ -t) 279.5849 Tj +(0752 uint link; // Old ts selector) 192.2146 Tj 0 -56.9602 Td -(0753 uint cs : 16; // code segment selector) 231.5313 Tj +(0753 uint esp0; // Stack pointers and segment selecto\ +rs) 283.9534 Tj 0 -66.4535 Td -(0754 uint args : 5; // # args, 0 for interrupt/trap ga\ -tes) 288.322 Tj +(0754 ushort ss0; // after an increase in privilege l\ +evel) 292.6905 Tj 0 -75.9469 Td -(0755 uint rsv1 : 3; // reserved\(should be zero I gues\ -s\)) 279.5849 Tj +(0755 ushort padding1;) 100.4758 Tj 0 -85.4403 Td -(0756 uint type : 4; // type\(STS_{TG,IG32,TG32}\)) 244.6368 Tj +(0756 uint *esp1;) 78.6333 Tj 0 -94.9336 Td -(0757 uint s : 1; // must be 0 \(system\)) 218.4257 Tj +(0757 ushort ss1;) 78.6333 Tj 0 -104.427 Td -(0758 uint dpl : 2; // descriptor\(meaning new\) privi\ -lege level) 310.1645 Tj +(0758 ushort padding2;) 100.4758 Tj 0 -113.9203 Td -(0759 uint p : 1; // Present) 170.3721 Tj +(0759 uint *esp2;) 78.6333 Tj 0 -123.4137 Td -(0760 uint off_31_16 : 16; // high bits of offset in segment) 270.8479 Tj +(0760 ushort ss2;) 78.6333 Tj 0 -132.9071 Td -(0761 };) 30.5796 Tj +(0761 ushort padding3;) 100.4758 Tj 0 -142.4004 Td -(0762 ) 21.8426 Tj +(0762 void *cr3; // Page directory base) 209.6887 Tj 0 -151.8938 Td -(0763 // Set up a normal interrupt/trap gate descriptor.) 240.2683 Tj +(0763 uint *eip; // Saved state from last task switch) 270.8479 Tj 0 -161.3871 Td -(0764 // - istrap: 1 for a trap \(= exception\) gate, 0 for an i\ -nterrupt gate.) 327.6386 Tj +(0764 uint eflags;) 83.0018 Tj 0 -170.8805 Td -(0765 // interrupt gate clears FL_IF, trap gate leaves FL_IF a\ -lone) 292.6905 Tj +(0765 uint eax; // More saved state \(registers\)) 249.0053 Tj 0 -180.3739 Td -(0766 // - sel: Code segment selector for interrupt/trap handler) 275.2164 Tj +(0766 uint ecx;) 69.8962 Tj 0 -189.8672 Td -(0767 // - off: Offset in code segment for interrupt/trap handle\ -r) 279.5849 Tj +(0767 uint edx;) 69.8962 Tj 0 -199.3606 Td -(0768 // - dpl: Descriptor Privilege Level -) 187.8461 Tj +(0768 uint ebx;) 69.8962 Tj 0 -208.8539 Td -(0769 // the privilege level required for software to inv\ -oke) 288.322 Tj +(0769 uint *esp;) 74.2647 Tj 0 -218.3473 Td -(0770 // this interrupt/trap gate explicitly using an int\ - instruction.) 332.0071 Tj +(0770 uint *ebp;) 74.2647 Tj 0 -227.8407 Td -(0771 #define SETGATE\(gate, istrap, sel, off, d\) \ - \\) 279.5849 Tj +(0771 uint esi;) 69.8962 Tj 0 -237.334 Td -(0772 { \ -\\) 279.5849 Tj +(0772 uint edi;) 69.8962 Tj 0 -246.8274 Td -(0773 \(gate\).off_15_0 = \(uint\) \(off\) & 0xffff; \ - \\) 279.5849 Tj +(0773 ushort es; // Even more saved state \(segment se\ +lectors\)) 305.796 Tj 0 -256.3207 Td -(0774 \(gate\).cs = \(sel\); \ - \\) 279.5849 Tj +(0774 ushort padding4;) 100.4758 Tj 0 -265.8141 Td -(0775 \(gate\).args = 0; \ - \\) 279.5849 Tj +(0775 ushort cs;) 74.2647 Tj 0 -275.3075 Td -(0776 \(gate\).rsv1 = 0; \ - \\) 279.5849 Tj +(0776 ushort padding5;) 100.4758 Tj 0 -284.8008 Td -(0777 \(gate\).type = \(istrap\) ? STS_TG32 : STS_IG32; \ - \\) 279.5849 Tj +(0777 ushort ss;) 74.2647 Tj 0 -294.2942 Td -(0778 \(gate\).s = 0; \ - \\) 279.5849 Tj +(0778 ushort padding6;) 100.4758 Tj 0 -303.7875 Td -(0779 \(gate\).dpl = \(d\); \ - \\) 279.5849 Tj +(0779 ushort ds;) 74.2647 Tj 0 -313.2809 Td -(0780 \(gate\).p = 1; \ - \\) 279.5849 Tj +(0780 ushort padding7;) 100.4758 Tj 0 -322.7743 Td -(0781 \(gate\).off_31_16 = \(uint\) \(off\) >> 16; \ - \\) 279.5849 Tj +(0781 ushort fs;) 74.2647 Tj 0 -332.2676 Td -(0782 }) 26.2111 Tj +(0782 ushort padding8;) 100.4758 Tj 0 -341.761 Td -(0783 ) 21.8426 Tj +(0783 ushort gs;) 74.2647 Tj 0 -351.2543 Td -(0784 ) 21.8426 Tj +(0784 ushort padding9;) 100.4758 Tj 0 -360.7477 Td -(0785 ) 21.8426 Tj +(0785 ushort ldt;) 78.6333 Tj 0 -370.2411 Td -(0786 ) 21.8426 Tj +(0786 ushort padding10;) 104.8443 Tj 0 -379.7344 Td -(0787 ) 21.8426 Tj +(0787 ushort t; // Trap on task switch) 209.6887 Tj 0 -389.2278 Td -(0788 ) 21.8426 Tj +(0788 ushort iomb; // I/O map base address) 214.0572 Tj 0 -398.7211 Td -(0789 ) 21.8426 Tj +(0789 };) 30.5796 Tj 0 -408.2145 Td (0790 ) 21.8426 Tj 0 -417.7079 Td @@ -5809,6 +5832,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -5826,92 +5851,111 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/elf.h Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/mmu.h Page 4) 157.2665 Tj 0 -28.4801 Td -(0800 // Format of an ELF executable file) 174.7406 Tj +(0800 // Gate descriptors for interrupts and traps) 214.0572 Tj 0 -37.9735 Td -(0801 ) 21.8426 Tj +(0801 struct gatedesc {) 96.1073 Tj 0 -47.4668 Td -(0802 #define ELF_MAGIC 0x464C457FU // "\\x7FELF" in little end\ -ian) 283.9534 Tj +(0802 uint off_15_0 : 16; // low 16 bits of offset in segmen\ +t) 279.5849 Tj 0 -56.9602 Td -(0803 ) 21.8426 Tj +(0803 uint cs : 16; // code segment selector) 231.5313 Tj 0 -66.4535 Td -(0804 // File header) 83.0018 Tj +(0804 uint args : 5; // # args, 0 for interrupt/trap ga\ +tes) 288.322 Tj 0 -75.9469 Td -(0805 struct elfhdr {) 87.3703 Tj +(0805 uint rsv1 : 3; // reserved\(should be zero I gues\ +s\)) 279.5849 Tj 0 -85.4403 Td -(0806 uint magic; // must equal ELF_MAGIC) 187.8461 Tj +(0806 uint type : 4; // type\(STS_{TG,IG32,TG32}\)) 244.6368 Tj 0 -94.9336 Td -(0807 uchar elf[12];) 91.7388 Tj +(0807 uint s : 1; // must be 0 \(system\)) 218.4257 Tj 0 -104.427 Td -(0808 ushort type;) 83.0018 Tj +(0808 uint dpl : 2; // descriptor\(meaning new\) privi\ +lege level) 310.1645 Tj 0 -113.9203 Td -(0809 ushort machine;) 96.1073 Tj +(0809 uint p : 1; // Present) 170.3721 Tj 0 -123.4137 Td -(0810 uint version;) 87.3703 Tj +(0810 uint off_31_16 : 16; // high bits of offset in segment) 270.8479 Tj 0 -132.9071 Td -(0811 uint entry;) 78.6333 Tj +(0811 };) 30.5796 Tj 0 -142.4004 Td -(0812 uint phoff;) 78.6333 Tj +(0812 ) 21.8426 Tj 0 -151.8938 Td -(0813 uint shoff;) 78.6333 Tj +(0813 // Set up a normal interrupt/trap gate descriptor.) 240.2683 Tj 0 -161.3871 Td -(0814 uint flags;) 78.6333 Tj +(0814 // - istrap: 1 for a trap \(= exception\) gate, 0 for an i\ +nterrupt gate.) 327.6386 Tj 0 -170.8805 Td -(0815 ushort ehsize;) 91.7388 Tj +(0815 // interrupt gate clears FL_IF, trap gate leaves FL_IF a\ +lone) 292.6905 Tj 0 -180.3739 Td -(0816 ushort phentsize;) 104.8443 Tj +(0816 // - sel: Code segment selector for interrupt/trap handler) 275.2164 Tj 0 -189.8672 Td -(0817 ushort phnum;) 87.3703 Tj +(0817 // - off: Offset in code segment for interrupt/trap handle\ +r) 279.5849 Tj 0 -199.3606 Td -(0818 ushort shentsize;) 104.8443 Tj +(0818 // - dpl: Descriptor Privilege Level -) 187.8461 Tj 0 -208.8539 Td -(0819 ushort shnum;) 87.3703 Tj +(0819 // the privilege level required for software to inv\ +oke) 288.322 Tj 0 -218.3473 Td -(0820 ushort shstrndx;) 100.4758 Tj +(0820 // this interrupt/trap gate explicitly using an int\ + instruction.) 332.0071 Tj 0 -227.8407 Td -(0821 };) 30.5796 Tj +(0821 #define SETGATE\(gate, istrap, sel, off, d\) \ + \\) 279.5849 Tj 0 -237.334 Td -(0822 ) 21.8426 Tj +(0822 { \ +\\) 279.5849 Tj 0 -246.8274 Td -(0823 // Program section header) 131.0554 Tj +(0823 \(gate\).off_15_0 = \(uint\) \(off\) & 0xffff; \ + \\) 279.5849 Tj 0 -256.3207 Td -(0824 struct proghdr {) 91.7388 Tj +(0824 \(gate\).cs = \(sel\); \ + \\) 279.5849 Tj 0 -265.8141 Td -(0825 uint type;) 74.2647 Tj +(0825 \(gate\).args = 0; \ + \\) 279.5849 Tj 0 -275.3075 Td -(0826 uint offset;) 83.0018 Tj +(0826 \(gate\).rsv1 = 0; \ + \\) 279.5849 Tj 0 -284.8008 Td -(0827 uint va;) 65.5277 Tj +(0827 \(gate\).type = \(istrap\) ? STS_TG32 : STS_IG32; \ + \\) 279.5849 Tj 0 -294.2942 Td -(0828 uint pa;) 65.5277 Tj +(0828 \(gate\).s = 0; \ + \\) 279.5849 Tj 0 -303.7875 Td -(0829 uint filesz;) 83.0018 Tj +(0829 \(gate\).dpl = \(d\); \ + \\) 279.5849 Tj 0 -313.2809 Td -(0830 uint memsz;) 78.6333 Tj +(0830 \(gate\).p = 1; \ + \\) 279.5849 Tj 0 -322.7743 Td -(0831 uint flags;) 78.6333 Tj +(0831 \(gate\).off_31_16 = \(uint\) \(off\) >> 16; \ + \\) 279.5849 Tj 0 -332.2676 Td -(0832 uint align;) 78.6333 Tj +(0832 }) 26.2111 Tj 0 -341.761 Td -(0833 };) 30.5796 Tj +(0833 ) 21.8426 Tj 0 -351.2543 Td (0834 ) 21.8426 Tj 0 -360.7477 Td -(0835 // Values for Proghdr type) 135.4239 Tj +(0835 ) 21.8426 Tj 0 -370.2411 Td -(0836 #define ELF_PROG_LOAD 1) 166.0035 Tj +(0836 ) 21.8426 Tj 0 -379.7344 Td (0837 ) 21.8426 Tj 0 -389.2278 Td -(0838 // Flag bits for Proghdr flags) 152.898 Tj +(0838 ) 21.8426 Tj 0 -398.7211 Td -(0839 #define ELF_PROG_FLAG_EXEC 1) 166.0035 Tj +(0839 ) 21.8426 Tj 0 -408.2145 Td -(0840 #define ELF_PROG_FLAG_WRITE 2) 166.0035 Tj +(0840 ) 21.8426 Tj 0 -417.7079 Td -(0841 #define ELF_PROG_FLAG_READ 4) 166.0035 Tj +(0841 ) 21.8426 Tj 0 -427.2012 Td (0842 ) 21.8426 Tj 0 -436.6946 Td @@ -5946,91 +5990,92 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/elf.h Page 2) 157.2665 Tj +(Aug 8 01:04 2009 xv6/elf.h Page 1) 157.2665 Tj 0 -28.4801 Td -(0850 // Blank page.) 83.0018 Tj +(0850 // Format of an ELF executable file) 174.7406 Tj 0 -37.9735 Td (0851 ) 21.8426 Tj 0 -47.4668 Td -(0852 ) 21.8426 Tj +(0852 #define ELF_MAGIC 0x464C457FU // "\\x7FELF" in little end\ +ian) 283.9534 Tj 0 -56.9602 Td (0853 ) 21.8426 Tj 0 -66.4535 Td -(0854 ) 21.8426 Tj +(0854 // File header) 83.0018 Tj 0 -75.9469 Td -(0855 ) 21.8426 Tj +(0855 struct elfhdr {) 87.3703 Tj 0 -85.4403 Td -(0856 ) 21.8426 Tj +(0856 uint magic; // must equal ELF_MAGIC) 187.8461 Tj 0 -94.9336 Td -(0857 ) 21.8426 Tj +(0857 uchar elf[12];) 91.7388 Tj 0 -104.427 Td -(0858 ) 21.8426 Tj +(0858 ushort type;) 83.0018 Tj 0 -113.9203 Td -(0859 ) 21.8426 Tj +(0859 ushort machine;) 96.1073 Tj 0 -123.4137 Td -(0860 ) 21.8426 Tj +(0860 uint version;) 87.3703 Tj 0 -132.9071 Td -(0861 ) 21.8426 Tj +(0861 uint entry;) 78.6333 Tj 0 -142.4004 Td -(0862 ) 21.8426 Tj +(0862 uint phoff;) 78.6333 Tj 0 -151.8938 Td -(0863 ) 21.8426 Tj +(0863 uint shoff;) 78.6333 Tj 0 -161.3871 Td -(0864 ) 21.8426 Tj +(0864 uint flags;) 78.6333 Tj 0 -170.8805 Td -(0865 ) 21.8426 Tj +(0865 ushort ehsize;) 91.7388 Tj 0 -180.3739 Td -(0866 ) 21.8426 Tj +(0866 ushort phentsize;) 104.8443 Tj 0 -189.8672 Td -(0867 ) 21.8426 Tj +(0867 ushort phnum;) 87.3703 Tj 0 -199.3606 Td -(0868 ) 21.8426 Tj +(0868 ushort shentsize;) 104.8443 Tj 0 -208.8539 Td -(0869 ) 21.8426 Tj +(0869 ushort shnum;) 87.3703 Tj 0 -218.3473 Td -(0870 ) 21.8426 Tj +(0870 ushort shstrndx;) 100.4758 Tj 0 -227.8407 Td -(0871 ) 21.8426 Tj +(0871 };) 30.5796 Tj 0 -237.334 Td (0872 ) 21.8426 Tj 0 -246.8274 Td -(0873 ) 21.8426 Tj +(0873 // Program section header) 131.0554 Tj 0 -256.3207 Td -(0874 ) 21.8426 Tj +(0874 struct proghdr {) 91.7388 Tj 0 -265.8141 Td -(0875 ) 21.8426 Tj +(0875 uint type;) 74.2647 Tj 0 -275.3075 Td -(0876 ) 21.8426 Tj +(0876 uint offset;) 83.0018 Tj 0 -284.8008 Td -(0877 ) 21.8426 Tj +(0877 uint va;) 65.5277 Tj 0 -294.2942 Td -(0878 ) 21.8426 Tj +(0878 uint pa;) 65.5277 Tj 0 -303.7875 Td -(0879 ) 21.8426 Tj +(0879 uint filesz;) 83.0018 Tj 0 -313.2809 Td -(0880 ) 21.8426 Tj +(0880 uint memsz;) 78.6333 Tj 0 -322.7743 Td -(0881 ) 21.8426 Tj +(0881 uint flags;) 78.6333 Tj 0 -332.2676 Td -(0882 ) 21.8426 Tj +(0882 uint align;) 78.6333 Tj 0 -341.761 Td -(0883 ) 21.8426 Tj +(0883 };) 30.5796 Tj 0 -351.2543 Td (0884 ) 21.8426 Tj 0 -360.7477 Td -(0885 ) 21.8426 Tj +(0885 // Values for Proghdr type) 135.4239 Tj 0 -370.2411 Td -(0886 ) 21.8426 Tj +(0886 #define ELF_PROG_LOAD 1) 166.0035 Tj 0 -379.7344 Td (0887 ) 21.8426 Tj 0 -389.2278 Td -(0888 ) 21.8426 Tj +(0888 // Flag bits for Proghdr flags) 152.898 Tj 0 -398.7211 Td -(0889 ) 21.8426 Tj +(0889 #define ELF_PROG_FLAG_EXEC 1) 166.0035 Tj 0 -408.2145 Td -(0890 ) 21.8426 Tj +(0890 #define ELF_PROG_FLAG_WRITE 2) 166.0035 Tj 0 -417.7079 Td -(0891 ) 21.8426 Tj +(0891 #define ELF_PROG_FLAG_READ 4) 166.0035 Tj 0 -427.2012 Td (0892 ) 21.8426 Tj 0 -436.6946 Td @@ -6077,6 +6122,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -6094,7 +6141,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/bootasm.S Page 1) 174.7406 Tj +(Aug 8 01:04 2009 xv6/bootasm.S Page 1) 174.7406 Tj 0 -28.4801 Td (0900 #include "asm.h") 91.7388 Tj 0 -37.9735 Td @@ -6113,27 +6160,23 @@ n real mode) 323.2701 Tj 0 -85.4403 Td (0906 ) 21.8426 Tj 0 -94.9336 Td -(0907 .set PROT_MODE_CSEG, 0x8 # kernel code segment sel\ -ector) 297.059 Tj +(0907 #define SEG_KCODE 1 // kernel code) 174.7406 Tj 0 -104.427 Td -(0908 .set PROT_MODE_DSEG, 0x10 # kernel data segment sel\ -ector) 297.059 Tj +(0908 #define SEG_KDATA 2 // kernel data+stack) 200.9517 Tj 0 -113.9203 Td -(0909 .set CR0_PE_ON, 0x1 # protected mode enable f\ -lag) 288.322 Tj +(0909 ) 21.8426 Tj 0 -123.4137 Td -(0910 ) 21.8426 Tj +(0910 #define CR0_PE 1 // protected mode enable bit) 235.8998 Tj 0 -132.9071 Td -(0911 .globl start) 74.2647 Tj +(0911 ) 21.8426 Tj 0 -142.4004 Td -(0912 start:) 48.0537 Tj +(0912 .code16 # Assemble for 16-bit mode) 266.4794 Tj 0 -151.8938 Td -(0913 .code16 # Assemble for 16-bit mode) 266.4794 Tj +(0913 .globl start) 74.2647 Tj 0 -161.3871 Td -(0914 cli # Disable interrupts) 240.2683 Tj +(0914 start:) 48.0537 Tj 0 -170.8805 Td -(0915 cld # String operations incremen\ -t) 279.5849 Tj +(0915 cli # Disable interrupts) 240.2683 Tj 0 -180.3739 Td (0916 ) 21.8426 Tj 0 -189.8672 Td @@ -6224,7 +6267,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/bootasm.S Page 2) 174.7406 Tj +(Aug 8 01:04 2009 xv6/bootasm.S Page 2) 174.7406 Tj 0 -28.4801 Td (0950 # Switch from real to protected mode, using a bootstrap \ GDT) 288.322 Tj @@ -6240,7 +6283,7 @@ GDT) 288.322 Tj 0 -75.9469 Td (0955 movl %cr0, %eax) 109.2129 Tj 0 -85.4403 Td -(0956 orl $CR0_PE_ON, %eax) 135.4239 Tj +(0956 orl $CR0_PE, %eax) 122.3184 Tj 0 -94.9336 Td (0957 movl %eax, %cr0) 109.2129 Tj 0 -104.427 Td @@ -6250,82 +6293,83 @@ GDT) 288.322 Tj 0 -123.4137 Td (0960 # Switches processor into 32-bit mode.) 196.5831 Tj 0 -132.9071 Td -(0961 ljmp $PROT_MODE_CSEG, $protcseg) 179.1091 Tj +(0961 ljmp $\(SEG_KCODE<<3\), $start32) 174.7406 Tj 0 -142.4004 Td (0962 ) 21.8426 Tj 0 -151.8938 Td -(0963 .code32 # Assemble for 32-bit mode) 266.4794 Tj +(0963 .code32 # Assemble for 32-bit mode) 266.4794 Tj 0 -161.3871 Td -(0964 protcseg:) 61.1592 Tj +(0964 start32:) 56.7907 Tj 0 -170.8805 Td (0965 # Set up the protected-mode data segment registers) 249.0053 Tj 0 -180.3739 Td -(0966 movw $PROT_MODE_DSEG, %ax # Our data segment selec\ -tor) 288.322 Tj +(0966 movw $\(SEG_KDATA<<3\), %ax # Our data segment sel\ +ector) 288.322 Tj 0 -189.8672 Td (0967 movw %ax, %ds # -> DS: Data Segment) 262.1109 Tj 0 -199.3606 Td (0968 movw %ax, %es # -> ES: Extra Segment) 266.4794 Tj 0 -208.8539 Td -(0969 movw %ax, %fs # -> FS) 200.9517 Tj +(0969 movw %ax, %ss # -> SS: Stack Segment) 266.4794 Tj 0 -218.3473 Td -(0970 movw %ax, %gs # -> GS) 200.9517 Tj +(0970 movw $0, %ax # Zero segments not read\ +y for use) 314.533 Tj 0 -227.8407 Td -(0971 movw %ax, %ss # -> SS: Stack Segment) 266.4794 Tj +(0971 movw %ax, %fs # -> FS) 200.9517 Tj 0 -237.334 Td -(0972 ) 21.8426 Tj +(0972 movw %ax, %gs # -> GS) 200.9517 Tj 0 -246.8274 Td -(0973 # Set up the stack pointer and call into C.) 218.4257 Tj +(0973 ) 21.8426 Tj 0 -256.3207 Td -(0974 movl $start, %esp) 117.9499 Tj +(0974 # Set up the stack pointer and call into C.) 218.4257 Tj 0 -265.8141 Td -(0975 call bootmain) 100.4758 Tj +(0975 movl $start, %esp) 117.9499 Tj 0 -275.3075 Td -(0976 ) 21.8426 Tj +(0976 call bootmain) 100.4758 Tj 0 -284.8008 Td -(0977 # If bootmain returns \(it shouldn't\), loop.) 218.4257 Tj +(0977 ) 21.8426 Tj 0 -294.2942 Td -(0978 spin:) 43.6851 Tj +(0978 # If bootmain returns \(it shouldn't\), trigger a Bochs) 262.1109 Tj 0 -303.7875 Td -(0979 jmp spin) 83.0018 Tj +(0979 # breakpoint if running under Bochs, then loop.) 235.8998 Tj 0 -313.2809 Td -(0980 ) 21.8426 Tj +(0980 movw $0x8a00, %ax # 0x8a00 -> port 0x8a00) 270.8479 Tj 0 -322.7743 Td -(0981 # Bootstrap GDT) 87.3703 Tj +(0981 movw %ax, %dx) 100.4758 Tj 0 -332.2676 Td -(0982 .p2align 2 # force 4 byte a\ -lignment) 310.1645 Tj +(0982 outw %ax, %dx) 100.4758 Tj 0 -341.761 Td -(0983 gdt:) 39.3166 Tj +(0983 movw $0x8e00, %ax # 0x8e00 -> port 0x8a00) 270.8479 Tj 0 -351.2543 Td -(0984 SEG_NULLASM # null seg) 249.0053 Tj +(0984 outw %ax, %dx) 100.4758 Tj 0 -360.7477 Td -(0985 SEG_ASM\(STA_X|STA_R, 0x0, 0xffffffff\) # code seg) 249.0053 Tj +(0985 spin:) 43.6851 Tj 0 -370.2411 Td -(0986 SEG_ASM\(STA_W, 0x0, 0xffffffff\) # data seg) 249.0053 Tj +(0986 jmp spin) 83.0018 Tj 0 -379.7344 Td (0987 ) 21.8426 Tj 0 -389.2278 Td -(0988 gdtdesc:) 56.7907 Tj +(0988 # Bootstrap GDT) 87.3703 Tj 0 -398.7211 Td -(0989 .word 0x17 # sizeof\(gdt\) \ -- 1) 279.5849 Tj +(0989 .p2align 2 # force 4 byte a\ +lignment) 310.1645 Tj 0 -408.2145 Td -(0990 .long gdt # address gdt) 262.1109 Tj +(0990 gdt:) 39.3166 Tj 0 -417.7079 Td -(0991 ) 21.8426 Tj +(0991 SEG_NULLASM # null seg) 249.0053 Tj 0 -427.2012 Td -(0992 ) 21.8426 Tj +(0992 SEG_ASM\(STA_X|STA_R, 0x0, 0xffffffff\) # code seg) 249.0053 Tj 0 -436.6946 Td -(0993 ) 21.8426 Tj +(0993 SEG_ASM\(STA_W, 0x0, 0xffffffff\) # data seg) 249.0053 Tj 0 -446.1879 Td (0994 ) 21.8426 Tj 0 -455.6813 Td -(0995 ) 21.8426 Tj +(0995 gdtdesc:) 56.7907 Tj 0 -465.1747 Td -(0996 ) 21.8426 Tj +(0996 .word \(gdtdesc - gdt - 1\) \ + # sizeof\(gdt\) - 1) 345.1126 Tj 0 -474.668 Td -(0997 ) 21.8426 Tj +(0997 .long gdt # address gdt) 262.1109 Tj 0 -484.1614 Td (0998 ) 21.8426 Tj 0 -493.6547 Td @@ -6360,6 +6404,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -6377,7 +6423,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/bootother.S Page 1) 183.4776 Tj +(Aug 8 01:04 2009 xv6/bootother.S Page 1) 183.4776 Tj 0 -28.4801 Td (1000 #include "asm.h") 91.7388 Tj 0 -37.9735 Td @@ -6428,27 +6474,23 @@ g bootmain) 318.9016 Tj 0 -218.3473 Td (1020 ) 21.8426 Tj 0 -227.8407 Td -(1021 .set PROT_MODE_CSEG, 0x8 # kernel code segment sel\ -ector) 297.059 Tj +(1021 #define SEG_KCODE 1 // kernel code) 174.7406 Tj 0 -237.334 Td -(1022 .set PROT_MODE_DSEG, 0x10 # kernel data segment sel\ -ector) 297.059 Tj +(1022 #define SEG_KDATA 2 // kernel data+stack) 200.9517 Tj 0 -246.8274 Td -(1023 .set CR0_PE_ON, 0x1 # protected mode enable f\ -lag) 288.322 Tj +(1023 ) 21.8426 Tj 0 -256.3207 Td -(1024 ) 21.8426 Tj +(1024 #define CR0_PE 1 // protected mode enable bit) 235.8998 Tj 0 -265.8141 Td -(1025 .globl start) 74.2647 Tj +(1025 ) 21.8426 Tj 0 -275.3075 Td -(1026 start:) 48.0537 Tj +(1026 .code16 # Assemble for 16-bit mode) 266.4794 Tj 0 -284.8008 Td -(1027 .code16 # Assemble for 16-bit mode) 266.4794 Tj +(1027 .globl start) 74.2647 Tj 0 -294.2942 Td -(1028 cli # Disable interrupts) 240.2683 Tj +(1028 start:) 48.0537 Tj 0 -303.7875 Td -(1029 cld # String operations incremen\ -t) 279.5849 Tj +(1029 cli # Disable interrupts) 240.2683 Tj 0 -313.2809 Td (1030 ) 21.8426 Tj 0 -322.7743 Td @@ -6508,14 +6550,14 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/bootother.S Page 2) 183.4776 Tj +(Aug 8 01:04 2009 xv6/bootother.S Page 2) 183.4776 Tj 0 -28.4801 Td (1050 # Switch from real to protected mode, using a bootstrap \ GDT) 288.322 Tj 0 -37.9735 Td (1051 # and segment translation that makes virtual addresses) 266.4794 Tj 0 -47.4668 Td -(1052 # identical to their physical addresses, so that the) 257.7424 Tj +(1052 # identical to physical addresses, so that the) 231.5313 Tj 0 -56.9602 Td (1053 # effective memory map does not change during the switch\ .) 279.5849 Tj @@ -6524,7 +6566,7 @@ GDT) 288.322 Tj 0 -75.9469 Td (1055 movl %cr0, %eax) 109.2129 Tj 0 -85.4403 Td -(1056 orl $CR0_PE_ON, %eax) 135.4239 Tj +(1056 orl $CR0_PE, %eax) 122.3184 Tj 0 -94.9336 Td (1057 movl %eax, %cr0) 109.2129 Tj 0 -104.427 Td @@ -6534,82 +6576,85 @@ GDT) 288.322 Tj 0 -123.4137 Td (1060 # Switches processor into 32-bit mode.) 196.5831 Tj 0 -132.9071 Td -(1061 ljmp $PROT_MODE_CSEG, $protcseg) 179.1091 Tj +(1061 ljmp $\(SEG_KCODE<<3\), $start32) 174.7406 Tj 0 -142.4004 Td (1062 ) 21.8426 Tj 0 -151.8938 Td -(1063 .code32 # Assemble for 32-bit mode) 266.4794 Tj +(1063 .code32 # Assemble for 32-bit mode) 266.4794 Tj 0 -161.3871 Td -(1064 protcseg:) 61.1592 Tj +(1064 start32:) 56.7907 Tj 0 -170.8805 Td (1065 # Set up the protected-mode data segment registers) 249.0053 Tj 0 -180.3739 Td -(1066 movw $PROT_MODE_DSEG, %ax # Our data segment selec\ -tor) 288.322 Tj +(1066 movw $\(SEG_KDATA<<3\), %ax # Our data segment sel\ +ector) 288.322 Tj 0 -189.8672 Td (1067 movw %ax, %ds # -> DS: Data Segment) 262.1109 Tj 0 -199.3606 Td (1068 movw %ax, %es # -> ES: Extra Segment) 266.4794 Tj 0 -208.8539 Td -(1069 movw %ax, %fs # -> FS) 200.9517 Tj +(1069 movw %ax, %ss # -> SS: Stack Segment) 266.4794 Tj 0 -218.3473 Td -(1070 movw %ax, %gs # -> GS) 200.9517 Tj +(1070 movw $0, %ax # Zero segments not read\ +y for use) 314.533 Tj 0 -227.8407 Td -(1071 movw %ax, %ss # -> SS: Stack Segment) 266.4794 Tj +(1071 movw %ax, %fs # -> FS) 200.9517 Tj 0 -237.334 Td -(1072 ) 21.8426 Tj +(1072 movw %ax, %gs # -> GS) 200.9517 Tj 0 -246.8274 Td -(1073 movl start-4, %esp) 122.3184 Tj +(1073 ) 21.8426 Tj 0 -256.3207 Td -(1074 movl start-8, %eax) 122.3184 Tj +(1074 # Set up the stack pointer and call into C.) 218.4257 Tj 0 -265.8141 Td -(1075 jmp *%eax) 87.3703 Tj +(1075 movl start-4, %esp) 122.3184 Tj 0 -275.3075 Td -(1076 ) 21.8426 Tj +(1076 call) 48.0537 Tj +-2507.8 TJm +(*\(start-8\)) 43.6851 Tj 0 -284.8008 Td -(1077 # Bootstrap GDT) 87.3703 Tj +(1077 ) 21.8426 Tj 0 -294.2942 Td -(1078 .p2align 2 # force 4 byte a\ -lignment) 310.1645 Tj +(1078 # If the call returns \(it shouldn't\), trigger a Bochs) 262.1109 Tj 0 -303.7875 Td -(1079 gdt:) 39.3166 Tj +(1079 # breakpoint if running under Bochs, then loop.) 235.8998 Tj 0 -313.2809 Td -(1080 SEG_NULLASM # null seg) 249.0053 Tj +(1080 movw $0x8a00, %ax # 0x8a00 -> port 0x8a00) 270.8479 Tj 0 -322.7743 Td -(1081 SEG_ASM\(STA_X|STA_R, 0x0, 0xffffffff\) # code seg) 249.0053 Tj +(1081 movw %ax, %dx) 100.4758 Tj 0 -332.2676 Td -(1082 SEG_ASM\(STA_W, 0x0, 0xffffffff\) # data seg) 249.0053 Tj +(1082 outw %ax, %dx) 100.4758 Tj 0 -341.761 Td -(1083 ) 21.8426 Tj +(1083 movw $0x8e00, %ax # 0x8e00 -> port 0x8a00) 270.8479 Tj 0 -351.2543 Td -(1084 gdtdesc:) 56.7907 Tj +(1084 outw %ax, %dx) 100.4758 Tj 0 -360.7477 Td -(1085 .word 0x17 # sizeof\(gdt\) \ -- 1) 279.5849 Tj +(1085 spin:) 43.6851 Tj 0 -370.2411 Td -(1086 .long gdt # address gdt) 262.1109 Tj +(1086 jmp spin) 83.0018 Tj 0 -379.7344 Td (1087 ) 21.8426 Tj 0 -389.2278 Td -(1088 ) 21.8426 Tj +(1088 # Bootstrap GDT) 87.3703 Tj 0 -398.7211 Td -(1089 ) 21.8426 Tj +(1089 .p2align 2 # force 4 byte a\ +lignment) 310.1645 Tj 0 -408.2145 Td -(1090 ) 21.8426 Tj +(1090 gdt:) 39.3166 Tj 0 -417.7079 Td -(1091 ) 21.8426 Tj +(1091 SEG_NULLASM # null seg) 249.0053 Tj 0 -427.2012 Td -(1092 ) 21.8426 Tj +(1092 SEG_ASM\(STA_X|STA_R, 0x0, 0xffffffff\) # code seg) 249.0053 Tj 0 -436.6946 Td -(1093 ) 21.8426 Tj +(1093 SEG_ASM\(STA_W, 0x0, 0xffffffff\) # data seg) 249.0053 Tj 0 -446.1879 Td (1094 ) 21.8426 Tj 0 -455.6813 Td -(1095 ) 21.8426 Tj +(1095 gdtdesc:) 56.7907 Tj 0 -465.1747 Td -(1096 ) 21.8426 Tj +(1096 .word \(gdtdesc - gdt - 1\) \ + # sizeof\(gdt\) - 1) 345.1126 Tj 0 -474.668 Td -(1097 ) 21.8426 Tj +(1097 .long gdt # address gdt) 262.1109 Tj 0 -484.1614 Td (1098 ) 21.8426 Tj 0 -493.6547 Td @@ -6644,6 +6689,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -6661,7 +6708,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/bootmain.c Page 1) 179.1091 Tj +(Aug 8 01:04 2009 xv6/bootmain.c Page 1) 179.1091 Tj 0 -28.4801 Td (1100 // Boot loader.) 87.3703 Tj 0 -37.9735 Td @@ -6692,7 +6739,7 @@ arting at) 305.796 Tj 0 -142.4004 Td (1112 ) 21.8426 Tj 0 -151.8938 Td -(1113 void readseg\(uint, uint, uint\);) 157.2665 Tj +(1113 void readseg\(uchar*, uint, uint\);) 166.0035 Tj 0 -161.3871 Td (1114 ) 21.8426 Tj 0 -170.8805 Td @@ -6708,59 +6755,59 @@ arting at) 305.796 Tj 0 -218.3473 Td (1120 void \(*entry\)\(void\);) 117.9499 Tj 0 -227.8407 Td -(1121 ) 21.8426 Tj +(1121 uchar* va;) 74.2647 Tj 0 -237.334 Td -(1122 elf = \(struct elfhdr*\)0x10000; // scratch space) 240.2683 Tj +(1122 ) 21.8426 Tj 0 -246.8274 Td -(1123 ) 21.8426 Tj +(1123 elf = \(struct elfhdr*\)0x10000; // scratch space) 240.2683 Tj 0 -256.3207 Td -(1124 // Read 1st page off disk) 139.7925 Tj +(1124 ) 21.8426 Tj 0 -265.8141 Td -(1125 readseg\(\(uint\)elf, SECTSIZE*8, 0\);) 179.1091 Tj +(1125 // Read 1st page off disk) 139.7925 Tj 0 -275.3075 Td -(1126 ) 21.8426 Tj +(1126 readseg\(\(uchar*\)elf, 4096, 0\);) 161.635 Tj 0 -284.8008 Td -(1127 // Is this an ELF executable?) 157.2665 Tj +(1127 ) 21.8426 Tj 0 -294.2942 Td -(1128 if\(elf->magic != ELF_MAGIC\)) 148.5295 Tj +(1128 // Is this an ELF executable?) 157.2665 Tj 0 -303.7875 Td -(1129 goto bad;) 78.6333 Tj +(1129 if\(elf->magic != ELF_MAGIC\)) 148.5295 Tj 0 -313.2809 Td -(1130 ) 21.8426 Tj +(1130 return; // let bootasm.S handle error) 205.3202 Tj 0 -322.7743 Td -(1131 // Load each program segment \(ignores ph flags\).) 240.2683 Tj +(1131 ) 21.8426 Tj 0 -332.2676 Td -(1132 ph = \(struct proghdr*\)\(\(uchar*\)elf + elf->phoff\);) 244.6368 Tj +(1132 // Load each program segment \(ignores ph flags\).) 240.2683 Tj 0 -341.761 Td -(1133 eph = ph + elf->phnum;) 126.6869 Tj +(1133 ph = \(struct proghdr*\)\(\(uchar*\)elf + elf->phoff\);) 244.6368 Tj 0 -351.2543 Td -(1134 for\(; ph < eph; ph++\)) 122.3184 Tj +(1134 eph = ph + elf->phnum;) 126.6869 Tj 0 -360.7477 Td -(1135 readseg\(ph->va & 0xFFFFFF, ph->memsz, ph->offset\);) 257.7424 Tj +(1135 for\(; ph < eph; ph++\) {) 131.0554 Tj 0 -370.2411 Td -(1136 ) 21.8426 Tj +(1136 va = \(uchar*\)\(ph->va & 0xFFFFFF\);) 183.4776 Tj 0 -379.7344 Td -(1137 // Call the entry point from the ELF header.) 222.7942 Tj +(1137 readseg\(va, ph->filesz, ph->offset\);) 196.5831 Tj 0 -389.2278 Td -(1138 // Does not return!) 113.5814 Tj +(1138 if\(ph->memsz > ph->filesz\)) 152.898 Tj 0 -398.7211 Td -(1139 entry = \(void\(*\)\(void\)\)\(elf->entry & 0xFFFFFF\);) 235.8998 Tj +(1139 stosb\(va + ph->filesz, 0, ph->memsz - ph->filesz\);) 266.4794 Tj 0 -408.2145 Td -(1140 entry\(\);) 65.5277 Tj +(1140 }) 34.9481 Tj 0 -417.7079 Td (1141 ) 21.8426 Tj 0 -427.2012 Td -(1142 bad:) 39.3166 Tj +(1142 // Call the entry point from the ELF header.) 222.7942 Tj 0 -436.6946 Td -(1143 outw\(0x8A00, 0x8A00\);) 122.3184 Tj +(1143 // Does not return!) 113.5814 Tj 0 -446.1879 Td -(1144 outw\(0x8A00, 0x8E00\);) 122.3184 Tj +(1144 entry = \(void\(*\)\(void\)\)\(elf->entry & 0xFFFFFF\);) 235.8998 Tj 0 -455.6813 Td -(1145 for\(;;\)) 61.1592 Tj +(1145 entry\(\);) 65.5277 Tj 0 -465.1747 Td -(1146 ;) 43.6851 Tj +(1146 }) 26.2111 Tj 0 -474.668 Td -(1147 }) 26.2111 Tj +(1147 ) 21.8426 Tj 0 -484.1614 Td (1148 ) 21.8426 Tj 0 -493.6547 Td @@ -6783,7 +6830,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/bootmain.c Page 2) 179.1091 Tj +(Aug 8 01:04 2009 xv6/bootmain.c Page 2) 179.1091 Tj 0 -28.4801 Td (1150 void) 39.3166 Tj 0 -37.9735 Td @@ -6844,11 +6891,11 @@ q 0 -294.2942 Td (1178 void) 39.3166 Tj 0 -303.7875 Td -(1179 readseg\(uint va, uint count, uint offset\)) 200.9517 Tj +(1179 readseg\(uchar* va, uint count, uint offset\)) 209.6887 Tj 0 -313.2809 Td (1180 {) 26.2111 Tj 0 -322.7743 Td -(1181 uint eva;) 69.8962 Tj +(1181 uchar* eva;) 78.6333 Tj 0 -332.2676 Td (1182 ) 21.8426 Tj 0 -341.761 Td @@ -6858,7 +6905,7 @@ q 0 -360.7477 Td (1185 // Round down to sector boundary.) 174.7406 Tj 0 -370.2411 Td -(1186 va &= ~\(SECTSIZE - 1\);) 126.6869 Tj +(1186 va -= offset % SECTSIZE;) 135.4239 Tj 0 -379.7344 Td (1187 ) 21.8426 Tj 0 -389.2278 Td @@ -6879,7 +6926,7 @@ matter --) 314.533 Tj 0 -446.1879 Td (1194 for\(; va < eva; va += SECTSIZE, offset++\)) 209.6887 Tj 0 -455.6813 Td -(1195 readsect\(\(uchar*\)va, offset\);) 166.0035 Tj +(1195 readsect\(va, offset\);) 131.0554 Tj 0 -465.1747 Td (1196 }) 26.2111 Tj 0 -474.668 Td @@ -6918,6 +6965,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -6935,7 +6984,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/main.c Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/main.c Page 1) 161.635 Tj 0 -28.4801 Td (1200 #include "types.h") 100.4758 Tj 0 -37.9735 Td @@ -6951,61 +7000,61 @@ q 0 -85.4403 Td (1206 ) 21.8426 Tj 0 -94.9336 Td -(1207 static void bootothers\(void\);) 148.5295 Tj +(1207 __thread struct cpu *c;) 122.3184 Tj 0 -104.427 Td -(1208 static void mpmain\(void\) __attribute__\(\(noreturn\)\);) 244.6368 Tj +(1208 __thread struct proc *cp;) 131.0554 Tj 0 -113.9203 Td (1209 ) 21.8426 Tj 0 -123.4137 Td -(1210 // Bootstrap processor starts running C code here.) 240.2683 Tj +(1210 static void bootothers\(void\);) 148.5295 Tj 0 -132.9071 Td -(1211 int) 34.9481 Tj +(1211 static void mpmain\(void\) __attribute__\(\(noreturn\)\);) 244.6368 Tj 0 -142.4004 Td -(1212 main\(void\)) 65.5277 Tj +(1212 ) 21.8426 Tj 0 -151.8938 Td -(1213 {) 26.2111 Tj +(1213 // Bootstrap processor starts running C code here.) 240.2683 Tj 0 -161.3871 Td -(1214 extern char edata[], end[];) 148.5295 Tj +(1214 int) 34.9481 Tj 0 -170.8805 Td -(1215 ) 21.8426 Tj +(1215 main\(void\)) 65.5277 Tj 0 -180.3739 Td -(1216 // clear BSS) 83.0018 Tj +(1216 {) 26.2111 Tj 0 -189.8672 Td -(1217 memset\(edata, 0, end - edata\);) 161.635 Tj +(1217 mpinit\(\); // collect info about this machine) 222.7942 Tj 0 -199.3606 Td -(1218 ) 21.8426 Tj +(1218 lapicinit\(mpbcpu\(\)\);) 117.9499 Tj 0 -208.8539 Td -(1219 mp_init\(\); // collect info about this machine) 227.1628 Tj +(1219 ksegment\(\);) 78.6333 Tj 0 -218.3473 Td -(1220 lapic_init\(mp_bcpu\(\)\);) 126.6869 Tj +(1220 picinit\(\); // interrupt controller) 205.3202 Tj 0 -227.8407 Td -(1221 cprintf\("\\ncpu%d: starting xv6\\n\\n", cpu\(\)\);) 222.7942 Tj +(1221 ioapicinit\(\); // another interrupt controller) 240.2683 Tj 0 -237.334 Td -(1222 ) 21.8426 Tj +(1222 consoleinit\(\); // I/O devices & their interrupts) 249.0053 Tj 0 -246.8274 Td -(1223 pinit\(\); // process table) 174.7406 Tj +(1223 uartinit\(\); // serial port) 166.0035 Tj 0 -256.3207 Td -(1224 binit\(\); // buffer cache) 170.3721 Tj +(1224 cprintf\("\\ncpu%d: starting xv6\\n\\n", cpu\(\)\);) 222.7942 Tj 0 -265.8141 Td -(1225 pic_init\(\); // interrupt controller) 205.3202 Tj +(1225 ) 21.8426 Tj 0 -275.3075 Td -(1226 ioapic_init\(\); // another interrupt controller) 240.2683 Tj +(1226 kinit\(\); // physical memory allocator) 227.1628 Tj 0 -284.8008 Td -(1227 kinit\(\); // physical memory allocator) 227.1628 Tj +(1227 pinit\(\); // process table) 174.7406 Tj 0 -294.2942 Td (1228 tvinit\(\); // trap vectors) 170.3721 Tj 0 -303.7875 Td -(1229 fileinit\(\); // file table) 161.635 Tj +(1229 binit\(\); // buffer cache) 170.3721 Tj 0 -313.2809 Td -(1230 iinit\(\); // inode cache) 166.0035 Tj +(1230 fileinit\(\); // file table) 161.635 Tj 0 -322.7743 Td -(1231 console_init\(\); // I/O devices & their interrupts) 249.0053 Tj +(1231 iinit\(\); // inode cache) 166.0035 Tj 0 -332.2676 Td -(1232 ide_init\(\); // disk) 135.4239 Tj +(1232 ideinit\(\); // disk) 135.4239 Tj 0 -341.761 Td (1233 if\(!ismp\)) 69.8962 Tj 0 -351.2543 Td -(1234 timer_init\(\); // uniprocessor timer) 196.5831 Tj +(1234 timerinit\(\); // uniprocessor timer) 196.5831 Tj 0 -360.7477 Td (1235 userinit\(\); // first user process) 196.5831 Tj 0 -370.2411 Td @@ -7054,7 +7103,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/main.c Page 2) 161.635 Tj +(Aug 8 01:04 2009 xv6/main.c Page 2) 161.635 Tj 0 -28.4801 Td (1250 // Bootstrap processor gets here after setting up the hard\ ware.) 297.059 Tj @@ -7067,17 +7116,17 @@ ware.) 297.059 Tj 0 -66.4535 Td (1254 {) 26.2111 Tj 0 -75.9469 Td -(1255 cprintf\("cpu%d: mpmain\\n", cpu\(\)\);) 179.1091 Tj +(1255 if\(cpu\(\) != mpbcpu\(\)\)) 122.3184 Tj 0 -85.4403 Td -(1256 idtinit\(\);) 74.2647 Tj +(1256 lapicinit\(cpu\(\)\);) 113.5814 Tj 0 -94.9336 Td -(1257 if\(cpu\(\) != mp_bcpu\(\)\)) 126.6869 Tj +(1257 ksegment\(\);) 78.6333 Tj 0 -104.427 Td -(1258 lapic_init\(cpu\(\)\);) 117.9499 Tj +(1258 cprintf\("cpu%d: mpmain\\n", cpu\(\)\);) 179.1091 Tj 0 -113.9203 Td -(1259 setupsegs\(0\);) 87.3703 Tj +(1259 idtinit\(\);) 74.2647 Tj 0 -123.4137 Td -(1260 xchg\(&cpus[cpu\(\)].booted, 1\);) 157.2665 Tj +(1260 xchg\(&c->booted, 1\);) 117.9499 Tj 0 -132.9071 Td (1261 ) 21.8426 Tj 0 -142.4004 Td @@ -7131,7 +7180,7 @@ bootother_size\);) 332.0071 Tj 0 -360.7477 Td (1285 *\(void**\)\(code-8\) = mpmain;) 157.2665 Tj 0 -370.2411 Td -(1286 lapic_startap\(c->apicid, \(uint\)code\);) 200.9517 Tj +(1286 lapicstartap\(c->apicid, \(uint\)code\);) 196.5831 Tj 0 -379.7344 Td (1287 ) 21.8426 Tj 0 -389.2278 Td @@ -7188,6 +7237,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -7205,7 +7256,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/spinlock.h Page 1) 179.1091 Tj +(Aug 8 01:04 2009 xv6/spinlock.h Page 1) 179.1091 Tj 0 -28.4801 Td (1300 // Mutual exclusion lock.) 131.0554 Tj 0 -37.9735 Td @@ -7326,7 +7377,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/spinlock.c Page 1) 179.1091 Tj +(Aug 8 01:04 2009 xv6/spinlock.c Page 1) 179.1091 Tj 0 -28.4801 Td (1350 // Mutual exclusion spin locks.) 157.2665 Tj 0 -37.9735 Td @@ -7348,74 +7399,74 @@ q 0 -113.9203 Td (1359 ) 21.8426 Tj 0 -123.4137 Td -(1360 extern int use_console_lock;) 144.161 Tj +(1360 void) 39.3166 Tj 0 -132.9071 Td -(1361 ) 21.8426 Tj +(1361 initlock\(struct spinlock *lk, char *name\)) 200.9517 Tj 0 -142.4004 Td -(1362 void) 39.3166 Tj +(1362 {) 26.2111 Tj 0 -151.8938 Td -(1363 initlock\(struct spinlock *lock, char *name\)) 209.6887 Tj +(1363 lk->name = name;) 100.4758 Tj 0 -161.3871 Td -(1364 {) 26.2111 Tj +(1364 lk->locked = 0;) 96.1073 Tj 0 -170.8805 Td -(1365 lock->name = name;) 109.2129 Tj +(1365 lk->cpu = 0xffffffff;) 122.3184 Tj 0 -180.3739 Td -(1366 lock->locked = 0;) 104.8443 Tj +(1366 }) 26.2111 Tj 0 -189.8672 Td -(1367 lock->cpu = 0xffffffff;) 131.0554 Tj +(1367 ) 21.8426 Tj 0 -199.3606 Td -(1368 }) 26.2111 Tj +(1368 // Acquire the lock.) 109.2129 Tj 0 -208.8539 Td -(1369 ) 21.8426 Tj +(1369 // Loops \(spins\) until the lock is acquired.) 214.0572 Tj 0 -218.3473 Td -(1370 // Acquire the lock.) 109.2129 Tj +(1370 // Holding a lock for a long time may cause) 209.6887 Tj 0 -227.8407 Td -(1371 // Loops \(spins\) until the lock is acquired.) 214.0572 Tj +(1371 // other CPUs to waste time spinning to acquire it.) 244.6368 Tj 0 -237.334 Td -(1372 // Holding a lock for a long time may cause) 209.6887 Tj +(1372 void) 39.3166 Tj 0 -246.8274 Td -(1373 // other CPUs to waste time spinning to acquire it.) 244.6368 Tj +(1373 acquire\(struct spinlock *lk\)) 144.161 Tj 0 -256.3207 Td -(1374 void) 39.3166 Tj +(1374 {) 26.2111 Tj 0 -265.8141 Td -(1375 acquire\(struct spinlock *lock\)) 152.898 Tj +(1375 pushcli\(\);) 74.2647 Tj 0 -275.3075 Td -(1376 {) 26.2111 Tj +(1376 if\(holding\(lk\)\)) 96.1073 Tj 0 -284.8008 Td -(1377 pushcli\(\);) 74.2647 Tj +(1377 panic\("acquire"\);) 113.5814 Tj 0 -294.2942 Td -(1378 if\(holding\(lock\)\)) 104.8443 Tj +(1378 ) 21.8426 Tj 0 -303.7875 Td -(1379 panic\("acquire"\);) 113.5814 Tj +(1379 // The xchg is atomic.) 126.6869 Tj 0 -313.2809 Td -(1380 ) 21.8426 Tj -0 -322.7743 Td -(1381 // The xchg is atomic.) 126.6869 Tj -0 -332.2676 Td -(1382 // It also serializes, so that reads after acquire are n\ +(1380 // It also serializes, so that reads after acquire are n\ ot) 283.9534 Tj +0 -322.7743 Td +(1381 // reordered before it.) 131.0554 Tj +0 -332.2676 Td +(1382 while\(xchg\(&lk->locked, 1\) != 0\)) 170.3721 Tj 0 -341.761 Td -(1383 // reordered before it.) 131.0554 Tj +(1383 ;) 43.6851 Tj 0 -351.2543 Td -(1384 while\(xchg\(&lock->locked, 1\) == 1\)) 179.1091 Tj +(1384 ) 21.8426 Tj 0 -360.7477 Td -(1385 ;) 43.6851 Tj +(1385 // Record info about lock acquisition for debugging.) 257.7424 Tj 0 -370.2411 Td -(1386 ) 21.8426 Tj +(1386 // The +10 is only so that we can tell the difference) 262.1109 Tj 0 -379.7344 Td -(1387 // Record info about lock acquisition for debugging.) 257.7424 Tj +(1387 // between forgetting to initialize lock->cpu) 227.1628 Tj 0 -389.2278 Td -(1388 // The +10 is only so that we can tell the difference) 262.1109 Tj +(1388 // and holding a lock on cpu 0.) 166.0035 Tj 0 -398.7211 Td -(1389 // between forgetting to initialize lock->cpu) 227.1628 Tj +(1389 lk->cpu = cpu\(\) + 10;) 122.3184 Tj 0 -408.2145 Td -(1390 // and holding a lock on cpu 0.) 166.0035 Tj +(1390 getcallerpcs\(&lk, lk->pcs\);) 148.5295 Tj 0 -417.7079 Td -(1391 lock->cpu = cpu\(\) + 10;) 131.0554 Tj +(1391 }) 26.2111 Tj 0 -427.2012 Td -(1392 getcallerpcs\(&lock, lock->pcs\);) 166.0035 Tj +(1392 ) 21.8426 Tj 0 -436.6946 Td -(1393 }) 26.2111 Tj +(1393 ) 21.8426 Tj 0 -446.1879 Td (1394 ) 21.8426 Tj 0 -455.6813 Td @@ -7458,6 +7509,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -7475,106 +7528,110 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/spinlock.c Page 2) 179.1091 Tj +(Aug 8 01:04 2009 xv6/spinlock.c Page 2) 179.1091 Tj 0 -28.4801 Td (1400 // Release the lock.) 109.2129 Tj 0 -37.9735 Td (1401 void) 39.3166 Tj 0 -47.4668 Td -(1402 release\(struct spinlock *lock\)) 152.898 Tj +(1402 release\(struct spinlock *lk\)) 144.161 Tj 0 -56.9602 Td (1403 {) 26.2111 Tj 0 -66.4535 Td -(1404 if\(!holding\(lock\)\)) 109.2129 Tj +(1404 if\(!holding\(lk\)\)) 100.4758 Tj 0 -75.9469 Td (1405 panic\("release"\);) 113.5814 Tj 0 -85.4403 Td (1406 ) 21.8426 Tj 0 -94.9336 Td -(1407 lock->pcs[0] = 0;) 104.8443 Tj +(1407 lk->pcs[0] = 0;) 96.1073 Tj 0 -104.427 Td -(1408 lock->cpu = 0xffffffff;) 131.0554 Tj +(1408 lk->cpu = 0xffffffff;) 122.3184 Tj 0 -113.9203 Td (1409 ) 21.8426 Tj 0 -123.4137 Td (1410 // The xchg serializes, so that reads before release are) 275.2164 Tj 0 -132.9071 Td -(1411 // not reordered after it. \(This reordering would be a\ -llowed) 297.059 Tj +(1411 // not reordered after it. The 1996 PentiumPro manual \(\ +Volume 3,) 314.533 Tj 0 -142.4004 Td -(1412 // by the Intel manuals, but does not happen on current) 270.8479 Tj +(1412 // 7.2\) says reads can be carried out speculatively and\ + in) 283.9534 Tj 0 -151.8938 Td -(1413 // Intel processors. The xchg being asm volatile also k\ -eeps) 292.6905 Tj +(1413 // any order, which implies we need to serialize here.) 266.4794 Tj 0 -161.3871 Td -(1414 // gcc from delaying the above assignments.\)) 222.7942 Tj +(1414 // But the 2007 Intel 64 Architecture Memory Ordering Wh\ +ite) 288.322 Tj 0 -170.8805 Td -(1415 xchg\(&lock->locked, 0\);) 131.0554 Tj +(1415 // Paper says that Intel 64 and IA-32 will not move a lo\ +ad) 283.9534 Tj 0 -180.3739 Td -(1416 ) 21.8426 Tj +(1416 // after a store. So lock->locked = 0 would work here.) 266.4794 Tj 0 -189.8672 Td -(1417 popcli\(\);) 69.8962 Tj +(1417 // The xchg being asm volatile ensures gcc emits it afte\ +r) 279.5849 Tj 0 -199.3606 Td -(1418 }) 26.2111 Tj +(1418 // the above assignments \(and after the critical sectio\ +n\).) 283.9534 Tj 0 -208.8539 Td -(1419 ) 21.8426 Tj +(1419 xchg\(&lk->locked, 0\);) 122.3184 Tj 0 -218.3473 Td -(1420 // Record the current call stack in pcs[] by following the\ - %ebp chain.) 327.6386 Tj +(1420 ) 21.8426 Tj 0 -227.8407 Td -(1421 void) 39.3166 Tj +(1421 popcli\(\);) 69.8962 Tj 0 -237.334 Td -(1422 getcallerpcs\(void *v, uint pcs[]\)) 166.0035 Tj +(1422 }) 26.2111 Tj 0 -246.8274 Td -(1423 {) 26.2111 Tj +(1423 ) 21.8426 Tj 0 -256.3207 Td -(1424 uint *ebp;) 74.2647 Tj +(1424 // Record the current call stack in pcs[] by following the\ + %ebp chain.) 327.6386 Tj 0 -265.8141 Td -(1425 int i;) 56.7907 Tj +(1425 void) 39.3166 Tj 0 -275.3075 Td -(1426 ) 21.8426 Tj +(1426 getcallerpcs\(void *v, uint pcs[]\)) 166.0035 Tj 0 -284.8008 Td -(1427 ebp = \(uint*\)v - 2;) 113.5814 Tj +(1427 {) 26.2111 Tj 0 -294.2942 Td -(1428 for\(i = 0; i < 10; i++\){) 135.4239 Tj +(1428 uint *ebp;) 74.2647 Tj 0 -303.7875 Td -(1429 if\(ebp == 0 || ebp == \(uint*\)0xffffffff\)) 214.0572 Tj +(1429 int i;) 56.7907 Tj 0 -313.2809 Td -(1430 break;) 74.2647 Tj +(1430 ) 21.8426 Tj 0 -322.7743 Td -(1431 pcs[i] = ebp[1]; // saved %eip) 187.8461 Tj +(1431 ebp = \(uint*\)v - 2;) 113.5814 Tj 0 -332.2676 Td -(1432 ebp = \(uint*\)ebp[0]; // saved %ebp) 187.8461 Tj +(1432 for\(i = 0; i < 10; i++\){) 135.4239 Tj 0 -341.761 Td -(1433 }) 34.9481 Tj +(1433 if\(ebp == 0 || ebp == \(uint*\)0xffffffff\)) 214.0572 Tj 0 -351.2543 Td -(1434 for\(; i < 10; i++\)) 109.2129 Tj +(1434 break;) 74.2647 Tj 0 -360.7477 Td -(1435 pcs[i] = 0;) 87.3703 Tj +(1435 pcs[i] = ebp[1]; // saved %eip) 187.8461 Tj 0 -370.2411 Td -(1436 }) 26.2111 Tj +(1436 ebp = \(uint*\)ebp[0]; // saved %ebp) 187.8461 Tj 0 -379.7344 Td -(1437 ) 21.8426 Tj +(1437 }) 34.9481 Tj 0 -389.2278 Td -(1438 // Check whether this cpu is holding the lock.) 222.7942 Tj +(1438 for\(; i < 10; i++\)) 109.2129 Tj 0 -398.7211 Td -(1439 int) 34.9481 Tj +(1439 pcs[i] = 0;) 87.3703 Tj 0 -408.2145 Td -(1440 holding\(struct spinlock *lock\)) 152.898 Tj +(1440 }) 26.2111 Tj 0 -417.7079 Td -(1441 {) 26.2111 Tj +(1441 ) 21.8426 Tj 0 -427.2012 Td -(1442 return lock->locked && lock->cpu == cpu\(\) + 10;) 235.8998 Tj +(1442 // Check whether this cpu is holding the lock.) 222.7942 Tj 0 -436.6946 Td -(1443 }) 26.2111 Tj +(1443 int) 34.9481 Tj 0 -446.1879 Td -(1444 ) 21.8426 Tj +(1444 holding\(struct spinlock *lock\)) 152.898 Tj 0 -455.6813 Td -(1445 ) 21.8426 Tj +(1445 {) 26.2111 Tj 0 -465.1747 Td -(1446 ) 21.8426 Tj +(1446 return lock->locked && lock->cpu == cpu\(\) + 10;) 235.8998 Tj 0 -474.668 Td -(1447 ) 21.8426 Tj +(1447 }) 26.2111 Tj 0 -484.1614 Td (1448 ) 21.8426 Tj 0 -493.6547 Td @@ -7597,7 +7654,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/spinlock.c Page 3) 179.1091 Tj +(Aug 8 01:04 2009 xv6/spinlock.c Page 3) 179.1091 Tj 0 -28.4801 Td (1450 // Pushcli/popcli are like cli/sti except that they are ma\ tched:) 301.4275 Tj @@ -7619,13 +7676,13 @@ rrupts) 301.4275 Tj 0 -104.427 Td (1458 ) 21.8426 Tj 0 -113.9203 Td -(1459 eflags = read_eflags\(\);) 131.0554 Tj +(1459 eflags = readeflags\(\);) 126.6869 Tj 0 -123.4137 Td (1460 cli\(\);) 56.7907 Tj 0 -132.9071 Td -(1461 if\(cpus[cpu\(\)].ncli++ == 0\)) 148.5295 Tj +(1461 if\(c->ncli++ == 0\)) 109.2129 Tj 0 -142.4004 Td -(1462 cpus[cpu\(\)].intena = eflags & FL_IF;) 196.5831 Tj +(1462 c->intena = eflags & FL_IF;) 157.2665 Tj 0 -151.8938 Td (1463 }) 26.2111 Tj 0 -161.3871 Td @@ -7637,15 +7694,15 @@ rrupts) 301.4275 Tj 0 -189.8672 Td (1467 {) 26.2111 Tj 0 -199.3606 Td -(1468 if\(read_eflags\(\)&FL_IF\)) 131.0554 Tj +(1468 if\(readeflags\(\)&FL_IF\)) 126.6869 Tj 0 -208.8539 Td (1469 panic\("popcli - interruptible"\);) 179.1091 Tj 0 -218.3473 Td -(1470 if\(--cpus[cpu\(\)].ncli < 0\)) 144.161 Tj +(1470 if\(--c->ncli < 0\)) 104.8443 Tj 0 -227.8407 Td (1471 panic\("popcli"\);) 109.2129 Tj 0 -237.334 Td -(1472 if\(cpus[cpu\(\)].ncli == 0 && cpus[cpu\(\)].intena\)) 235.8998 Tj +(1472 if\(c->ncli == 0 && c->intena\)) 157.2665 Tj 0 -246.8274 Td (1473 sti\(\);) 65.5277 Tj 0 -256.3207 Td @@ -7730,6 +7787,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -7747,63 +7806,65 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/proc.h Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.h Page 1) 161.635 Tj 0 -28.4801 Td -(1500 // Segments in proc->gdt) 126.6869 Tj +(1500 // Segments in proc->gdt.) 131.0554 Tj 0 -37.9735 Td -(1501 #define SEG_KCODE 1 // kernel code) 174.7406 Tj +(1501 // Also known to bootasm.S and trapasm.S) 196.5831 Tj 0 -47.4668 Td -(1502 #define SEG_KDATA 2 // kernel data+stack) 200.9517 Tj +(1502 #define SEG_KCODE 1 // kernel code) 174.7406 Tj 0 -56.9602 Td -(1503 #define SEG_UCODE 3) 104.8443 Tj +(1503 #define SEG_KDATA 2 // kernel data+stack) 200.9517 Tj 0 -66.4535 Td -(1504 #define SEG_UDATA 4) 104.8443 Tj +(1504 #define SEG_KCPU 3 // kernel per-cpu data) 209.6887 Tj 0 -75.9469 Td -(1505 #define SEG_TSS 5 // this process's task state) 235.8998 Tj +(1505 #define SEG_UCODE 4) 104.8443 Tj 0 -85.4403 Td -(1506 #define NSEGS 6) 104.8443 Tj +(1506 #define SEG_UDATA 5) 104.8443 Tj 0 -94.9336 Td -(1507 ) 21.8426 Tj +(1507 #define SEG_TSS 6 // this process's task state) 235.8998 Tj 0 -104.427 Td -(1508 // Saved registers for kernel context switches.) 227.1628 Tj +(1508 #define NSEGS 7) 104.8443 Tj 0 -113.9203 Td -(1509 // Don't need to save all the %fs etc. segment registers,) 270.8479 Tj +(1509 ) 21.8426 Tj 0 -123.4137 Td -(1510 // because they are constant across kernel contexts.) 249.0053 Tj +(1510 // Saved registers for kernel context switches.) 227.1628 Tj 0 -132.9071 Td -(1511 // Save all the regular registers so we don't need to care) 275.2164 Tj +(1511 // Don't need to save all the segment registers \(%cs, etc\ +\),) 279.5849 Tj 0 -142.4004 Td -(1512 // which are caller save, but not the return register %eax\ -.) 279.5849 Tj +(1512 // because they are constant across kernel contexts.) 249.0053 Tj 0 -151.8938 Td -(1513 // \(Not saving %eax just simplifies the switching code.\)) 266.4794 Tj +(1513 // Don't need to save %eax, %ecx, %edx, because the) 244.6368 Tj 0 -161.3871 Td -(1514 // The layout of context must match code in swtch.S.) 249.0053 Tj +(1514 // x86 convention is that the caller has saved them.) 249.0053 Tj 0 -170.8805 Td -(1515 struct context {) 91.7388 Tj +(1515 // Contexts are stored at the bottom of the stack they) 257.7424 Tj 0 -180.3739 Td -(1516 int eip;) 65.5277 Tj +(1516 // describe; the stack pointer is the address of the conte\ +xt.) 288.322 Tj 0 -189.8672 Td -(1517 int esp;) 65.5277 Tj +(1517 // The layout of the context must match the code in swtch.\ +S.) 283.9534 Tj 0 -199.3606 Td -(1518 int ebx;) 65.5277 Tj +(1518 struct context {) 91.7388 Tj 0 -208.8539 Td -(1519 int ecx;) 65.5277 Tj +(1519 uint edi;) 69.8962 Tj 0 -218.3473 Td -(1520 int edx;) 65.5277 Tj +(1520 uint esi;) 69.8962 Tj 0 -227.8407 Td -(1521 int esi;) 65.5277 Tj +(1521 uint ebx;) 69.8962 Tj 0 -237.334 Td -(1522 int edi;) 65.5277 Tj +(1522 uint ebp;) 69.8962 Tj 0 -246.8274 Td -(1523 int ebp;) 65.5277 Tj +(1523 uint eip;) 69.8962 Tj 0 -256.3207 Td (1524 };) 30.5796 Tj 0 -265.8141 Td (1525 ) 21.8426 Tj 0 -275.3075 Td -(1526 enum proc_state { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNN\ -ING, ZOMBIE };) 336.3756 Tj +(1526 enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNI\ +NG, ZOMBIE };) 332.0071 Tj 0 -284.8008 Td (1527 ) 21.8426 Tj 0 -294.2942 Td @@ -7811,37 +7872,39 @@ ING, ZOMBIE };) 336.3756 Tj 0 -303.7875 Td (1529 struct proc {) 78.6333 Tj 0 -313.2809 Td -(1530 char *mem; // Start of process memory \(k\ -ernel address\)) 332.0071 Tj +(1530 char *mem; // Start of process memory \ +\(kernel address\)) 345.1126 Tj 0 -322.7743 Td -(1531 uint sz; // Size of process memory \(by\ -tes\)) 288.322 Tj +(1531 uint sz; // Size of process memory \(\ +bytes\)) 301.4275 Tj 0 -332.2676 Td -(1532 char *kstack; // Bottom of kernel stack for \ -this process) 327.6386 Tj +(1532 char *kstack; // Bottom of kernel stack f\ +or this process) 340.7441 Tj 0 -341.761 Td -(1533 enum proc_state state; // Process state) 214.0572 Tj +(1533 enum procstate state; // Process state) 222.7942 Tj 0 -351.2543 Td -(1534 int pid; // Process ID) 200.9517 Tj +(1534 volatile int pid; // Process ID) 214.0572 Tj 0 -360.7477 Td -(1535 struct proc *parent; // Parent process) 218.4257 Tj +(1535 struct proc *parent; // Parent process) 231.5313 Tj 0 -370.2411 Td -(1536 void *chan; // If non-zero, sleeping on ch\ -an) 283.9534 Tj +(1536 struct trapframe *tf; // Trap frame for current s\ +yscall) 301.4275 Tj 0 -379.7344 Td -(1537 int killed; // If non-zero, have been kill\ -ed) 283.9534 Tj +(1537 struct context *context; // Switch here to run proce\ +ss) 283.9534 Tj 0 -389.2278 Td -(1538 struct file *ofile[NOFILE]; // Open files) 214.0572 Tj +(1538 void *chan; // If non-zero, sleeping on\ + chan) 297.059 Tj 0 -398.7211 Td -(1539 struct inode *cwd; // Current directory) 231.5313 Tj +(1539 int killed; // If non-zero, have been k\ +illed) 297.059 Tj 0 -408.2145 Td -(1540 struct context context; // Switch here to run process) 270.8479 Tj +(1540 struct file *ofile[NOFILE]; // Open files) 214.0572 Tj 0 -417.7079 Td -(1541 struct trapframe *tf; // Trap frame for current inte\ -rrupt) 297.059 Tj +(1541 struct inode *cwd; // Current directory) 244.6368 Tj 0 -427.2012 Td -(1542 char name[16]; // Process name \(debugging\)) 262.1109 Tj +(1542 char name[16]; // Process name \(debugging\ +\)) 275.2164 Tj 0 -436.6946 Td (1543 };) 30.5796 Tj 0 -446.1879 Td @@ -7874,7 +7937,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:04 2008 xv6/proc.h Page 2) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.h Page 2) 161.635 Tj 0 -28.4801 Td (1550 // Process memory is laid out contiguously, low addresses \ first:) 301.4275 Tj @@ -7893,26 +7956,26 @@ first:) 301.4275 Tj 0 -94.9336 Td (1557 struct cpu {) 74.2647 Tj 0 -104.427 Td -(1558 uchar apicid; // Local APIC ID) 222.7942 Tj +(1558 uchar apicid; // Local APIC ID) 227.1628 Tj 0 -113.9203 Td -(1559 struct proc *curproc; // Process currently running\ -.) 279.5849 Tj +(1559 struct context *context; // Switch here to enter sch\ +eduler) 301.4275 Tj 0 -123.4137 Td -(1560 struct context context; // Switch here to enter sche\ -duler) 297.059 Tj +(1560 struct taskstate ts; // Used by x86 to find stac\ +k for interrupt) 340.7441 Tj 0 -132.9071 Td -(1561 struct taskstate ts; // Used by x86 to find stack\ - for interrupt) 336.3756 Tj +(1561 struct segdesc gdt[NSEGS]; // x86 global descriptor ta\ +ble) 288.322 Tj 0 -142.4004 Td -(1562 struct segdesc gdt[NSEGS]; // x86 global descriptor tab\ -le) 283.9534 Tj +(1562 volatile uint booted; // Has the CPU started?) 257.7424 Tj 0 -151.8938 Td -(1563 volatile uint booted; // Has the CPU started?) 257.7424 Tj +(1563 int ncli; // Depth of pushcli nesting\ +.) 279.5849 Tj 0 -161.3871 Td -(1564 int ncli; // Depth of pushcli nesting.) 275.2164 Tj +(1564 int intena; // Were interrupts enabled \ +before pushcli?) 340.7441 Tj 0 -170.8805 Td -(1565 int intena; // Were interrupts enabled b\ -efore pushcli?) 336.3756 Tj +(1565 void *tls[2];) 87.3703 Tj 0 -180.3739 Td (1566 };) 30.5796 Tj 0 -189.8672 Td @@ -7924,21 +7987,24 @@ efore pushcli?) 336.3756 Tj 0 -218.3473 Td (1570 ) 21.8426 Tj 0 -227.8407 Td -(1571 // "cp" is a short alias for curproc\(\).) 192.2146 Tj +(1571 // Per-CPU variables, holding pointers to the) 218.4257 Tj 0 -237.334 Td -(1572 // It gets used enough to make this worthwhile.) 227.1628 Tj +(1572 // current cpu and to the current process.) 205.3202 Tj 0 -246.8274 Td -(1573 #define cp curproc\(\)) 109.2129 Tj +(1573 // The __thread prefix tells gcc to refer to them in the s\ +egment) 301.4275 Tj 0 -256.3207 Td -(1574 ) 21.8426 Tj +(1574 // pointed at by gs; the name __thread derives from the us\ +e) 279.5849 Tj 0 -265.8141 Td -(1575 ) 21.8426 Tj +(1575 // of the same mechanism to provide per-thread storage in) 270.8479 Tj 0 -275.3075 Td -(1576 ) 21.8426 Tj +(1576 // multithreaded user programs.) 157.2665 Tj 0 -284.8008 Td -(1577 ) 21.8426 Tj +(1577 extern __thread struct cpu *c; // This cpu.) 235.8998 Tj 0 -294.2942 Td -(1578 ) 21.8426 Tj +(1578 extern __thread struct proc *cp; // Current process on\ + this cpu.) 318.9016 Tj 0 -303.7875 Td (1579 ) 21.8426 Tj 0 -313.2809 Td @@ -8011,6 +8077,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -8028,7 +8096,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 1) 161.635 Tj 0 -28.4801 Td (1600 #include "types.h") 100.4758 Tj 0 -37.9735 Td @@ -8046,79 +8114,79 @@ q 0 -94.9336 Td (1607 ) 21.8426 Tj 0 -104.427 Td -(1608 struct spinlock proc_table_lock;) 161.635 Tj +(1608 struct {) 56.7907 Tj 0 -113.9203 Td -(1609 ) 21.8426 Tj +(1609 struct spinlock lock;) 122.3184 Tj 0 -123.4137 Td -(1610 struct proc proc[NPROC];) 126.6869 Tj +(1610 struct proc proc[NPROC];) 135.4239 Tj 0 -132.9071 Td -(1611 static struct proc *initproc;) 148.5295 Tj +(1611 } ptable;) 61.1592 Tj 0 -142.4004 Td (1612 ) 21.8426 Tj 0 -151.8938 Td -(1613 int nextpid = 1;) 91.7388 Tj +(1613 static struct proc *initproc;) 148.5295 Tj 0 -161.3871 Td -(1614 extern void forkret\(void\);) 135.4239 Tj +(1614 ) 21.8426 Tj 0 -170.8805 Td -(1615 extern void forkret1\(struct trapframe*\);) 196.5831 Tj +(1615 int nextpid = 1;) 91.7388 Tj 0 -180.3739 Td -(1616 ) 21.8426 Tj +(1616 extern void forkret\(void\);) 135.4239 Tj 0 -189.8672 Td -(1617 void) 39.3166 Tj +(1617 extern void trapret\(void\);) 135.4239 Tj 0 -199.3606 Td -(1618 pinit\(void\)) 69.8962 Tj +(1618 ) 21.8426 Tj 0 -208.8539 Td -(1619 {) 26.2111 Tj +(1619 void) 39.3166 Tj 0 -218.3473 Td -(1620 initlock\(&proc_table_lock, "proc_table"\);) 209.6887 Tj +(1620 pinit\(void\)) 69.8962 Tj 0 -227.8407 Td -(1621 }) 26.2111 Tj +(1621 {) 26.2111 Tj 0 -237.334 Td -(1622 ) 21.8426 Tj +(1622 initlock\(&ptable.lock, "ptable"\);) 174.7406 Tj 0 -246.8274 Td -(1623 // Look in the process table for an UNUSED proc.) 231.5313 Tj +(1623 }) 26.2111 Tj 0 -256.3207 Td -(1624 // If found, change state to EMBRYO and return it.) 240.2683 Tj +(1624 ) 21.8426 Tj 0 -265.8141 Td -(1625 // Otherwise return 0.) 117.9499 Tj +(1625 ) 21.8426 Tj 0 -275.3075 Td -(1626 static struct proc*) 104.8443 Tj +(1626 ) 21.8426 Tj 0 -284.8008 Td -(1627 allocproc\(void\)) 87.3703 Tj +(1627 ) 21.8426 Tj 0 -294.2942 Td -(1628 {) 26.2111 Tj +(1628 ) 21.8426 Tj 0 -303.7875 Td -(1629 int i;) 56.7907 Tj +(1629 ) 21.8426 Tj 0 -313.2809 Td -(1630 struct proc *p;) 96.1073 Tj +(1630 ) 21.8426 Tj 0 -322.7743 Td (1631 ) 21.8426 Tj 0 -332.2676 Td -(1632 acquire\(&proc_table_lock\);) 144.161 Tj +(1632 ) 21.8426 Tj 0 -341.761 Td -(1633 for\(i = 0; i < NPROC; i++\){) 148.5295 Tj +(1633 ) 21.8426 Tj 0 -351.2543 Td -(1634 p = &proc[i];) 96.1073 Tj +(1634 ) 21.8426 Tj 0 -360.7477 Td -(1635 if\(p->state == UNUSED\){) 139.7925 Tj +(1635 ) 21.8426 Tj 0 -370.2411 Td -(1636 p->state = EMBRYO;) 126.6869 Tj +(1636 ) 21.8426 Tj 0 -379.7344 Td -(1637 p->pid = nextpid++;) 131.0554 Tj +(1637 ) 21.8426 Tj 0 -389.2278 Td -(1638 release\(&proc_table_lock\);) 161.635 Tj +(1638 ) 21.8426 Tj 0 -398.7211 Td -(1639 return p;) 87.3703 Tj +(1639 ) 21.8426 Tj 0 -408.2145 Td -(1640 }) 43.6851 Tj +(1640 ) 21.8426 Tj 0 -417.7079 Td -(1641 }) 34.9481 Tj +(1641 ) 21.8426 Tj 0 -427.2012 Td -(1642 release\(&proc_table_lock\);) 144.161 Tj +(1642 ) 21.8426 Tj 0 -436.6946 Td -(1643 return 0;) 69.8962 Tj +(1643 ) 21.8426 Tj 0 -446.1879 Td -(1644 }) 26.2111 Tj +(1644 ) 21.8426 Tj 0 -455.6813 Td (1645 ) 21.8426 Tj 0 -465.1747 Td @@ -8147,105 +8215,100 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 2) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 2) 161.635 Tj 0 -28.4801 Td -(1650 // Grow current process's memory by n bytes.) 214.0572 Tj +(1650 // Print a process listing to console. For debugging.) 257.7424 Tj 0 -37.9735 Td -(1651 // Return old size on success, -1 on failure.) 218.4257 Tj +(1651 // Runs when user types ^P on console.) 187.8461 Tj 0 -47.4668 Td -(1652 int) 34.9481 Tj +(1652 // No lock to avoid wedging a stuck machine further.) 249.0053 Tj 0 -56.9602 Td -(1653 growproc\(int n\)) 87.3703 Tj +(1653 void) 39.3166 Tj 0 -66.4535 Td -(1654 {) 26.2111 Tj +(1654 procdump\(void\)) 83.0018 Tj 0 -75.9469 Td -(1655 char *newmem;) 87.3703 Tj +(1655 {) 26.2111 Tj 0 -85.4403 Td -(1656 ) 21.8426 Tj +(1656 static char *states[] = {) 139.7925 Tj 0 -94.9336 Td -(1657 newmem = kalloc\(cp->sz + n\);) 152.898 Tj +(1657 [UNUSED] "unused",) 122.3184 Tj 0 -104.427 Td -(1658 if\(newmem == 0\)) 96.1073 Tj +(1658 [EMBRYO] "embryo",) 122.3184 Tj 0 -113.9203 Td -(1659 return -1;) 83.0018 Tj +(1659 [SLEEPING] "sleep ",) 122.3184 Tj 0 -123.4137 Td -(1660 memmove\(newmem, cp->mem, cp->sz\);) 174.7406 Tj +(1660 [RUNNABLE] "runble",) 122.3184 Tj 0 -132.9071 Td -(1661 memset\(newmem + cp->sz, 0, n\);) 161.635 Tj +(1661 [RUNNING] "run ",) 122.3184 Tj 0 -142.4004 Td -(1662 kfree\(cp->mem, cp->sz\);) 131.0554 Tj +(1662 [ZOMBIE] "zombie") 117.9499 Tj 0 -151.8938 Td -(1663 cp->mem = newmem;) 104.8443 Tj +(1663 };) 39.3166 Tj 0 -161.3871 Td -(1664 cp->sz += n;) 83.0018 Tj +(1664 int i;) 56.7907 Tj 0 -170.8805 Td -(1665 setupsegs\(cp\);) 91.7388 Tj +(1665 struct proc *p;) 96.1073 Tj 0 -180.3739 Td -(1666 return cp->sz - n;) 109.2129 Tj +(1666 char *state;) 83.0018 Tj 0 -189.8672 Td -(1667 }) 26.2111 Tj +(1667 uint pc[10];) 83.0018 Tj 0 -199.3606 Td (1668 ) 21.8426 Tj 0 -208.8539 Td -(1669 // Set up CPU's segment descriptors and task state for a g\ -iven process.) 332.0071 Tj +(1669 for\(p = ptable.proc; p < &ptable.proc[NPROC]; p++\){) 253.3738 Tj 0 -218.3473 Td -(1670 // If p==0, set up for "idle" state for when scheduler\(\)\ - is running.) 318.9016 Tj +(1670 if\(p->state == UNUSED\)) 135.4239 Tj 0 -227.8407 Td -(1671 void) 39.3166 Tj +(1671 continue;) 87.3703 Tj 0 -237.334 Td -(1672 setupsegs\(struct proc *p\)) 131.0554 Tj +(1672 if\(p->state >= 0 && p->state < NELEM\(states\) && sta\ +tes[p->state]\)) 323.2701 Tj 0 -246.8274 Td -(1673 {) 26.2111 Tj +(1673 state = states[p->state];) 157.2665 Tj 0 -256.3207 Td -(1674 struct cpu *c;) 91.7388 Tj +(1674 else) 56.7907 Tj 0 -265.8141 Td -(1675 ) 21.8426 Tj +(1675 state = "???";) 109.2129 Tj 0 -275.3075 Td -(1676 pushcli\(\);) 74.2647 Tj +(1676 cprintf\("%d %s %s", p->pid, state, p->name\);) 231.5313 Tj 0 -284.8008 Td -(1677 c = &cpus[cpu\(\)];) 104.8443 Tj +(1677 if\(p->state == SLEEPING\){) 148.5295 Tj 0 -294.2942 Td -(1678 c->ts.ss0 = SEG_KDATA << 3;) 148.5295 Tj +(1678 getcallerpcs\(\(uint*\)p->context->ebp+2, pc\);) 235.8998 Tj 0 -303.7875 Td -(1679 if\(p\)) 52.4222 Tj +(1679 for\(i=0; i<10 && pc[i] != 0; i++\)) 192.2146 Tj 0 -313.2809 Td -(1680 c->ts.esp0 = \(uint\)\(p->kstack + KSTACKSIZE\);) 231.5313 Tj +(1680 cprintf\(" %p", pc[i]\);) 152.898 Tj 0 -322.7743 Td -(1681 else) 48.0537 Tj +(1681 }) 43.6851 Tj 0 -332.2676 Td -(1682 c->ts.esp0 = 0xffffffff;) 144.161 Tj +(1682 cprintf\("\\n"\);) 100.4758 Tj 0 -341.761 Td -(1683 ) 21.8426 Tj +(1683 }) 34.9481 Tj 0 -351.2543 Td -(1684 c->gdt[0] = SEG_NULL;) 122.3184 Tj +(1684 }) 26.2111 Tj 0 -360.7477 Td -(1685 c->gdt[SEG_KCODE] = SEG\(STA_X|STA_R, 0, 0x100000 + 64*1\ -024-1, 0\);) 314.533 Tj +(1685 ) 21.8426 Tj 0 -370.2411 Td -(1686 c->gdt[SEG_KDATA] = SEG\(STA_W, 0, 0xffffffff, 0\);) 244.6368 Tj +(1686 ) 21.8426 Tj 0 -379.7344 Td -(1687 c->gdt[SEG_TSS] = SEG16\(STS_T32A, \(uint\)&c->ts, sizeo\ -f\(c->ts\)-1, 0\);) 327.6386 Tj +(1687 ) 21.8426 Tj 0 -389.2278 Td -(1688 c->gdt[SEG_TSS].s = 0;) 126.6869 Tj +(1688 ) 21.8426 Tj 0 -398.7211 Td -(1689 if\(p\){) 56.7907 Tj +(1689 ) 21.8426 Tj 0 -408.2145 Td -(1690 c->gdt[SEG_UCODE] = SEG\(STA_X|STA_R, \(uint\)p->mem, \ -p->sz-1, DPL_USER\);) 345.1126 Tj +(1690 ) 21.8426 Tj 0 -417.7079 Td -(1691 c->gdt[SEG_UDATA] = SEG\(STA_W, \(uint\)p->mem, p->sz-\ -1, DPL_USER\);) 318.9016 Tj +(1691 ) 21.8426 Tj 0 -427.2012 Td -(1692 } else {) 65.5277 Tj +(1692 ) 21.8426 Tj 0 -436.6946 Td -(1693 c->gdt[SEG_UCODE] = SEG_NULL;) 166.0035 Tj +(1693 ) 21.8426 Tj 0 -446.1879 Td -(1694 c->gdt[SEG_UDATA] = SEG_NULL;) 166.0035 Tj +(1694 ) 21.8426 Tj 0 -455.6813 Td -(1695 }) 34.9481 Tj +(1695 ) 21.8426 Tj 0 -465.1747 Td (1696 ) 21.8426 Tj 0 -474.668 Td @@ -8284,6 +8347,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -8301,107 +8366,112 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 3) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 3) 161.635 Tj 0 -28.4801 Td -(1700 lgdt\(c->gdt, sizeof\(c->gdt\)\);) 157.2665 Tj +(1700 // Set up CPU's kernel segment descriptors.) 209.6887 Tj 0 -37.9735 Td -(1701 ltr\(SEG_TSS << 3\);) 109.2129 Tj +(1701 // Run once at boot time on each CPU.) 183.4776 Tj 0 -47.4668 Td -(1702 popcli\(\);) 69.8962 Tj +(1702 void) 39.3166 Tj 0 -56.9602 Td -(1703 }) 26.2111 Tj +(1703 ksegment\(void\)) 83.0018 Tj 0 -66.4535 Td -(1704 ) 21.8426 Tj +(1704 {) 26.2111 Tj 0 -75.9469 Td -(1705 // Create a new process copying p as the parent.) 231.5313 Tj +(1705 struct cpu *c1;) 96.1073 Tj 0 -85.4403 Td -(1706 // Sets up stack to return as if from system call.) 240.2683 Tj +(1706 ) 21.8426 Tj 0 -94.9336 Td -(1707 // Caller must set state of returned proc to RUNNABLE.) 257.7424 Tj +(1707 c1 = &cpus[cpu\(\)];) 109.2129 Tj 0 -104.427 Td -(1708 struct proc*) 74.2647 Tj +(1708 c1->gdt[SEG_KCODE] = SEG\(STA_X|STA_R, 0, 0x100000 + 64*\ +1024-1, 0\);) 318.9016 Tj 0 -113.9203 Td -(1709 copyproc\(struct proc *p\)) 126.6869 Tj +(1709 c1->gdt[SEG_KDATA] = SEG\(STA_W, 0, 0xffffffff, 0\);) 249.0053 Tj 0 -123.4137 Td -(1710 {) 26.2111 Tj +(1710 c1->gdt[SEG_KCPU] = SEG\(STA_W, \(uint\)\(&c1->tls+1\), \ +0xffffffff, 0\);) 318.9016 Tj 0 -132.9071 Td -(1711 int i;) 56.7907 Tj +(1711 lgdt\(c1->gdt, sizeof\(c1->gdt\)\);) 166.0035 Tj 0 -142.4004 Td -(1712 struct proc *np;) 100.4758 Tj +(1712 loadfsgs\(SEG_KCPU << 3\);) 135.4239 Tj 0 -151.8938 Td (1713 ) 21.8426 Tj 0 -161.3871 Td -(1714 // Allocate process.) 117.9499 Tj +(1714 // Initialize cpu-local variables.) 179.1091 Tj 0 -170.8805 Td -(1715 if\(\(np = allocproc\(\)\) == 0\)) 148.5295 Tj +(1715 c = c1;) 61.1592 Tj 0 -180.3739 Td -(1716 return 0;) 78.6333 Tj +(1716 cp = 0;) 61.1592 Tj 0 -189.8672 Td -(1717 ) 21.8426 Tj +(1717 }) 26.2111 Tj 0 -199.3606 Td -(1718 // Allocate kernel stack.) 139.7925 Tj +(1718 ) 21.8426 Tj 0 -208.8539 Td -(1719 if\(\(np->kstack = kalloc\(KSTACKSIZE\)\) == 0\){) 218.4257 Tj +(1719 // Set up CPU's segment descriptors and current process ta\ +sk state.) 314.533 Tj 0 -218.3473 Td -(1720 np->state = UNUSED;) 122.3184 Tj +(1720 // If cp==0, set up for "idle" state for when scheduler\(\)\ + is running.) 323.2701 Tj 0 -227.8407 Td -(1721 return 0;) 78.6333 Tj +(1721 void) 39.3166 Tj 0 -237.334 Td -(1722 }) 34.9481 Tj +(1722 usegment\(void\)) 83.0018 Tj 0 -246.8274 Td -(1723 np->tf = \(struct trapframe*\)\(np->kstack + KSTACKSIZE\)\ - - 1;) 283.9534 Tj +(1723 {) 26.2111 Tj 0 -256.3207 Td -(1724 ) 21.8426 Tj +(1724 pushcli\(\);) 74.2647 Tj 0 -265.8141 Td -(1725 if\(p\){ // Copy process state from p.) 192.2146 Tj +(1725 c->gdt[SEG_UCODE] = SEG\(STA_X|STA_R, \(uint\)cp->mem, c\ +p->sz-1, DPL_USER\);) 345.1126 Tj 0 -275.3075 Td -(1726 np->parent = p;) 104.8443 Tj +(1726 c->gdt[SEG_UDATA] = SEG\(STA_W, \(uint\)cp->mem, cp->sz-\ +1, DPL_USER\);) 318.9016 Tj 0 -284.8008 Td -(1727 memmove\(np->tf, p->tf, sizeof\(*np->tf\)\);) 214.0572 Tj +(1727 c->gdt[SEG_TSS] = SEG16\(STS_T32A, \(uint\)&c->ts, sizeo\ +f\(c->ts\)-1, 0\);) 327.6386 Tj 0 -294.2942 Td -(1728 ) 21.8426 Tj +(1728 c->gdt[SEG_TSS].s = 0;) 126.6869 Tj 0 -303.7875 Td -(1729 np->sz = p->sz;) 104.8443 Tj +(1729 c->ts.ss0 = SEG_KDATA << 3;) 148.5295 Tj 0 -313.2809 Td -(1730 if\(\(np->mem = kalloc\(np->sz\)\) == 0\){) 196.5831 Tj +(1730 c->ts.esp0 = \(uint\)cp->kstack + KSTACKSIZE;) 218.4257 Tj 0 -322.7743 Td -(1731 kfree\(np->kstack, KSTACKSIZE\);) 179.1091 Tj +(1731 ltr\(SEG_TSS << 3\);) 109.2129 Tj 0 -332.2676 Td -(1732 np->kstack = 0;) 113.5814 Tj +(1732 popcli\(\);) 69.8962 Tj 0 -341.761 Td -(1733 np->state = UNUSED;) 131.0554 Tj +(1733 }) 26.2111 Tj 0 -351.2543 Td -(1734 np->parent = 0;) 113.5814 Tj +(1734 ) 21.8426 Tj 0 -360.7477 Td -(1735 return 0;) 87.3703 Tj +(1735 ) 21.8426 Tj 0 -370.2411 Td -(1736 }) 43.6851 Tj +(1736 ) 21.8426 Tj 0 -379.7344 Td -(1737 memmove\(np->mem, p->mem, np->sz\);) 183.4776 Tj +(1737 ) 21.8426 Tj 0 -389.2278 Td (1738 ) 21.8426 Tj 0 -398.7211 Td -(1739 for\(i = 0; i < NOFILE; i++\)) 157.2665 Tj +(1739 ) 21.8426 Tj 0 -408.2145 Td -(1740 if\(p->ofile[i]\)) 113.5814 Tj +(1740 ) 21.8426 Tj 0 -417.7079 Td -(1741 np->ofile[i] = filedup\(p->ofile[i]\);) 214.0572 Tj +(1741 ) 21.8426 Tj 0 -427.2012 Td -(1742 np->cwd = idup\(p->cwd\);) 139.7925 Tj +(1742 ) 21.8426 Tj 0 -436.6946 Td -(1743 }) 34.9481 Tj +(1743 ) 21.8426 Tj 0 -446.1879 Td (1744 ) 21.8426 Tj 0 -455.6813 Td -(1745 // Set up new context to start executing at forkret \(se\ -e below\).) 310.1645 Tj +(1745 ) 21.8426 Tj 0 -465.1747 Td -(1746 memset\(&np->context, 0, sizeof\(np->context\)\);) 227.1628 Tj +(1746 ) 21.8426 Tj 0 -474.668 Td -(1747 np->context.eip = \(uint\)forkret;) 170.3721 Tj +(1747 ) 21.8426 Tj 0 -484.1614 Td -(1748 np->context.esp = \(uint\)np->tf;) 166.0035 Tj +(1748 ) 21.8426 Tj 0 -493.6547 Td (1749 ) 21.8426 Tj 0 -522.1348 Td @@ -8422,107 +8492,103 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 4) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 4) 161.635 Tj 0 -28.4801 Td -(1750 // Clear %eax so that fork system call returns 0 in chil\ -d.) 283.9534 Tj +(1750 // Look in the process table for an UNUSED proc.) 231.5313 Tj 0 -37.9735 Td -(1751 np->tf->eax = 0;) 100.4758 Tj +(1751 // If found, change state to EMBRYO and return it.) 240.2683 Tj 0 -47.4668 Td -(1752 return np;) 74.2647 Tj +(1752 // Otherwise return 0.) 117.9499 Tj 0 -56.9602 Td -(1753 }) 26.2111 Tj +(1753 static struct proc*) 104.8443 Tj 0 -66.4535 Td -(1754 ) 21.8426 Tj +(1754 allocproc\(void\)) 87.3703 Tj 0 -75.9469 Td -(1755 // Set up first user process.) 148.5295 Tj +(1755 {) 26.2111 Tj 0 -85.4403 Td -(1756 void) 39.3166 Tj +(1756 struct proc *p;) 96.1073 Tj 0 -94.9336 Td -(1757 userinit\(void\)) 83.0018 Tj +(1757 char *sp;) 69.8962 Tj 0 -104.427 Td -(1758 {) 26.2111 Tj +(1758 ) 21.8426 Tj 0 -113.9203 Td -(1759 struct proc *p;) 96.1073 Tj +(1759 acquire\(&ptable.lock\);) 126.6869 Tj 0 -123.4137 Td -(1760 extern uchar _binary_initcode_start[], _binary_initcode_\ -size[];) 305.796 Tj +(1760 for\(p = ptable.proc; p < &ptable.proc[NPROC]; p++\)) 249.0053 Tj 0 -132.9071 Td -(1761 ) 21.8426 Tj +(1761 if\(p->state == UNUSED\)) 135.4239 Tj 0 -142.4004 Td -(1762 p = copyproc\(0\);) 100.4758 Tj +(1762 goto found;) 96.1073 Tj 0 -151.8938 Td -(1763 p->sz = PAGE;) 87.3703 Tj +(1763 release\(&ptable.lock\);) 126.6869 Tj 0 -161.3871 Td -(1764 p->mem = kalloc\(p->sz\);) 131.0554 Tj +(1764 return 0;) 69.8962 Tj 0 -170.8805 Td -(1765 p->cwd = namei\("/"\);) 117.9499 Tj +(1765 ) 21.8426 Tj 0 -180.3739 Td -(1766 memset\(p->tf, 0, sizeof\(*p->tf\)\);) 174.7406 Tj +(1766 found:) 48.0537 Tj 0 -189.8672 Td -(1767 p->tf->cs = \(SEG_UCODE << 3\) | DPL_USER;) 205.3202 Tj +(1767 p->state = EMBRYO;) 109.2129 Tj 0 -199.3606 Td -(1768 p->tf->ds = \(SEG_UDATA << 3\) | DPL_USER;) 205.3202 Tj +(1768 p->pid = nextpid++;) 113.5814 Tj 0 -208.8539 Td -(1769 p->tf->es = p->tf->ds;) 126.6869 Tj +(1769 release\(&ptable.lock\);) 126.6869 Tj 0 -218.3473 Td -(1770 p->tf->ss = p->tf->ds;) 126.6869 Tj +(1770 ) 21.8426 Tj 0 -227.8407 Td -(1771 p->tf->eflags = FL_IF;) 126.6869 Tj +(1771 // Allocate kernel stack if necessary.) 196.5831 Tj 0 -237.334 Td -(1772 p->tf->esp = p->sz;) 113.5814 Tj +(1772 if\(\(p->kstack = kalloc\(KSTACKSIZE\)\) == 0\){) 214.0572 Tj 0 -246.8274 Td -(1773 ) 21.8426 Tj +(1773 p->state = UNUSED;) 117.9499 Tj 0 -256.3207 Td -(1774 // Make return address readable; needed for some gcc.) 262.1109 Tj +(1774 return 0;) 78.6333 Tj 0 -265.8141 Td -(1775 p->tf->esp -= 4;) 100.4758 Tj +(1775 }) 34.9481 Tj 0 -275.3075 Td -(1776 *\(uint*\)\(p->mem + p->tf->esp\) = 0xefefefef;) 218.4257 Tj +(1776 sp = p->kstack + KSTACKSIZE;) 152.898 Tj 0 -284.8008 Td (1777 ) 21.8426 Tj 0 -294.2942 Td -(1778 // On entry to user space, start executing at beginning \ -of initcode.S.) 336.3756 Tj +(1778 // Leave room for trap frame.) 157.2665 Tj 0 -303.7875 Td -(1779 p->tf->eip = 0;) 96.1073 Tj +(1779 sp -= sizeof *p->tf;) 117.9499 Tj 0 -313.2809 Td -(1780 memmove\(p->mem, _binary_initcode_start, \(int\)_binary_\ -initcode_size\);) 327.6386 Tj +(1780 p->tf = \(struct trapframe*\)sp;) 161.635 Tj 0 -322.7743 Td -(1781 safestrcpy\(p->name, "initcode", sizeof\(p->name\)\);) 244.6368 Tj +(1781 ) 21.8426 Tj 0 -332.2676 Td -(1782 p->state = RUNNABLE;) 117.9499 Tj +(1782 // Set up new context to start executing at forkret,) 257.7424 Tj 0 -341.761 Td -(1783 ) 21.8426 Tj +(1783 // which returns to trapret \(see below\).) 205.3202 Tj 0 -351.2543 Td -(1784 initproc = p;) 87.3703 Tj +(1784 sp -= 4;) 65.5277 Tj 0 -360.7477 Td -(1785 }) 26.2111 Tj +(1785 *\(uint*\)sp = \(uint\)trapret;) 148.5295 Tj 0 -370.2411 Td (1786 ) 21.8426 Tj 0 -379.7344 Td -(1787 // Return currently running process.) 179.1091 Tj +(1787 sp -= sizeof *p->context;) 139.7925 Tj 0 -389.2278 Td -(1788 struct proc*) 74.2647 Tj +(1788 p->context = \(struct context*\)sp;) 174.7406 Tj 0 -398.7211 Td -(1789 curproc\(void\)) 78.6333 Tj +(1789 memset\(p->context, 0, sizeof *p->context\);) 214.0572 Tj 0 -408.2145 Td -(1790 {) 26.2111 Tj +(1790 p->context->eip = \(uint\)forkret;) 170.3721 Tj 0 -417.7079 Td -(1791 struct proc *p;) 96.1073 Tj +(1791 return p;) 69.8962 Tj 0 -427.2012 Td -(1792 ) 21.8426 Tj +(1792 }) 26.2111 Tj 0 -436.6946 Td -(1793 pushcli\(\);) 74.2647 Tj +(1793 ) 21.8426 Tj 0 -446.1879 Td -(1794 p = cpus[cpu\(\)].curproc;) 135.4239 Tj +(1794 ) 21.8426 Tj 0 -455.6813 Td -(1795 popcli\(\);) 69.8962 Tj +(1795 ) 21.8426 Tj 0 -465.1747 Td -(1796 return p;) 69.8962 Tj +(1796 ) 21.8426 Tj 0 -474.668 Td -(1797 }) 26.2111 Tj +(1797 ) 21.8426 Tj 0 -484.1614 Td (1798 ) 21.8426 Tj 0 -493.6547 Td @@ -8557,6 +8623,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -8574,107 +8642,107 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 5) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 5) 161.635 Tj 0 -28.4801 Td -(1800 // Per-CPU process scheduler.) 148.5295 Tj +(1800 // Set up first user process.) 148.5295 Tj 0 -37.9735 Td -(1801 // Each CPU calls scheduler\(\) after setting itself up.) 257.7424 Tj +(1801 void) 39.3166 Tj 0 -47.4668 Td -(1802 // Scheduler never returns. It loops, doing:) 218.4257 Tj +(1802 userinit\(void\)) 83.0018 Tj 0 -56.9602 Td -(1803 // - choose a process to run) 148.5295 Tj +(1803 {) 26.2111 Tj 0 -66.4535 Td -(1804 // - swtch to start running that process) 200.9517 Tj +(1804 struct proc *p;) 96.1073 Tj 0 -75.9469 Td -(1805 // - eventually that process transfers control) 227.1628 Tj +(1805 extern char _binary_initcode_start[], _binary_initcode_s\ +ize[];) 301.4275 Tj 0 -85.4403 Td -(1806 // via swtch back to the scheduler.) 196.5831 Tj +(1806 ) 21.8426 Tj 0 -94.9336 Td -(1807 void) 39.3166 Tj +(1807 p = allocproc\(\);) 100.4758 Tj 0 -104.427 Td -(1808 scheduler\(void\)) 87.3703 Tj +(1808 initproc = p;) 87.3703 Tj 0 -113.9203 Td -(1809 {) 26.2111 Tj +(1809 ) 21.8426 Tj 0 -123.4137 Td -(1810 struct proc *p;) 96.1073 Tj +(1810 // Initialize memory from initcode.S) 187.8461 Tj 0 -132.9071 Td -(1811 struct cpu *c;) 91.7388 Tj +(1811 p->sz = PAGE;) 87.3703 Tj 0 -142.4004 Td -(1812 int i;) 56.7907 Tj +(1812 p->mem = kalloc\(p->sz\);) 131.0554 Tj 0 -151.8938 Td -(1813 ) 21.8426 Tj +(1813 memset\(p->mem, 0, p->sz\);) 139.7925 Tj 0 -161.3871 Td -(1814 c = &cpus[cpu\(\)];) 104.8443 Tj +(1814 memmove\(p->mem, _binary_initcode_start, \(int\)_binary_\ +initcode_size\);) 327.6386 Tj 0 -170.8805 Td -(1815 for\(;;\){) 65.5277 Tj +(1815 ) 21.8426 Tj 0 -180.3739 Td -(1816 // Enable interrupts on this processor.) 209.6887 Tj +(1816 memset\(p->tf, 0, sizeof\(*p->tf\)\);) 174.7406 Tj 0 -189.8672 Td -(1817 sti\(\);) 65.5277 Tj +(1817 p->tf->cs = \(SEG_UCODE << 3\) | DPL_USER;) 205.3202 Tj 0 -199.3606 Td -(1818 ) 21.8426 Tj +(1818 p->tf->ds = \(SEG_UDATA << 3\) | DPL_USER;) 205.3202 Tj 0 -208.8539 Td -(1819 // Loop over process table looking for process to run.) 275.2164 Tj +(1819 p->tf->es = p->tf->ds;) 126.6869 Tj 0 -218.3473 Td -(1820 acquire\(&proc_table_lock\);) 152.898 Tj +(1820 p->tf->ss = p->tf->ds;) 126.6869 Tj 0 -227.8407 Td -(1821 for\(i = 0; i < NPROC; i++\){) 157.2665 Tj +(1821 p->tf->eflags = FL_IF;) 126.6869 Tj 0 -237.334 Td -(1822 p = &proc[i];) 104.8443 Tj +(1822 p->tf->esp = p->sz;) 113.5814 Tj 0 -246.8274 Td -(1823 if\(p->state != RUNNABLE\)) 152.898 Tj +(1823 p->tf->eip = 0; // beginning of initcode.S) 218.4257 Tj 0 -256.3207 Td -(1824 continue;) 96.1073 Tj +(1824 ) 21.8426 Tj 0 -265.8141 Td -(1825 ) 21.8426 Tj +(1825 safestrcpy\(p->name, "initcode", sizeof\(p->name\)\);) 244.6368 Tj 0 -275.3075 Td -(1826 // Switch to chosen process. It is the process's jo\ -b) 279.5849 Tj +(1826 p->cwd = namei\("/"\);) 117.9499 Tj 0 -284.8008 Td -(1827 // to release proc_table_lock and then reacquire it) 270.8479 Tj +(1827 ) 21.8426 Tj 0 -294.2942 Td -(1828 // before jumping back to us.) 174.7406 Tj +(1828 p->state = RUNNABLE;) 117.9499 Tj 0 -303.7875 Td -(1829 c->curproc = p;) 113.5814 Tj +(1829 }) 26.2111 Tj 0 -313.2809 Td -(1830 setupsegs\(p\);) 104.8443 Tj +(1830 ) 21.8426 Tj 0 -322.7743 Td -(1831 p->state = RUNNING;) 131.0554 Tj +(1831 // Grow current process's memory by n bytes.) 214.0572 Tj 0 -332.2676 Td -(1832 swtch\(&c->context, &p->context\);) 187.8461 Tj +(1832 // Return 0 on success, -1 on failure.) 187.8461 Tj 0 -341.761 Td -(1833 ) 21.8426 Tj +(1833 int) 34.9481 Tj 0 -351.2543 Td -(1834 // Process is done running for now.) 200.9517 Tj +(1834 growproc\(int n\)) 87.3703 Tj 0 -360.7477 Td -(1835 // It should have changed its p->state before coming\ - back.) 301.4275 Tj +(1835 {) 26.2111 Tj 0 -370.2411 Td -(1836 c->curproc = 0;) 113.5814 Tj +(1836 char *newmem;) 87.3703 Tj 0 -379.7344 Td -(1837 setupsegs\(0\);) 104.8443 Tj +(1837 ) 21.8426 Tj 0 -389.2278 Td -(1838 }) 43.6851 Tj +(1838 newmem = kalloc\(cp->sz + n\);) 152.898 Tj 0 -398.7211 Td -(1839 release\(&proc_table_lock\);) 152.898 Tj +(1839 if\(newmem == 0\)) 96.1073 Tj 0 -408.2145 Td -(1840 ) 21.8426 Tj +(1840 return -1;) 83.0018 Tj 0 -417.7079 Td -(1841 }) 34.9481 Tj +(1841 memmove\(newmem, cp->mem, cp->sz\);) 174.7406 Tj 0 -427.2012 Td -(1842 }) 26.2111 Tj +(1842 memset\(newmem + cp->sz, 0, n\);) 161.635 Tj 0 -436.6946 Td -(1843 ) 21.8426 Tj +(1843 kfree\(cp->mem, cp->sz\);) 131.0554 Tj 0 -446.1879 Td -(1844 ) 21.8426 Tj +(1844 cp->mem = newmem;) 104.8443 Tj 0 -455.6813 Td -(1845 ) 21.8426 Tj +(1845 cp->sz += n;) 83.0018 Tj 0 -465.1747 Td -(1846 ) 21.8426 Tj +(1846 usegment\(\);) 78.6333 Tj 0 -474.668 Td -(1847 ) 21.8426 Tj +(1847 return 0;) 69.8962 Tj 0 -484.1614 Td -(1848 ) 21.8426 Tj +(1848 }) 26.2111 Tj 0 -493.6547 Td (1849 ) 21.8426 Tj 0 -522.1348 Td @@ -8695,81 +8763,81 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 6) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 6) 161.635 Tj 0 -28.4801 Td -(1850 // Enter scheduler. Must already hold proc_table_lock) 257.7424 Tj +(1850 // Create a new process copying p as the parent.) 231.5313 Tj 0 -37.9735 Td -(1851 // and have changed curproc[cpu\(\)]->state.) 205.3202 Tj +(1851 // Sets up stack to return as if from system call.) 240.2683 Tj 0 -47.4668 Td -(1852 void) 39.3166 Tj +(1852 // Caller must set state of returned proc to RUNNABLE.) 257.7424 Tj 0 -56.9602 Td -(1853 sched\(void\)) 69.8962 Tj +(1853 int) 34.9481 Tj 0 -66.4535 Td -(1854 {) 26.2111 Tj +(1854 fork\(void\)) 65.5277 Tj 0 -75.9469 Td -(1855 if\(read_eflags\(\)&FL_IF\)) 131.0554 Tj +(1855 {) 26.2111 Tj 0 -85.4403 Td -(1856 panic\("sched interruptible"\);) 166.0035 Tj +(1856 int i, pid;) 78.6333 Tj 0 -94.9336 Td -(1857 if\(cp->state == RUNNING\)) 135.4239 Tj +(1857 struct proc *np;) 100.4758 Tj 0 -104.427 Td -(1858 panic\("sched running"\);) 139.7925 Tj +(1858 ) 21.8426 Tj 0 -113.9203 Td -(1859 if\(!holding\(&proc_table_lock\)\)) 161.635 Tj +(1859 // Allocate process.) 117.9499 Tj 0 -123.4137 Td -(1860 panic\("sched proc_table_lock"\);) 174.7406 Tj +(1860 if\(\(np = allocproc\(\)\) == 0\)) 148.5295 Tj 0 -132.9071 Td -(1861 if\(cpus[cpu\(\)].ncli != 1\)) 139.7925 Tj +(1861 return -1;) 83.0018 Tj 0 -142.4004 Td -(1862 panic\("sched locks"\);) 131.0554 Tj +(1862 ) 21.8426 Tj 0 -151.8938 Td -(1863 ) 21.8426 Tj +(1863 // Copy process state from p.) 157.2665 Tj 0 -161.3871 Td -(1864 swtch\(&cp->context, &cpus[cpu\(\)].context\);) 214.0572 Tj +(1864 np->sz = cp->sz;) 100.4758 Tj 0 -170.8805 Td -(1865 }) 26.2111 Tj +(1865 if\(\(np->mem = kalloc\(np->sz\)\) == 0\){) 187.8461 Tj 0 -180.3739 Td -(1866 ) 21.8426 Tj +(1866 kfree\(np->kstack, KSTACKSIZE\);) 170.3721 Tj 0 -189.8672 Td -(1867 // Give up the CPU for one scheduling round.) 214.0572 Tj +(1867 np->kstack = 0;) 104.8443 Tj 0 -199.3606 Td -(1868 void) 39.3166 Tj +(1868 np->state = UNUSED;) 122.3184 Tj 0 -208.8539 Td -(1869 yield\(void\)) 69.8962 Tj +(1869 return -1;) 83.0018 Tj 0 -218.3473 Td -(1870 {) 26.2111 Tj +(1870 }) 34.9481 Tj 0 -227.8407 Td -(1871 acquire\(&proc_table_lock\);) 144.161 Tj +(1871 memmove\(np->mem, cp->mem, np->sz\);) 179.1091 Tj 0 -237.334 Td -(1872 cp->state = RUNNABLE;) 122.3184 Tj +(1872 np->parent = cp;) 100.4758 Tj 0 -246.8274 Td -(1873 sched\(\);) 65.5277 Tj +(1873 *np->tf = *cp->tf;) 109.2129 Tj 0 -256.3207 Td -(1874 release\(&proc_table_lock\);) 144.161 Tj +(1874 ) 21.8426 Tj 0 -265.8141 Td -(1875 }) 26.2111 Tj +(1875 // Clear %eax so that fork returns 0 in the child.) 249.0053 Tj 0 -275.3075 Td -(1876 ) 21.8426 Tj +(1876 np->tf->eax = 0;) 100.4758 Tj 0 -284.8008 Td -(1877 // A fork child's very first scheduling by scheduler\(\)) 257.7424 Tj +(1877 ) 21.8426 Tj 0 -294.2942 Td -(1878 // will swtch here. "Return" to user space.) 214.0572 Tj +(1878 for\(i = 0; i < NOFILE; i++\)) 148.5295 Tj 0 -303.7875 Td -(1879 void) 39.3166 Tj +(1879 if\(cp->ofile[i]\)) 109.2129 Tj 0 -313.2809 Td -(1880 forkret\(void\)) 78.6333 Tj +(1880 np->ofile[i] = filedup\(cp->ofile[i]\);) 209.6887 Tj 0 -322.7743 Td -(1881 {) 26.2111 Tj +(1881 np->cwd = idup\(cp->cwd\);) 135.4239 Tj 0 -332.2676 Td -(1882 // Still holding proc_table_lock from scheduler.) 240.2683 Tj +(1882 ) 21.8426 Tj 0 -341.761 Td -(1883 release\(&proc_table_lock\);) 144.161 Tj +(1883 pid = np->pid;) 91.7388 Tj 0 -351.2543 Td -(1884 ) 21.8426 Tj +(1884 np->state = RUNNABLE;) 122.3184 Tj 0 -360.7477 Td -(1885 // Jump into assembly, never to return.) 200.9517 Tj +(1885 ) 21.8426 Tj 0 -370.2411 Td -(1886 forkret1\(cp->tf\);) 104.8443 Tj +(1886 return pid;) 78.6333 Tj 0 -379.7344 Td (1887 }) 26.2111 Tj 0 -389.2278 Td @@ -8826,6 +8894,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -8843,83 +8913,85 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 7) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 7) 161.635 Tj 0 -28.4801 Td -(1900 // Atomically release lock and sleep on chan.) 218.4257 Tj +(1900 // Per-CPU process scheduler.) 148.5295 Tj 0 -37.9735 Td -(1901 // Reacquires lock when reawakened.) 174.7406 Tj +(1901 // Each CPU calls scheduler\(\) after setting itself up.) 257.7424 Tj 0 -47.4668 Td -(1902 void) 39.3166 Tj +(1902 // Scheduler never returns. It loops, doing:) 218.4257 Tj 0 -56.9602 Td -(1903 sleep\(void *chan, struct spinlock *lk\)) 187.8461 Tj +(1903 // - choose a process to run) 148.5295 Tj 0 -66.4535 Td -(1904 {) 26.2111 Tj +(1904 // - swtch to start running that process) 200.9517 Tj 0 -75.9469 Td -(1905 if\(cp == 0\)) 78.6333 Tj +(1905 // - eventually that process transfers control) 227.1628 Tj 0 -85.4403 Td -(1906 panic\("sleep"\);) 104.8443 Tj +(1906 // via swtch back to the scheduler.) 196.5831 Tj 0 -94.9336 Td -(1907 ) 21.8426 Tj +(1907 void) 39.3166 Tj 0 -104.427 Td -(1908 if\(lk == 0\)) 78.6333 Tj +(1908 scheduler\(void\)) 87.3703 Tj 0 -113.9203 Td -(1909 panic\("sleep without lk"\);) 152.898 Tj +(1909 {) 26.2111 Tj 0 -123.4137 Td -(1910 ) 21.8426 Tj +(1910 struct proc *p;) 96.1073 Tj 0 -132.9071 Td -(1911 // Must acquire proc_table_lock in order to) 218.4257 Tj +(1911 ) 21.8426 Tj 0 -142.4004 Td -(1912 // change p->state and then call sched.) 200.9517 Tj +(1912 for\(;;\){) 65.5277 Tj 0 -151.8938 Td -(1913 // Once we hold proc_table_lock, we can be) 214.0572 Tj +(1913 // Enable interrupts on this processor.) 209.6887 Tj 0 -161.3871 Td -(1914 // guaranteed that we won't miss any wakeup) 218.4257 Tj +(1914 sti\(\);) 65.5277 Tj 0 -170.8805 Td -(1915 // \(wakeup runs with proc_table_lock locked\),) 227.1628 Tj +(1915 ) 21.8426 Tj 0 -180.3739 Td -(1916 // so it's okay to release lk.) 161.635 Tj +(1916 // Loop over process table looking for process to run.) 275.2164 Tj 0 -189.8672 Td -(1917 if\(lk != &proc_table_lock\){) 148.5295 Tj +(1917 acquire\(&ptable.lock\);) 135.4239 Tj 0 -199.3606 Td -(1918 acquire\(&proc_table_lock\);) 152.898 Tj +(1918 for\(p = ptable.proc; p < &ptable.proc[NPROC]; p++\){) 262.1109 Tj 0 -208.8539 Td -(1919 release\(lk\);) 91.7388 Tj +(1919 if\(p->state != RUNNABLE\)) 152.898 Tj 0 -218.3473 Td -(1920 }) 34.9481 Tj +(1920 continue;) 96.1073 Tj 0 -227.8407 Td (1921 ) 21.8426 Tj 0 -237.334 Td -(1922 // Go to sleep.) 96.1073 Tj +(1922 // Switch to chosen process. It is the process's jo\ +b) 279.5849 Tj 0 -246.8274 Td -(1923 cp->chan = chan;) 100.4758 Tj +(1923 // to release ptable.lock and then reacquire it) 253.3738 Tj 0 -256.3207 Td -(1924 cp->state = SLEEPING;) 122.3184 Tj +(1924 // before jumping back to us.) 174.7406 Tj 0 -265.8141 Td -(1925 sched\(\);) 65.5277 Tj +(1925 cp = p;) 78.6333 Tj 0 -275.3075 Td -(1926 ) 21.8426 Tj +(1926 usegment\(\);) 96.1073 Tj 0 -284.8008 Td -(1927 // Tidy up.) 78.6333 Tj +(1927 p->state = RUNNING;) 131.0554 Tj 0 -294.2942 Td -(1928 cp->chan = 0;) 87.3703 Tj +(1928 swtch\(&c->context, p->context\);) 183.4776 Tj 0 -303.7875 Td (1929 ) 21.8426 Tj 0 -313.2809 Td -(1930 // Reacquire original lock.) 148.5295 Tj +(1930 // Process is done running for now.) 200.9517 Tj 0 -322.7743 Td -(1931 if\(lk != &proc_table_lock\){) 148.5295 Tj +(1931 // It should have changed its p->state before coming\ + back.) 301.4275 Tj 0 -332.2676 Td -(1932 release\(&proc_table_lock\);) 152.898 Tj +(1932 cp = 0;) 78.6333 Tj 0 -341.761 Td -(1933 acquire\(lk\);) 91.7388 Tj +(1933 }) 43.6851 Tj 0 -351.2543 Td -(1934 }) 34.9481 Tj +(1934 release\(&ptable.lock\);) 135.4239 Tj 0 -360.7477 Td -(1935 }) 26.2111 Tj +(1935 ) 21.8426 Tj 0 -370.2411 Td -(1936 ) 21.8426 Tj +(1936 }) 34.9481 Tj 0 -379.7344 Td -(1937 ) 21.8426 Tj +(1937 }) 26.2111 Tj 0 -389.2278 Td (1938 ) 21.8426 Tj 0 -398.7211 Td @@ -8962,95 +9034,96 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 8) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 8) 161.635 Tj 0 -28.4801 Td -(1950 // Wake up all processes sleeping on chan.) 205.3202 Tj +(1950 // Enter scheduler. Must hold only ptable.lock) 227.1628 Tj 0 -37.9735 Td -(1951 // Proc_table_lock must be held.) 161.635 Tj +(1951 // and have changed cp->state.) 152.898 Tj 0 -47.4668 Td -(1952 static void) 69.8962 Tj +(1952 void) 39.3166 Tj 0 -56.9602 Td -(1953 wakeup1\(void *chan\)) 104.8443 Tj +(1953 sched\(void\)) 69.8962 Tj 0 -66.4535 Td (1954 {) 26.2111 Tj 0 -75.9469 Td -(1955 struct proc *p;) 96.1073 Tj +(1955 int intena;) 78.6333 Tj 0 -85.4403 Td (1956 ) 21.8426 Tj 0 -94.9336 Td -(1957 for\(p = proc; p < &proc[NPROC]; p++\)) 187.8461 Tj +(1957 if\(!holding\(&ptable.lock\)\)) 144.161 Tj 0 -104.427 Td -(1958 if\(p->state == SLEEPING && p->chan == chan\)) 227.1628 Tj +(1958 panic\("sched ptable.lock"\);) 157.2665 Tj 0 -113.9203 Td -(1959 p->state = RUNNABLE;) 135.4239 Tj +(1959 if\(c->ncli != 1\)) 100.4758 Tj 0 -123.4137 Td -(1960 }) 26.2111 Tj +(1960 panic\("sched locks"\);) 131.0554 Tj 0 -132.9071 Td -(1961 ) 21.8426 Tj +(1961 if\(cp->state == RUNNING\)) 135.4239 Tj 0 -142.4004 Td -(1962 // Wake up all processes sleeping on chan.) 205.3202 Tj +(1962 panic\("sched running"\);) 139.7925 Tj 0 -151.8938 Td -(1963 // Proc_table_lock is acquired and released.) 214.0572 Tj +(1963 if\(readeflags\(\)&FL_IF\)) 126.6869 Tj 0 -161.3871 Td -(1964 void) 39.3166 Tj +(1964 panic\("sched interruptible"\);) 166.0035 Tj 0 -170.8805 Td -(1965 wakeup\(void *chan\)) 100.4758 Tj +(1965 ) 21.8426 Tj 0 -180.3739 Td -(1966 {) 26.2111 Tj +(1966 intena = c->intena;) 113.5814 Tj 0 -189.8672 Td -(1967 acquire\(&proc_table_lock\);) 144.161 Tj +(1967 swtch\(&cp->context, c->context\);) 170.3721 Tj 0 -199.3606 Td -(1968 wakeup1\(chan\);) 91.7388 Tj +(1968 c->intena = intena;) 113.5814 Tj 0 -208.8539 Td -(1969 release\(&proc_table_lock\);) 144.161 Tj +(1969 }) 26.2111 Tj 0 -218.3473 Td -(1970 }) 26.2111 Tj +(1970 ) 21.8426 Tj 0 -227.8407 Td -(1971 ) 21.8426 Tj +(1971 // Give up the CPU for one scheduling round.) 214.0572 Tj 0 -237.334 Td -(1972 // Kill the process with the given pid.) 192.2146 Tj +(1972 void) 39.3166 Tj 0 -246.8274 Td -(1973 // Process won't actually exit until it returns) 227.1628 Tj +(1973 yield\(void\)) 69.8962 Tj 0 -256.3207 Td -(1974 // to user space \(see trap in trap.c\).) 187.8461 Tj +(1974 {) 26.2111 Tj 0 -265.8141 Td -(1975 int) 34.9481 Tj +(1975 acquire\(&ptable.lock\); ) 135.4239 Tj 0 -275.3075 Td -(1976 kill\(int pid\)) 78.6333 Tj +(1976 cp->state = RUNNABLE;) 122.3184 Tj 0 -284.8008 Td -(1977 {) 26.2111 Tj +(1977 sched\(\);) 65.5277 Tj 0 -294.2942 Td -(1978 struct proc *p;) 96.1073 Tj +(1978 release\(&ptable.lock\);) 126.6869 Tj 0 -303.7875 Td -(1979 ) 21.8426 Tj +(1979 }) 26.2111 Tj 0 -313.2809 Td -(1980 acquire\(&proc_table_lock\);) 144.161 Tj +(1980 ) 21.8426 Tj 0 -322.7743 Td -(1981 for\(p = proc; p < &proc[NPROC]; p++\){) 192.2146 Tj +(1981 // A fork child's very first scheduling by scheduler\(\)) 257.7424 Tj 0 -332.2676 Td -(1982 if\(p->pid == pid\){) 117.9499 Tj +(1982 // will swtch here. "Return" to user space.) 214.0572 Tj 0 -341.761 Td -(1983 p->killed = 1;) 109.2129 Tj +(1983 void) 39.3166 Tj 0 -351.2543 Td -(1984 // Wake process from sleep if necessary.) 222.7942 Tj +(1984 forkret\(void\)) 78.6333 Tj 0 -360.7477 Td -(1985 if\(p->state == SLEEPING\)) 152.898 Tj +(1985 {) 26.2111 Tj 0 -370.2411 Td -(1986 p->state = RUNNABLE;) 144.161 Tj +(1986 // Still holding ptable.lock from scheduler.) 222.7942 Tj 0 -379.7344 Td -(1987 release\(&proc_table_lock\);) 161.635 Tj +(1987 release\(&ptable.lock\);) 126.6869 Tj 0 -389.2278 Td -(1988 return 0;) 87.3703 Tj +(1988 ) 21.8426 Tj 0 -398.7211 Td -(1989 }) 43.6851 Tj +(1989 // Return to "caller", actually trapret \(see allocproc\)\ +.) 275.2164 Tj 0 -408.2145 Td -(1990 }) 34.9481 Tj +(1990 }) 26.2111 Tj 0 -417.7079 Td -(1991 release\(&proc_table_lock\);) 144.161 Tj +(1991 ) 21.8426 Tj 0 -427.2012 Td -(1992 return -1;) 74.2647 Tj +(1992 ) 21.8426 Tj 0 -436.6946 Td -(1993 }) 26.2111 Tj +(1993 ) 21.8426 Tj 0 -446.1879 Td (1994 ) 21.8426 Tj 0 -455.6813 Td @@ -9093,6 +9166,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -9110,94 +9185,93 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 9) 161.635 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 9) 161.635 Tj 0 -28.4801 Td -(2000 // Exit the current process. Does not return.) 222.7942 Tj +(2000 // Atomically release lock and sleep on chan.) 218.4257 Tj 0 -37.9735 Td -(2001 // Exited processes remain in the zombie state) 222.7942 Tj +(2001 // Reacquires lock when reawakened.) 174.7406 Tj 0 -47.4668 Td -(2002 // until their parent calls wait\(\) to find out they exit\ -ed.) 279.5849 Tj +(2002 void) 39.3166 Tj 0 -56.9602 Td -(2003 void) 39.3166 Tj +(2003 sleep\(void *chan, struct spinlock *lk\)) 187.8461 Tj 0 -66.4535 Td -(2004 exit\(void\)) 65.5277 Tj +(2004 {) 26.2111 Tj 0 -75.9469 Td -(2005 {) 26.2111 Tj +(2005 if\(cp == 0\)) 78.6333 Tj 0 -85.4403 Td -(2006 struct proc *p;) 96.1073 Tj +(2006 panic\("sleep"\);) 104.8443 Tj 0 -94.9336 Td -(2007 int fd;) 61.1592 Tj +(2007 ) 21.8426 Tj 0 -104.427 Td -(2008 ) 21.8426 Tj +(2008 if\(lk == 0\)) 78.6333 Tj 0 -113.9203 Td -(2009 if\(cp == initproc\)) 109.2129 Tj +(2009 panic\("sleep without lk"\);) 152.898 Tj 0 -123.4137 Td -(2010 panic\("init exiting"\);) 135.4239 Tj +(2010 ) 21.8426 Tj 0 -132.9071 Td -(2011 ) 21.8426 Tj +(2011 // Must acquire ptable.lock in order to) 200.9517 Tj 0 -142.4004 Td -(2012 // Close all open files.) 135.4239 Tj +(2012 // change p->state and then call sched.) 200.9517 Tj 0 -151.8938 Td -(2013 for\(fd = 0; fd < NOFILE; fd++\){) 166.0035 Tj +(2013 // Once we hold ptable.lock, we can be) 196.5831 Tj 0 -161.3871 Td -(2014 if\(cp->ofile[fd]\){) 117.9499 Tj +(2014 // guaranteed that we won't miss any wakeup) 218.4257 Tj 0 -170.8805 Td -(2015 fileclose\(cp->ofile[fd]\);) 157.2665 Tj +(2015 // \(wakeup runs with ptable.lock locked\),) 209.6887 Tj 0 -180.3739 Td -(2016 cp->ofile[fd] = 0;) 126.6869 Tj +(2016 // so it's okay to release lk.) 161.635 Tj 0 -189.8672 Td -(2017 }) 43.6851 Tj +(2017 if\(lk != &ptable.lock\){ ) 139.7925 Tj 0 -199.3606 Td -(2018 }) 34.9481 Tj +(2018 acquire\(&ptable.lock\); ) 144.161 Tj 0 -208.8539 Td -(2019 ) 21.8426 Tj +(2019 release\(lk\);) 91.7388 Tj 0 -218.3473 Td -(2020 iput\(cp->cwd\);) 91.7388 Tj +(2020 }) 34.9481 Tj 0 -227.8407 Td -(2021 cp->cwd = 0;) 83.0018 Tj +(2021 ) 21.8426 Tj 0 -237.334 Td -(2022 ) 21.8426 Tj +(2022 // Go to sleep.) 96.1073 Tj 0 -246.8274 Td -(2023 acquire\(&proc_table_lock\);) 144.161 Tj +(2023 cp->chan = chan;) 100.4758 Tj 0 -256.3207 Td -(2024 ) 21.8426 Tj +(2024 cp->state = SLEEPING;) 122.3184 Tj 0 -265.8141 Td -(2025 // Parent might be sleeping in wait\(\).) 196.5831 Tj +(2025 sched\(\);) 65.5277 Tj 0 -275.3075 Td -(2026 wakeup1\(cp->parent\);) 117.9499 Tj +(2026 ) 21.8426 Tj 0 -284.8008 Td -(2027 ) 21.8426 Tj +(2027 // Tidy up.) 78.6333 Tj 0 -294.2942 Td -(2028 // Pass abandoned children to init.) 183.4776 Tj +(2028 cp->chan = 0;) 87.3703 Tj 0 -303.7875 Td -(2029 for\(p = proc; p < &proc[NPROC]; p++\){) 192.2146 Tj +(2029 ) 21.8426 Tj 0 -313.2809 Td -(2030 if\(p->parent == cp\){) 126.6869 Tj +(2030 // Reacquire original lock.) 148.5295 Tj 0 -322.7743 Td -(2031 p->parent = initproc;) 139.7925 Tj +(2031 if\(lk != &ptable.lock\){ ) 139.7925 Tj 0 -332.2676 Td -(2032 if\(p->state == ZOMBIE\)) 144.161 Tj +(2032 release\(&ptable.lock\);) 135.4239 Tj 0 -341.761 Td -(2033 wakeup1\(initproc\);) 135.4239 Tj +(2033 acquire\(lk\);) 91.7388 Tj 0 -351.2543 Td -(2034 }) 43.6851 Tj +(2034 }) 34.9481 Tj 0 -360.7477 Td -(2035 }) 34.9481 Tj +(2035 }) 26.2111 Tj 0 -370.2411 Td (2036 ) 21.8426 Tj 0 -379.7344 Td -(2037 // Jump into the scheduler, never to return.) 222.7942 Tj +(2037 ) 21.8426 Tj 0 -389.2278 Td -(2038 cp->killed = 0;) 96.1073 Tj +(2038 ) 21.8426 Tj 0 -398.7211 Td -(2039 cp->state = ZOMBIE;) 113.5814 Tj +(2039 ) 21.8426 Tj 0 -408.2145 Td -(2040 sched\(\);) 65.5277 Tj +(2040 ) 21.8426 Tj 0 -417.7079 Td -(2041 panic\("zombie exit"\);) 122.3184 Tj +(2041 ) 21.8426 Tj 0 -427.2012 Td -(2042 }) 26.2111 Tj +(2042 ) 21.8426 Tj 0 -436.6946 Td (2043 ) 21.8426 Tj 0 -446.1879 Td @@ -9230,92 +9304,91 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 10) 166.0035 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 10) 166.0035 Tj 0 -28.4801 Td -(2050 // Wait for a child process to exit and return its pid.) 262.1109 Tj +(2050 // Wake up all processes sleeping on chan.) 205.3202 Tj 0 -37.9735 Td -(2051 // Return -1 if this process has no children.) 218.4257 Tj +(2051 // The ptable lock must be held.) 161.635 Tj 0 -47.4668 Td -(2052 int) 34.9481 Tj +(2052 static void) 69.8962 Tj 0 -56.9602 Td -(2053 wait\(void\)) 65.5277 Tj +(2053 wakeup1\(void *chan\)) 104.8443 Tj 0 -66.4535 Td (2054 {) 26.2111 Tj 0 -75.9469 Td (2055 struct proc *p;) 96.1073 Tj 0 -85.4403 Td -(2056 int i, havekids, pid;) 122.3184 Tj +(2056 ) 21.8426 Tj 0 -94.9336 Td -(2057 ) 21.8426 Tj +(2057 for\(p = ptable.proc; p < &ptable.proc[NPROC]; p++\)) 249.0053 Tj 0 -104.427 Td -(2058 acquire\(&proc_table_lock\);) 144.161 Tj +(2058 if\(p->state == SLEEPING && p->chan == chan\)) 227.1628 Tj 0 -113.9203 Td -(2059 for\(;;\){) 65.5277 Tj +(2059 p->state = RUNNABLE;) 135.4239 Tj 0 -123.4137 Td -(2060 // Scan through table looking for zombie children.) 257.7424 Tj +(2060 }) 26.2111 Tj 0 -132.9071 Td -(2061 havekids = 0;) 96.1073 Tj +(2061 ) 21.8426 Tj 0 -142.4004 Td -(2062 for\(i = 0; i < NPROC; i++\){) 157.2665 Tj +(2062 // Wake up all processes sleeping on chan.) 205.3202 Tj 0 -151.8938 Td -(2063 p = &proc[i];) 104.8443 Tj +(2063 void) 39.3166 Tj 0 -161.3871 Td -(2064 if\(p->state == UNUSED\)) 144.161 Tj +(2064 wakeup\(void *chan\)) 100.4758 Tj 0 -170.8805 Td -(2065 continue;) 96.1073 Tj +(2065 {) 26.2111 Tj 0 -180.3739 Td -(2066 if\(p->parent == cp\){) 135.4239 Tj +(2066 acquire\(&ptable.lock\);) 126.6869 Tj 0 -189.8672 Td -(2067 if\(p->state == ZOMBIE\){) 157.2665 Tj +(2067 wakeup1\(chan\);) 91.7388 Tj 0 -199.3606 Td -(2068 // Found one.) 122.3184 Tj +(2068 release\(&ptable.lock\);) 126.6869 Tj 0 -208.8539 Td -(2069 kfree\(p->mem, p->sz\);) 157.2665 Tj +(2069 }) 26.2111 Tj 0 -218.3473 Td -(2070 kfree\(p->kstack, KSTACKSIZE\);) 192.2146 Tj +(2070 ) 21.8426 Tj 0 -227.8407 Td -(2071 pid = p->pid;) 122.3184 Tj +(2071 // Kill the process with the given pid.) 192.2146 Tj 0 -237.334 Td -(2072 p->state = UNUSED;) 144.161 Tj +(2072 // Process won't actually exit until it returns) 227.1628 Tj 0 -246.8274 Td -(2073 p->pid = 0;) 113.5814 Tj +(2073 // to user space \(see trap in trap.c\).) 187.8461 Tj 0 -256.3207 Td -(2074 p->parent = 0;) 126.6869 Tj +(2074 int) 34.9481 Tj 0 -265.8141 Td -(2075 p->name[0] = 0;) 131.0554 Tj +(2075 kill\(int pid\)) 78.6333 Tj 0 -275.3075 Td -(2076 release\(&proc_table_lock\);) 179.1091 Tj +(2076 {) 26.2111 Tj 0 -284.8008 Td -(2077 return pid;) 113.5814 Tj +(2077 struct proc *p;) 96.1073 Tj 0 -294.2942 Td -(2078 }) 61.1592 Tj +(2078 ) 21.8426 Tj 0 -303.7875 Td -(2079 havekids = 1;) 113.5814 Tj +(2079 acquire\(&ptable.lock\);) 126.6869 Tj 0 -313.2809 Td -(2080 }) 52.4222 Tj +(2080 for\(p = ptable.proc; p < &ptable.proc[NPROC]; p++\){) 253.3738 Tj 0 -322.7743 Td -(2081 }) 43.6851 Tj +(2081 if\(p->pid == pid\){) 117.9499 Tj 0 -332.2676 Td -(2082 ) 21.8426 Tj +(2082 p->killed = 1;) 109.2129 Tj 0 -341.761 Td -(2083 // No point waiting if we don't have any children.) 257.7424 Tj +(2083 // Wake process from sleep if necessary.) 222.7942 Tj 0 -351.2543 Td -(2084 if\(!havekids || cp->killed\){) 161.635 Tj +(2084 if\(p->state == SLEEPING\)) 152.898 Tj 0 -360.7477 Td -(2085 release\(&proc_table_lock\);) 161.635 Tj +(2085 p->state = RUNNABLE;) 144.161 Tj 0 -370.2411 Td -(2086 return -1;) 91.7388 Tj +(2086 release\(&ptable.lock\);) 144.161 Tj 0 -379.7344 Td -(2087 }) 43.6851 Tj +(2087 return 0;) 87.3703 Tj 0 -389.2278 Td -(2088 ) 21.8426 Tj +(2088 }) 43.6851 Tj 0 -398.7211 Td -(2089 // Wait for children to exit. \(See wakeup1 call in p\ -roc_exit.\)) 314.533 Tj +(2089 }) 34.9481 Tj 0 -408.2145 Td -(2090 sleep\(cp, &proc_table_lock\);) 161.635 Tj +(2090 release\(&ptable.lock\);) 126.6869 Tj 0 -417.7079 Td -(2091 }) 34.9481 Tj +(2091 return -1;) 74.2647 Tj 0 -427.2012 Td (2092 }) 26.2111 Tj 0 -436.6946 Td @@ -9362,6 +9435,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -9379,92 +9454,92 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/proc.c Page 11) 166.0035 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 11) 166.0035 Tj 0 -28.4801 Td -(2100 // Print a process listing to console. For debugging.) 257.7424 Tj +(2100 // Exit the current process. Does not return.) 222.7942 Tj 0 -37.9735 Td -(2101 // Runs when user types ^P on console.) 187.8461 Tj +(2101 // Exited processes remain in the zombie state) 222.7942 Tj 0 -47.4668 Td -(2102 // No lock to avoid wedging a stuck machine further.) 249.0053 Tj +(2102 // until their parent calls wait\(\) to find out they exit\ +ed.) 279.5849 Tj 0 -56.9602 Td (2103 void) 39.3166 Tj 0 -66.4535 Td -(2104 procdump\(void\)) 83.0018 Tj +(2104 exit\(void\)) 65.5277 Tj 0 -75.9469 Td (2105 {) 26.2111 Tj 0 -85.4403 Td -(2106 static char *states[] = {) 139.7925 Tj +(2106 struct proc *p;) 96.1073 Tj 0 -94.9336 Td -(2107 [UNUSED] "unused",) 122.3184 Tj +(2107 int fd;) 61.1592 Tj 0 -104.427 Td -(2108 [EMBRYO] "embryo",) 122.3184 Tj +(2108 ) 21.8426 Tj 0 -113.9203 Td -(2109 [SLEEPING] "sleep ",) 122.3184 Tj +(2109 if\(cp == initproc\)) 109.2129 Tj 0 -123.4137 Td -(2110 [RUNNABLE] "runble",) 122.3184 Tj +(2110 panic\("init exiting"\);) 135.4239 Tj 0 -132.9071 Td -(2111 [RUNNING] "run ",) 122.3184 Tj +(2111 ) 21.8426 Tj 0 -142.4004 Td -(2112 [ZOMBIE] "zombie") 117.9499 Tj +(2112 // Close all open files.) 135.4239 Tj 0 -151.8938 Td -(2113 };) 39.3166 Tj +(2113 for\(fd = 0; fd < NOFILE; fd++\){) 166.0035 Tj 0 -161.3871 Td -(2114 int i, j;) 69.8962 Tj +(2114 if\(cp->ofile[fd]\){) 117.9499 Tj 0 -170.8805 Td -(2115 struct proc *p;) 96.1073 Tj +(2115 fileclose\(cp->ofile[fd]\);) 157.2665 Tj 0 -180.3739 Td -(2116 char *state;) 83.0018 Tj +(2116 cp->ofile[fd] = 0;) 126.6869 Tj 0 -189.8672 Td -(2117 uint pc[10];) 83.0018 Tj +(2117 }) 43.6851 Tj 0 -199.3606 Td -(2118 ) 21.8426 Tj +(2118 }) 34.9481 Tj 0 -208.8539 Td -(2119 for\(i = 0; i < NPROC; i++\){) 148.5295 Tj +(2119 ) 21.8426 Tj 0 -218.3473 Td -(2120 p = &proc[i];) 96.1073 Tj +(2120 iput\(cp->cwd\);) 91.7388 Tj 0 -227.8407 Td -(2121 if\(p->state == UNUSED\)) 135.4239 Tj +(2121 cp->cwd = 0;) 83.0018 Tj 0 -237.334 Td -(2122 continue;) 87.3703 Tj +(2122 ) 21.8426 Tj 0 -246.8274 Td -(2123 if\(p->state >= 0 && p->state < NELEM\(states\) && sta\ -tes[p->state]\)) 323.2701 Tj +(2123 acquire\(&ptable.lock\);) 126.6869 Tj 0 -256.3207 Td -(2124 state = states[p->state];) 157.2665 Tj +(2124 ) 21.8426 Tj 0 -265.8141 Td -(2125 else) 56.7907 Tj +(2125 // Parent might be sleeping in wait\(\).) 196.5831 Tj 0 -275.3075 Td -(2126 state = "???";) 109.2129 Tj +(2126 wakeup1\(cp->parent\);) 117.9499 Tj 0 -284.8008 Td -(2127 cprintf\("%d %s %s", p->pid, state, p->name\);) 231.5313 Tj +(2127 ) 21.8426 Tj 0 -294.2942 Td -(2128 if\(p->state == SLEEPING\){) 148.5295 Tj +(2128 // Pass abandoned children to init.) 183.4776 Tj 0 -303.7875 Td -(2129 getcallerpcs\(\(uint*\)p->context.ebp+2, pc\);) 231.5313 Tj +(2129 for\(p = ptable.proc; p < &ptable.proc[NPROC]; p++\){) 253.3738 Tj 0 -313.2809 Td -(2130 for\(j=0; j<10 && pc[j] != 0; j++\)) 192.2146 Tj +(2130 if\(p->parent == cp\){) 126.6869 Tj 0 -322.7743 Td -(2131 cprintf\(" %p", pc[j]\);) 152.898 Tj +(2131 p->parent = initproc;) 139.7925 Tj 0 -332.2676 Td -(2132 }) 43.6851 Tj +(2132 if\(p->state == ZOMBIE\)) 144.161 Tj 0 -341.761 Td -(2133 cprintf\("\\n"\);) 100.4758 Tj +(2133 wakeup1\(initproc\);) 135.4239 Tj 0 -351.2543 Td -(2134 }) 34.9481 Tj +(2134 }) 43.6851 Tj 0 -360.7477 Td -(2135 }) 26.2111 Tj +(2135 }) 34.9481 Tj 0 -370.2411 Td (2136 ) 21.8426 Tj 0 -379.7344 Td -(2137 ) 21.8426 Tj +(2137 // Jump into the scheduler, never to return.) 222.7942 Tj 0 -389.2278 Td -(2138 ) 21.8426 Tj +(2138 cp->state = ZOMBIE;) 113.5814 Tj 0 -398.7211 Td -(2139 ) 21.8426 Tj +(2139 sched\(\);) 65.5277 Tj 0 -408.2145 Td -(2140 ) 21.8426 Tj +(2140 panic\("zombie exit"\);) 122.3184 Tj 0 -417.7079 Td -(2141 ) 21.8426 Tj +(2141 }) 26.2111 Tj 0 -427.2012 Td (2142 ) 21.8426 Tj 0 -436.6946 Td @@ -9499,91 +9574,90 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/swtch.S Page 1) 166.0035 Tj +(Aug 8 01:04 2009 xv6/proc.c Page 12) 166.0035 Tj 0 -28.4801 Td -(2150 # void swtch\(struct context *old, struct context *new\)\ -;) 270.8479 Tj +(2150 // Wait for a child process to exit and return its pid.) 262.1109 Tj 0 -37.9735 Td -(2151 #) 26.2111 Tj +(2151 // Return -1 if this process has no children.) 218.4257 Tj 0 -47.4668 Td -(2152 # Save current register context in old) 187.8461 Tj +(2152 int) 34.9481 Tj 0 -56.9602 Td -(2153 # and then load register context from new.) 205.3202 Tj +(2153 wait\(void\)) 65.5277 Tj 0 -66.4535 Td -(2154 ) 21.8426 Tj +(2154 {) 26.2111 Tj 0 -75.9469 Td -(2155 .globl swtch) 74.2647 Tj +(2155 struct proc *p;) 96.1073 Tj 0 -85.4403 Td -(2156 swtch:) 48.0537 Tj +(2156 int havekids, pid;) 109.2129 Tj 0 -94.9336 Td -(2157 # Save old registers) 117.9499 Tj +(2157 ) 21.8426 Tj 0 -104.427 Td -(2158 movl 4\(%esp\), %eax) 109.2129 Tj +(2158 acquire\(&ptable.lock\);) 126.6869 Tj 0 -113.9203 Td -(2159 ) 21.8426 Tj +(2159 for\(;;\){) 65.5277 Tj 0 -123.4137 Td -(2160 popl 0\(%eax\) # %eip) 117.9499 Tj +(2160 // Scan through table looking for zombie children.) 257.7424 Tj 0 -132.9071 Td -(2161 movl %esp, 4\(%eax\)) 109.2129 Tj +(2161 havekids = 0;) 96.1073 Tj 0 -142.4004 Td -(2162 movl %ebx, 8\(%eax\)) 109.2129 Tj +(2162 for\(p = ptable.proc; p < &ptable.proc[NPROC]; p++\){) 262.1109 Tj 0 -151.8938 Td -(2163 movl %ecx, 12\(%eax\)) 113.5814 Tj +(2163 if\(p->parent != cp\)) 131.0554 Tj 0 -161.3871 Td -(2164 movl %edx, 16\(%eax\)) 113.5814 Tj +(2164 continue;) 96.1073 Tj 0 -170.8805 Td -(2165 movl %esi, 20\(%eax\)) 113.5814 Tj +(2165 havekids = 1;) 104.8443 Tj 0 -180.3739 Td -(2166 movl %edi, 24\(%eax\)) 113.5814 Tj +(2166 if\(p->state == ZOMBIE\){) 148.5295 Tj 0 -189.8672 Td -(2167 movl %ebp, 28\(%eax\)) 113.5814 Tj +(2167 // Found one.) 113.5814 Tj 0 -199.3606 Td -(2168 ) 21.8426 Tj +(2168 pid = p->pid;) 113.5814 Tj 0 -208.8539 Td -(2169 # Load new registers) 117.9499 Tj +(2169 kfree\(p->mem, p->sz\);) 148.5295 Tj 0 -218.3473 Td -(2170 movl 4\(%esp\), %eax # not 8\(%esp\) - popped return ad\ -dress above) 305.796 Tj +(2170 kfree\(p->kstack, KSTACKSIZE\);) 183.4776 Tj 0 -227.8407 Td -(2171 ) 21.8426 Tj +(2171 p->state = UNUSED;) 135.4239 Tj 0 -237.334 Td -(2172 movl 28\(%eax\), %ebp) 113.5814 Tj +(2172 p->pid = 0;) 104.8443 Tj 0 -246.8274 Td -(2173 movl 24\(%eax\), %edi) 113.5814 Tj +(2173 p->parent = 0;) 117.9499 Tj 0 -256.3207 Td -(2174 movl 20\(%eax\), %esi) 113.5814 Tj +(2174 p->name[0] = 0;) 122.3184 Tj 0 -265.8141 Td -(2175 movl 16\(%eax\), %edx) 113.5814 Tj +(2175 p->killed = 0;) 117.9499 Tj 0 -275.3075 Td -(2176 movl 12\(%eax\), %ecx) 113.5814 Tj +(2176 release\(&ptable.lock\);) 152.898 Tj 0 -284.8008 Td -(2177 movl 8\(%eax\), %ebx) 109.2129 Tj +(2177 return pid;) 104.8443 Tj 0 -294.2942 Td -(2178 movl 4\(%eax\), %esp) 109.2129 Tj +(2178 }) 52.4222 Tj 0 -303.7875 Td -(2179 pushl 0\(%eax\) # %eip) 122.3184 Tj +(2179 }) 43.6851 Tj 0 -313.2809 Td (2180 ) 21.8426 Tj 0 -322.7743 Td -(2181 ret) 43.6851 Tj +(2181 // No point waiting if we don't have any children.) 257.7424 Tj 0 -332.2676 Td -(2182 ) 21.8426 Tj +(2182 if\(!havekids || cp->killed\){) 161.635 Tj 0 -341.761 Td -(2183 ) 21.8426 Tj +(2183 release\(&ptable.lock\);) 144.161 Tj 0 -351.2543 Td -(2184 ) 21.8426 Tj +(2184 return -1;) 91.7388 Tj 0 -360.7477 Td -(2185 ) 21.8426 Tj +(2185 }) 43.6851 Tj 0 -370.2411 Td (2186 ) 21.8426 Tj 0 -379.7344 Td -(2187 ) 21.8426 Tj +(2187 // Wait for children to exit. \(See wakeup1 call in p\ +roc_exit.\)) 314.533 Tj 0 -389.2278 Td -(2188 ) 21.8426 Tj +(2188 sleep\(cp, &ptable.lock\); ) 152.898 Tj 0 -398.7211 Td -(2189 ) 21.8426 Tj +(2189 }) 34.9481 Tj 0 -408.2145 Td -(2190 ) 21.8426 Tj +(2190 }) 26.2111 Tj 0 -417.7079 Td (2191 ) 21.8426 Tj 0 -427.2012 Td @@ -9632,6 +9706,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -9649,88 +9725,84 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/kalloc.c Page 1) 170.3721 Tj +(Aug 8 01:04 2009 xv6/swtch.S Page 1) 166.0035 Tj 0 -28.4801 Td -(2200 // Physical memory allocator, intended to allocate) 240.2683 Tj +(2200 # Context switch) 91.7388 Tj 0 -37.9735 Td -(2201 // memory for user processes. Allocates in 4096-byte "page\ -s".) 288.322 Tj +(2201 #) 26.2111 Tj 0 -47.4668 Td -(2202 // Free list is kept sorted and combines adjacent pages in\ -to) 283.9534 Tj +(2202 # void swtch\(struct context **old, struct context *new\)\ +;) 275.2164 Tj 0 -56.9602 Td -(2203 // long runs, to make it easier to allocate big segments.) 270.8479 Tj +(2203 #) 26.2111 Tj 0 -66.4535 Td -(2204 // One reason the page size is 4k is that the x86 segment \ -size) 292.6905 Tj +(2204 # Save current register context in old) 187.8461 Tj 0 -75.9469 Td -(2205 // granularity is 4k.) 113.5814 Tj +(2205 # and then load register context from new.) 205.3202 Tj 0 -85.4403 Td (2206 ) 21.8426 Tj 0 -94.9336 Td -(2207 #include "types.h") 100.4758 Tj +(2207 .globl swtch) 74.2647 Tj 0 -104.427 Td -(2208 #include "defs.h") 96.1073 Tj +(2208 swtch:) 48.0537 Tj 0 -113.9203 Td -(2209 #include "param.h") 100.4758 Tj +(2209 movl 4\(%esp\), %eax) 109.2129 Tj 0 -123.4137 Td -(2210 #include "spinlock.h") 113.5814 Tj +(2210 movl 8\(%esp\), %edx) 109.2129 Tj 0 -132.9071 Td (2211 ) 21.8426 Tj 0 -142.4004 Td -(2212 struct spinlock kalloc_lock;) 144.161 Tj +(2212 # Save old callee-save registers) 170.3721 Tj 0 -151.8938 Td -(2213 ) 21.8426 Tj +(2213 pushl %ebp) 74.2647 Tj 0 -161.3871 Td -(2214 struct run {) 74.2647 Tj +(2214 pushl %ebx) 74.2647 Tj 0 -170.8805 Td -(2215 struct run *next;) 104.8443 Tj +(2215 pushl %esi) 74.2647 Tj 0 -180.3739 Td -(2216 int len; // bytes) 104.8443 Tj +(2216 pushl %edi) 74.2647 Tj 0 -189.8672 Td -(2217 };) 30.5796 Tj +(2217 ) 21.8426 Tj 0 -199.3606 Td -(2218 struct run *freelist;) 113.5814 Tj +(2218 # Switch stacks) 96.1073 Tj 0 -208.8539 Td -(2219 ) 21.8426 Tj +(2219 movl %esp, \(%eax\)) 104.8443 Tj 0 -218.3473 Td -(2220 // Initialize free list of physical pages.) 205.3202 Tj +(2220 movl %edx, %esp) 96.1073 Tj 0 -227.8407 Td -(2221 // This code cheats by just considering one megabyte of) 262.1109 Tj +(2221 ) 21.8426 Tj 0 -237.334 Td -(2222 // pages after _end. Real systems would determine the) 257.7424 Tj +(2222 # Load new callee-save registers) 170.3721 Tj 0 -246.8274 Td -(2223 // amount of memory available in the system and use it all\ -.) 279.5849 Tj +(2223 popl %edi) 69.8962 Tj 0 -256.3207 Td -(2224 void) 39.3166 Tj +(2224 popl %esi) 69.8962 Tj 0 -265.8141 Td -(2225 kinit\(void\)) 69.8962 Tj +(2225 popl %ebx) 69.8962 Tj 0 -275.3075 Td -(2226 {) 26.2111 Tj +(2226 popl %ebp) 69.8962 Tj 0 -284.8008 Td -(2227 extern int end;) 96.1073 Tj +(2227 ret) 43.6851 Tj 0 -294.2942 Td -(2228 uint mem;) 69.8962 Tj +(2228 ) 21.8426 Tj 0 -303.7875 Td -(2229 char *start;) 83.0018 Tj +(2229 ) 21.8426 Tj 0 -313.2809 Td (2230 ) 21.8426 Tj 0 -322.7743 Td -(2231 initlock\(&kalloc_lock, "kalloc"\);) 174.7406 Tj +(2231 ) 21.8426 Tj 0 -332.2676 Td -(2232 start = \(char*\) &end;) 122.3184 Tj +(2232 ) 21.8426 Tj 0 -341.761 Td -(2233 start = \(char*\) \(\(\(uint\)start + PAGE\) & ~\(PAGE-1\ -\)\);) 253.3738 Tj +(2233 ) 21.8426 Tj 0 -351.2543 Td -(2234 mem = 256; // assume computer has 256 pages of RAM) 249.0053 Tj +(2234 ) 21.8426 Tj 0 -360.7477 Td -(2235 cprintf\("mem = %d\\n", mem * PAGE\);) 179.1091 Tj +(2235 ) 21.8426 Tj 0 -370.2411 Td -(2236 kfree\(start, mem * PAGE\);) 139.7925 Tj +(2236 ) 21.8426 Tj 0 -379.7344 Td -(2237 }) 26.2111 Tj +(2237 ) 21.8426 Tj 0 -389.2278 Td (2238 ) 21.8426 Tj 0 -398.7211 Td @@ -9773,99 +9845,102 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/kalloc.c Page 2) 170.3721 Tj +(Aug 8 01:04 2009 xv6/kalloc.c Page 1) 170.3721 Tj 0 -28.4801 Td -(2250 // Free the len bytes of memory pointed at by v,) 231.5313 Tj +(2250 // Physical memory allocator, intended to allocate) 240.2683 Tj 0 -37.9735 Td -(2251 // which normally should have been returned by a) 231.5313 Tj +(2251 // memory for user processes. Allocates in 4096-byte "page\ +s".) 288.322 Tj 0 -47.4668 Td -(2252 // call to kalloc\(len\). \(The exception is when) 227.1628 Tj +(2252 // Free list is kept sorted and combines adjacent pages in\ +to) 283.9534 Tj 0 -56.9602 Td -(2253 // initializing the allocator; see kinit above.\)) 231.5313 Tj +(2253 // long runs, to make it easier to allocate big segments.) 270.8479 Tj 0 -66.4535 Td -(2254 void) 39.3166 Tj +(2254 // One reason the page size is 4k is that the x86 segment \ +size) 292.6905 Tj 0 -75.9469 Td -(2255 kfree\(char *v, int len\)) 122.3184 Tj +(2255 // granularity is 4k.) 113.5814 Tj 0 -85.4403 Td -(2256 {) 26.2111 Tj +(2256 ) 21.8426 Tj 0 -94.9336 Td -(2257 struct run *r, *rend, **rp, *p, *pend;) 196.5831 Tj +(2257 #include "types.h") 100.4758 Tj 0 -104.427 Td -(2258 ) 21.8426 Tj +(2258 #include "defs.h") 96.1073 Tj 0 -113.9203 Td -(2259 if\(len <= 0 || len % PAGE\)) 144.161 Tj +(2259 #include "param.h") 100.4758 Tj 0 -123.4137 Td -(2260 panic\("kfree"\);) 104.8443 Tj +(2260 #include "spinlock.h") 113.5814 Tj 0 -132.9071 Td (2261 ) 21.8426 Tj 0 -142.4004 Td -(2262 // Fill with junk to catch dangling refs.) 209.6887 Tj +(2262 struct run {) 74.2647 Tj 0 -151.8938 Td -(2263 memset\(v, 1, len\);) 109.2129 Tj +(2263 struct run *next;) 104.8443 Tj 0 -161.3871 Td -(2264 ) 21.8426 Tj +(2264 int len; // bytes) 104.8443 Tj 0 -170.8805 Td -(2265 acquire\(&kalloc_lock\);) 126.6869 Tj +(2265 };) 30.5796 Tj 0 -180.3739 Td -(2266 p = \(struct run*\)v;) 113.5814 Tj +(2266 ) 21.8426 Tj 0 -189.8672 Td -(2267 pend = \(struct run*\)\(v + len\);) 161.635 Tj +(2267 struct {) 56.7907 Tj 0 -199.3606 Td -(2268 for\(rp=&freelist; \(r=*rp\) != 0 && r <= pend; rp=&r->n\ -ext\){) 283.9534 Tj +(2268 struct spinlock lock;) 122.3184 Tj 0 -208.8539 Td -(2269 rend = \(struct run*\)\(\(char*\)r + r->len\);) 214.0572 Tj +(2269 struct run *freelist;) 122.3184 Tj 0 -218.3473 Td -(2270 if\(r <= p && p < rend\)) 135.4239 Tj +(2270 } kmem;) 52.4222 Tj 0 -227.8407 Td -(2271 panic\("freeing free page"\);) 166.0035 Tj +(2271 ) 21.8426 Tj 0 -237.334 Td -(2272 if\(pend == r\){ // p next to r: replace r with p) 249.0053 Tj +(2272 // Initialize free list of physical pages.) 205.3202 Tj 0 -246.8274 Td -(2273 p->len = len + r->len;) 144.161 Tj +(2273 // This code cheats by just considering one megabyte of) 262.1109 Tj 0 -256.3207 Td -(2274 p->next = r->next;) 126.6869 Tj +(2274 // pages after end. Real systems would determine the) 253.3738 Tj 0 -265.8141 Td -(2275 *rp = p;) 83.0018 Tj +(2275 // amount of memory available in the system and use it all\ +.) 279.5849 Tj 0 -275.3075 Td -(2276 goto out;) 87.3703 Tj +(2276 void) 39.3166 Tj 0 -284.8008 Td -(2277 }) 43.6851 Tj +(2277 kinit\(void\)) 69.8962 Tj 0 -294.2942 Td -(2278 if\(rend == p\){ // r next to p: replace p with r) 249.0053 Tj +(2278 {) 26.2111 Tj 0 -303.7875 Td -(2279 r->len += len;) 109.2129 Tj +(2279 extern char end[];) 109.2129 Tj 0 -313.2809 Td -(2280 if\(r->next && r->next == pend\){ // r now next to \ -r->next?) 301.4275 Tj +(2280 uint len;) 69.8962 Tj 0 -322.7743 Td -(2281 r->len += r->next->len;) 157.2665 Tj +(2281 char *p;) 65.5277 Tj 0 -332.2676 Td -(2282 r->next = r->next->next;) 161.635 Tj +(2282 ) 21.8426 Tj 0 -341.761 Td -(2283 }) 52.4222 Tj +(2283 initlock\(&kmem.lock, "kmem"\);) 157.2665 Tj 0 -351.2543 Td -(2284 goto out;) 87.3703 Tj +(2284 p = \(char*\)\(\(\(uint\)end + PAGE\) & ~\(PAGE-1\)\);) 222.7942 Tj 0 -360.7477 Td -(2285 }) 43.6851 Tj +(2285 len = 256*PAGE; // assume computer has 256 pages of RAM,\ + 1 MB) 297.059 Tj 0 -370.2411 Td -(2286 }) 34.9481 Tj +(2286 cprintf\("mem = %d\\n", len\);) 148.5295 Tj 0 -379.7344 Td -(2287 // Insert p before r in list.) 157.2665 Tj +(2287 kfree\(p, len\);) 91.7388 Tj 0 -389.2278 Td -(2288 p->len = len;) 87.3703 Tj +(2288 }) 26.2111 Tj 0 -398.7211 Td -(2289 p->next = r;) 83.0018 Tj +(2289 ) 21.8426 Tj 0 -408.2145 Td -(2290 *rp = p;) 65.5277 Tj +(2290 ) 21.8426 Tj 0 -417.7079 Td (2291 ) 21.8426 Tj 0 -427.2012 Td -(2292 out:) 43.6851 Tj +(2292 ) 21.8426 Tj 0 -436.6946 Td -(2293 release\(&kalloc_lock\);) 126.6869 Tj +(2293 ) 21.8426 Tj 0 -446.1879 Td -(2294 }) 26.2111 Tj +(2294 ) 21.8426 Tj 0 -455.6813 Td (2295 ) 21.8426 Tj 0 -465.1747 Td @@ -9906,6 +9981,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -9923,97 +10000,100 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/kalloc.c Page 3) 170.3721 Tj +(Aug 8 01:04 2009 xv6/kalloc.c Page 2) 170.3721 Tj 0 -28.4801 Td -(2300 // Allocate n bytes of physical memory.) 192.2146 Tj +(2300 // Free the len bytes of memory pointed at by v,) 231.5313 Tj 0 -37.9735 Td -(2301 // Returns a kernel-segment pointer.) 179.1091 Tj +(2301 // which normally should have been returned by a) 231.5313 Tj 0 -47.4668 Td -(2302 // Returns 0 if the memory cannot be allocated.) 227.1628 Tj +(2302 // call to kalloc\(len\). \(The exception is when) 227.1628 Tj 0 -56.9602 Td -(2303 char*) 43.6851 Tj +(2303 // initializing the allocator; see kinit above.\)) 231.5313 Tj 0 -66.4535 Td -(2304 kalloc\(int n\)) 78.6333 Tj +(2304 void) 39.3166 Tj 0 -75.9469 Td -(2305 {) 26.2111 Tj +(2305 kfree\(char *v, int len\)) 122.3184 Tj 0 -85.4403 Td -(2306 char *p;) 65.5277 Tj +(2306 {) 26.2111 Tj 0 -94.9336 Td -(2307 struct run *r, **rp;) 117.9499 Tj +(2307 struct run *r, *rend, **rp, *p, *pend;) 196.5831 Tj 0 -104.427 Td (2308 ) 21.8426 Tj 0 -113.9203 Td -(2309 if\(n % PAGE || n <= 0\)) 126.6869 Tj +(2309 if\(len <= 0 || len % PAGE\)) 144.161 Tj 0 -123.4137 Td -(2310 panic\("kalloc"\);) 109.2129 Tj +(2310 panic\("kfree"\);) 104.8443 Tj 0 -132.9071 Td (2311 ) 21.8426 Tj 0 -142.4004 Td -(2312 acquire\(&kalloc_lock\);) 126.6869 Tj +(2312 // Fill with junk to catch dangling refs.) 209.6887 Tj 0 -151.8938 Td -(2313 for\(rp=&freelist; \(r=*rp\) != 0; rp=&r->next\){) 227.1628 Tj +(2313 memset\(v, 1, len\);) 109.2129 Tj 0 -161.3871 Td -(2314 if\(r->len == n\){) 109.2129 Tj +(2314 ) 21.8426 Tj 0 -170.8805 Td -(2315 *rp = r->next;) 109.2129 Tj +(2315 acquire\(&kmem.lock\);) 117.9499 Tj 0 -180.3739 Td -(2316 release\(&kalloc_lock\);) 144.161 Tj +(2316 p = \(struct run*\)v;) 113.5814 Tj 0 -189.8672 Td -(2317 return \(char*\)r;) 117.9499 Tj +(2317 pend = \(struct run*\)\(v + len\);) 161.635 Tj 0 -199.3606 Td -(2318 }) 43.6851 Tj +(2318 for\(rp=&kmem.freelist; \(r=*rp\) != 0 && r <= pend; rp=\ +&r->next\){) 305.796 Tj 0 -208.8539 Td -(2319 if\(r->len > n\){) 104.8443 Tj +(2319 rend = \(struct run*\)\(\(char*\)r + r->len\);) 214.0572 Tj 0 -218.3473 Td -(2320 r->len -= n;) 100.4758 Tj +(2320 if\(r <= p && p < rend\)) 135.4239 Tj 0 -227.8407 Td -(2321 p = \(char*\)r + r->len;) 144.161 Tj +(2321 panic\("freeing free page"\);) 166.0035 Tj 0 -237.334 Td -(2322 release\(&kalloc_lock\);) 144.161 Tj +(2322 if\(rend == p\){ // r before p: expand r to include p) 266.4794 Tj 0 -246.8274 Td -(2323 return p;) 87.3703 Tj +(2323 r->len += len;) 109.2129 Tj 0 -256.3207 Td -(2324 }) 43.6851 Tj +(2324 if\(r->next && r->next == pend\){ // r now next to \ +r->next?) 301.4275 Tj 0 -265.8141 Td -(2325 }) 34.9481 Tj +(2325 r->len += r->next->len;) 157.2665 Tj 0 -275.3075 Td -(2326 release\(&kalloc_lock\);) 126.6869 Tj +(2326 r->next = r->next->next;) 161.635 Tj 0 -284.8008 Td -(2327 ) 21.8426 Tj +(2327 }) 52.4222 Tj 0 -294.2942 Td -(2328 cprintf\("kalloc: out of memory\\n"\);) 183.4776 Tj +(2328 goto out;) 87.3703 Tj 0 -303.7875 Td -(2329 return 0;) 69.8962 Tj +(2329 }) 43.6851 Tj 0 -313.2809 Td -(2330 }) 26.2111 Tj +(2330 if\(pend == r\){ // p before r: expand p to include, \ +replace r) 305.796 Tj 0 -322.7743 Td -(2331 ) 21.8426 Tj +(2331 p->len = len + r->len;) 144.161 Tj 0 -332.2676 Td -(2332 ) 21.8426 Tj +(2332 p->next = r->next;) 126.6869 Tj 0 -341.761 Td -(2333 ) 21.8426 Tj +(2333 *rp = p;) 83.0018 Tj 0 -351.2543 Td -(2334 ) 21.8426 Tj +(2334 goto out;) 87.3703 Tj 0 -360.7477 Td -(2335 ) 21.8426 Tj +(2335 }) 43.6851 Tj 0 -370.2411 Td -(2336 ) 21.8426 Tj +(2336 }) 34.9481 Tj 0 -379.7344 Td -(2337 ) 21.8426 Tj +(2337 // Insert p before r in list.) 157.2665 Tj 0 -389.2278 Td -(2338 ) 21.8426 Tj +(2338 p->len = len;) 87.3703 Tj 0 -398.7211 Td -(2339 ) 21.8426 Tj +(2339 p->next = r;) 83.0018 Tj 0 -408.2145 Td -(2340 ) 21.8426 Tj +(2340 *rp = p;) 65.5277 Tj 0 -417.7079 Td (2341 ) 21.8426 Tj 0 -427.2012 Td -(2342 ) 21.8426 Tj +(2342 out:) 43.6851 Tj 0 -436.6946 Td -(2343 ) 21.8426 Tj +(2343 release\(&kmem.lock\);) 117.9499 Tj 0 -446.1879 Td -(2344 ) 21.8426 Tj +(2344 }) 26.2111 Tj 0 -455.6813 Td (2345 ) 21.8426 Tj 0 -465.1747 Td @@ -10042,85 +10122,79 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/traps.h Page 1) 166.0035 Tj +(Aug 8 01:04 2009 xv6/kalloc.c Page 3) 170.3721 Tj 0 -28.4801 Td -(2350 // x86 trap and interrupt constants.) 179.1091 Tj +(2350 // Allocate n bytes of physical memory.) 192.2146 Tj 0 -37.9735 Td -(2351 ) 21.8426 Tj +(2351 // Returns a kernel-segment pointer.) 179.1091 Tj 0 -47.4668 Td -(2352 // Processor-defined:) 113.5814 Tj +(2352 // Returns 0 if the memory cannot be allocated.) 227.1628 Tj 0 -56.9602 Td -(2353 #define T_DIVIDE 0 // divide error) 227.1628 Tj +(2353 char*) 43.6851 Tj 0 -66.4535 Td -(2354 #define T_DEBUG 1 // debug exception) 240.2683 Tj +(2354 kalloc\(int n\)) 78.6333 Tj 0 -75.9469 Td -(2355 #define T_NMI 2 // non-maskable interrupt) 270.8479 Tj +(2355 {) 26.2111 Tj 0 -85.4403 Td -(2356 #define T_BRKPT 3 // breakpoint) 218.4257 Tj +(2356 char *p;) 65.5277 Tj 0 -94.9336 Td -(2357 #define T_OFLOW 4 // overflow) 209.6887 Tj +(2357 struct run *r, **rp;) 117.9499 Tj 0 -104.427 Td -(2358 #define T_BOUND 5 // bounds check) 227.1628 Tj +(2358 ) 21.8426 Tj 0 -113.9203 Td -(2359 #define T_ILLOP 6 // illegal opcode) 235.8998 Tj +(2359 if\(n % PAGE || n <= 0\)) 126.6869 Tj 0 -123.4137 Td -(2360 #define T_DEVICE 7 // device not available) 262.1109 Tj +(2360 panic\("kalloc"\);) 109.2129 Tj 0 -132.9071 Td -(2361 #define T_DBLFLT 8 // double fault) 227.1628 Tj +(2361 ) 21.8426 Tj 0 -142.4004 Td -(2362 // #define T_COPROC 9 // reserved \(not used sin\ -ce 486\)) 301.4275 Tj +(2362 acquire\(&kmem.lock\);) 117.9499 Tj 0 -151.8938 Td -(2363 #define T_TSS 10 // invalid task switch seg\ -ment) 292.6905 Tj +(2363 for\(rp=&kmem.freelist; \(r=*rp\) != 0; rp=&r->next\){) 249.0053 Tj 0 -161.3871 Td -(2364 #define T_SEGNP 11 // segment not present) 257.7424 Tj +(2364 if\(r->len >= n\){) 109.2129 Tj 0 -170.8805 Td -(2365 #define T_STACK 12 // stack exception) 240.2683 Tj +(2365 r->len -= n;) 100.4758 Tj 0 -180.3739 Td -(2366 #define T_GPFLT 13 // general protection faul\ -t) 279.5849 Tj +(2366 p = \(char*\)r + r->len;) 144.161 Tj 0 -189.8672 Td -(2367 #define T_PGFLT 14 // page fault) 218.4257 Tj +(2367 if\(r->len == 0\)) 113.5814 Tj 0 -199.3606 Td -(2368 // #define T_RES 15 // reserved) 209.6887 Tj +(2368 *rp = r->next;) 117.9499 Tj 0 -208.8539 Td -(2369 #define T_FPERR 16 // floating point error) 262.1109 Tj +(2369 release\(&kmem.lock\);) 135.4239 Tj 0 -218.3473 Td -(2370 #define T_ALIGN 17 // aligment check) 235.8998 Tj +(2370 return p;) 87.3703 Tj 0 -227.8407 Td -(2371 #define T_MCHK 18 // machine check) 231.5313 Tj +(2371 }) 43.6851 Tj 0 -237.334 Td -(2372 #define T_SIMDERR 19 // SIMD floating point err\ -or) 283.9534 Tj +(2372 }) 34.9481 Tj 0 -246.8274 Td -(2373 ) 21.8426 Tj +(2373 release\(&kmem.lock\);) 117.9499 Tj 0 -256.3207 Td -(2374 // These are arbitrarily chosen, but with care not to over\ -lap) 288.322 Tj +(2374 ) 21.8426 Tj 0 -265.8141 Td -(2375 // processor defined exceptions or interrupt vectors.) 253.3738 Tj +(2375 cprintf\("kalloc: out of memory\\n"\);) 183.4776 Tj 0 -275.3075 Td -(2376 #define T_SYSCALL 48 // system call) 222.7942 Tj +(2376 return 0;) 69.8962 Tj 0 -284.8008 Td -(2377 #define T_DEFAULT 500 // catchall) 209.6887 Tj +(2377 }) 26.2111 Tj 0 -294.2942 Td (2378 ) 21.8426 Tj 0 -303.7875 Td -(2379 #define IRQ_OFFSET 32 // IRQ 0 corresponds to in\ -t IRQ_OFFSET) 327.6386 Tj +(2379 ) 21.8426 Tj 0 -313.2809 Td (2380 ) 21.8426 Tj 0 -322.7743 Td -(2381 #define IRQ_TIMER 0) 135.4239 Tj +(2381 ) 21.8426 Tj 0 -332.2676 Td -(2382 #define IRQ_KBD 1) 135.4239 Tj +(2382 ) 21.8426 Tj 0 -341.761 Td -(2383 #define IRQ_IDE 14) 135.4239 Tj +(2383 ) 21.8426 Tj 0 -351.2543 Td -(2384 #define IRQ_ERROR 19) 135.4239 Tj +(2384 ) 21.8426 Tj 0 -360.7477 Td -(2385 #define IRQ_SPURIOUS 31) 135.4239 Tj +(2385 ) 21.8426 Tj 0 -370.2411 Td (2386 ) 21.8426 Tj 0 -379.7344 Td @@ -10179,6 +10253,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -10196,103 +10272,109 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/vectors.pl Page 1) 179.1091 Tj +(Aug 8 01:04 2009 xv6/traps.h Page 1) 166.0035 Tj 0 -28.4801 Td -(2400 #!/usr/bin/perl -w) 100.4758 Tj +(2400 // x86 trap and interrupt constants.) 179.1091 Tj 0 -37.9735 Td (2401 ) 21.8426 Tj 0 -47.4668 Td -(2402 # Generate vectors.S, the trap/interrupt entry points.) 257.7424 Tj +(2402 // Processor-defined:) 113.5814 Tj 0 -56.9602 Td -(2403 # There has to be one entry point per interrupt number) 257.7424 Tj +(2403 #define T_DIVIDE 0 // divide error) 227.1628 Tj 0 -66.4535 Td -(2404 # since otherwise there's no way for trap\(\) to discover) 262.1109 Tj +(2404 #define T_DEBUG 1 // debug exception) 240.2683 Tj 0 -75.9469 Td -(2405 # the interrupt number.) 122.3184 Tj +(2405 #define T_NMI 2 // non-maskable interrupt) 270.8479 Tj 0 -85.4403 Td -(2406 ) 21.8426 Tj +(2406 #define T_BRKPT 3 // breakpoint) 218.4257 Tj 0 -94.9336 Td -(2407 print "# generated by vectors.pl - do not edit\\n";) 240.2683 Tj +(2407 #define T_OFLOW 4 // overflow) 209.6887 Tj 0 -104.427 Td -(2408 print "# handlers\\n";) 113.5814 Tj +(2408 #define T_BOUND 5 // bounds check) 227.1628 Tj 0 -113.9203 Td -(2409 print ".text\\n";) 91.7388 Tj +(2409 #define T_ILLOP 6 // illegal opcode) 235.8998 Tj 0 -123.4137 Td -(2410 print ".globl alltraps\\n";) 135.4239 Tj +(2410 #define T_DEVICE 7 // device not available) 262.1109 Tj 0 -132.9071 Td -(2411 for\(my $i = 0; $i < 256; $i++\){) 157.2665 Tj +(2411 #define T_DBLFLT 8 // double fault) 227.1628 Tj 0 -142.4004 Td -(2412 print ".globl vector$i\\n";) 152.898 Tj +(2412 // #define T_COPROC 9 // reserved \(not used sin\ +ce 486\)) 301.4275 Tj 0 -151.8938 Td -(2413 print "vector$i:\\n";) 126.6869 Tj +(2413 #define T_TSS 10 // invalid task switch seg\ +ment) 292.6905 Tj 0 -161.3871 Td -(2414 if\(\($i < 8 || $i > 14\) && $i != 17\){) 196.5831 Tj +(2414 #define T_SEGNP 11 // segment not present) 257.7424 Tj 0 -170.8805 Td -(2415 print " pushl \\$0\\n";) 152.898 Tj +(2415 #define T_STACK 12 // stack exception) 240.2683 Tj 0 -180.3739 Td -(2416 }) 43.6851 Tj +(2416 #define T_GPFLT 13 // general protection faul\ +t) 279.5849 Tj 0 -189.8672 Td -(2417 print " pushl \\$$i\\n";) 139.7925 Tj +(2417 #define T_PGFLT 14 // page fault) 218.4257 Tj 0 -199.3606 Td -(2418 print " jmp alltraps\\n";) 148.5295 Tj +(2418 // #define T_RES 15 // reserved) 209.6887 Tj 0 -208.8539 Td -(2419 }) 26.2111 Tj +(2419 #define T_FPERR 16 // floating point error) 262.1109 Tj 0 -218.3473 Td -(2420 ) 21.8426 Tj +(2420 #define T_ALIGN 17 // aligment check) 235.8998 Tj 0 -227.8407 Td -(2421 print "\\n# vector table\\n";) 139.7925 Tj +(2421 #define T_MCHK 18 // machine check) 231.5313 Tj 0 -237.334 Td -(2422 print ".data\\n";) 91.7388 Tj +(2422 #define T_SIMDERR 19 // SIMD floating point err\ +or) 283.9534 Tj 0 -246.8274 Td -(2423 print ".globl vectors\\n";) 131.0554 Tj +(2423 ) 21.8426 Tj 0 -256.3207 Td -(2424 print "vectors:\\n";) 104.8443 Tj +(2424 // These are arbitrarily chosen, but with care not to over\ +lap) 288.322 Tj 0 -265.8141 Td -(2425 for\(my $i = 0; $i < 256; $i++\){) 157.2665 Tj +(2425 // processor defined exceptions or interrupt vectors.) 253.3738 Tj 0 -275.3075 Td -(2426 print " .long vector$i\\n";) 157.2665 Tj +(2426 #define T_SYSCALL 64 // system call) 218.4257 Tj 0 -284.8008 Td -(2427 }) 26.2111 Tj +(2427 #define T_DEFAULT 500 // catchall) 209.6887 Tj 0 -294.2942 Td (2428 ) 21.8426 Tj 0 -303.7875 Td -(2429 # sample output:) 91.7388 Tj +(2429 #define T_IRQ0 32 // IRQ 0 corresponds to in\ +t T_IRQ) 305.796 Tj 0 -313.2809 Td -(2430 # # handlers) 83.0018 Tj +(2430 ) 21.8426 Tj 0 -322.7743 Td -(2431 # .text) 61.1592 Tj +(2431 #define IRQ_TIMER 0) 135.4239 Tj 0 -332.2676 Td -(2432 # .globl alltraps) 104.8443 Tj +(2432 #define IRQ_KBD 1) 135.4239 Tj 0 -341.761 Td -(2433 # .globl vector0) 100.4758 Tj +(2433 #define IRQ_COM1 4) 135.4239 Tj 0 -351.2543 Td -(2434 # vector0:) 74.2647 Tj +(2434 #define IRQ_IDE 14) 135.4239 Tj 0 -360.7477 Td -(2435 # pushl $0) 83.0018 Tj +(2435 #define IRQ_ERROR 19) 135.4239 Tj 0 -370.2411 Td -(2436 # pushl $0) 83.0018 Tj +(2436 #define IRQ_SPURIOUS 31) 135.4239 Tj 0 -379.7344 Td -(2437 # jmp alltraps) 100.4758 Tj +(2437 ) 21.8426 Tj 0 -389.2278 Td -(2438 # ...) 52.4222 Tj +(2438 ) 21.8426 Tj 0 -398.7211 Td -(2439 #) 26.2111 Tj +(2439 ) 21.8426 Tj 0 -408.2145 Td -(2440 # # vector table) 100.4758 Tj +(2440 ) 21.8426 Tj 0 -417.7079 Td -(2441 # .data) 61.1592 Tj +(2441 ) 21.8426 Tj 0 -427.2012 Td -(2442 # .globl vectors) 100.4758 Tj +(2442 ) 21.8426 Tj 0 -436.6946 Td -(2443 # vectors:) 74.2647 Tj +(2443 ) 21.8426 Tj 0 -446.1879 Td -(2444 # .long vector0) 104.8443 Tj +(2444 ) 21.8426 Tj 0 -455.6813 Td -(2445 # .long vector1) 104.8443 Tj +(2445 ) 21.8426 Tj 0 -465.1747 Td -(2446 # .long vector2) 104.8443 Tj +(2446 ) 21.8426 Tj 0 -474.668 Td -(2447 # ...) 52.4222 Tj +(2447 ) 21.8426 Tj 0 -484.1614 Td (2448 ) 21.8426 Tj 0 -493.6547 Td @@ -10315,99 +10397,100 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/trapasm.S Page 1) 174.7406 Tj +(Aug 8 01:04 2009 xv6/vectors.pl Page 1) 179.1091 Tj 0 -28.4801 Td -(2450 .text) 43.6851 Tj +(2450 #!/usr/bin/perl -w) 100.4758 Tj 0 -37.9735 Td (2451 ) 21.8426 Tj 0 -47.4668 Td -(2452 .set SEG_KDATA_SEL, 0x10 # selector for SEG_KDATA) 244.6368 Tj +(2452 # Generate vectors.S, the trap/interrupt entry points.) 257.7424 Tj 0 -56.9602 Td -(2453 ) 21.8426 Tj +(2453 # There has to be one entry point per interrupt number) 257.7424 Tj 0 -66.4535 Td -(2454 # vectors.S sends all traps here.) 174.7406 Tj +(2454 # since otherwise there's no way for trap\(\) to discover) 262.1109 Tj 0 -75.9469 Td -(2455 .globl alltraps) 87.3703 Tj +(2455 # the interrupt number.) 122.3184 Tj 0 -85.4403 Td -(2456 alltraps:) 61.1592 Tj +(2456 ) 21.8426 Tj 0 -94.9336 Td -(2457 # Build trap frame.) 113.5814 Tj +(2457 print "# generated by vectors.pl - do not edit\\n";) 240.2683 Tj 0 -104.427 Td -(2458 pushl %ds) 69.8962 Tj +(2458 print "# handlers\\n";) 113.5814 Tj 0 -113.9203 Td -(2459 pushl %es) 69.8962 Tj +(2459 print ".globl alltraps\\n";) 135.4239 Tj 0 -123.4137 Td -(2460 pushal) 56.7907 Tj +(2460 for\(my $i = 0; $i < 256; $i++\){) 157.2665 Tj 0 -132.9071 Td -(2461 ) 21.8426 Tj +(2461 print ".globl vector$i\\n";) 152.898 Tj 0 -142.4004 Td -(2462 # Set up data segments.) 131.0554 Tj +(2462 print "vector$i:\\n";) 126.6869 Tj 0 -151.8938 Td -(2463 movl $SEG_KDATA_SEL, %eax) 139.7925 Tj +(2463 if\(!\($i == 8 || \($i >= 10 && $i <= 14\) || $i == 17\ +\)\){) 270.8479 Tj 0 -161.3871 Td -(2464 movw %ax,%ds) 83.0018 Tj +(2464 print " pushl \\$0\\n";) 152.898 Tj 0 -170.8805 Td -(2465 movw %ax,%es) 83.0018 Tj +(2465 }) 43.6851 Tj 0 -180.3739 Td -(2466 ) 21.8426 Tj +(2466 print " pushl \\$$i\\n";) 139.7925 Tj 0 -189.8672 Td -(2467 # Call trap\(tf\), where tf=%esp) 161.635 Tj +(2467 print " jmp alltraps\\n";) 148.5295 Tj 0 -199.3606 Td -(2468 pushl %esp) 74.2647 Tj +(2468 }) 26.2111 Tj 0 -208.8539 Td -(2469 call trap) 69.8962 Tj +(2469 ) 21.8426 Tj 0 -218.3473 Td -(2470 addl $4, %esp) 87.3703 Tj +(2470 print "\\n# vector table\\n";) 139.7925 Tj 0 -227.8407 Td -(2471 ) 21.8426 Tj +(2471 print ".data\\n";) 91.7388 Tj 0 -237.334 Td -(2472 # Return falls through to trapret...) 187.8461 Tj +(2472 print ".globl vectors\\n";) 131.0554 Tj 0 -246.8274 Td -(2473 .globl trapret) 83.0018 Tj +(2473 print "vectors:\\n";) 104.8443 Tj 0 -256.3207 Td -(2474 trapret:) 56.7907 Tj +(2474 for\(my $i = 0; $i < 256; $i++\){) 157.2665 Tj 0 -265.8141 Td -(2475 popal) 52.4222 Tj +(2475 print " .long vector$i\\n";) 157.2665 Tj 0 -275.3075 Td -(2476 popl %es) 65.5277 Tj +(2476 }) 26.2111 Tj 0 -284.8008 Td -(2477 popl %ds) 65.5277 Tj +(2477 ) 21.8426 Tj 0 -294.2942 Td -(2478 addl $0x8, %esp # trapno and errcode) 192.2146 Tj +(2478 # sample output:) 91.7388 Tj 0 -303.7875 Td -(2479 iret) 48.0537 Tj +(2479 # # handlers) 83.0018 Tj 0 -313.2809 Td -(2480 ) 21.8426 Tj +(2480 # .globl alltraps) 104.8443 Tj 0 -322.7743 Td -(2481 # A forked process switches to user mode by calling) 253.3738 Tj +(2481 # .globl vector0) 100.4758 Tj 0 -332.2676 Td -(2482 # forkret1\(tf\), where tf is the trap frame to use.) 249.0053 Tj +(2482 # vector0:) 74.2647 Tj 0 -341.761 Td -(2483 .globl forkret1) 87.3703 Tj +(2483 # pushl $0) 83.0018 Tj 0 -351.2543 Td -(2484 forkret1:) 61.1592 Tj +(2484 # pushl $0) 83.0018 Tj 0 -360.7477 Td -(2485 movl 4\(%esp\), %esp) 109.2129 Tj +(2485 # jmp alltraps) 100.4758 Tj 0 -370.2411 Td -(2486 jmp trapret) 78.6333 Tj +(2486 # ...) 52.4222 Tj 0 -379.7344 Td -(2487 ) 21.8426 Tj +(2487 #) 26.2111 Tj 0 -389.2278 Td -(2488 ) 21.8426 Tj +(2488 # # vector table) 100.4758 Tj 0 -398.7211 Td -(2489 ) 21.8426 Tj +(2489 # .data) 61.1592 Tj 0 -408.2145 Td -(2490 ) 21.8426 Tj +(2490 # .globl vectors) 100.4758 Tj 0 -417.7079 Td -(2491 ) 21.8426 Tj +(2491 # vectors:) 74.2647 Tj 0 -427.2012 Td -(2492 ) 21.8426 Tj +(2492 # .long vector0) 104.8443 Tj 0 -436.6946 Td -(2493 ) 21.8426 Tj +(2493 # .long vector1) 104.8443 Tj 0 -446.1879 Td -(2494 ) 21.8426 Tj +(2494 # .long vector2) 104.8443 Tj 0 -455.6813 Td -(2495 ) 21.8426 Tj +(2495 # ...) 52.4222 Tj 0 -465.1747 Td (2496 ) 21.8426 Tj 0 -474.668 Td @@ -10446,6 +10529,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -10463,109 +10548,107 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/trap.c Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/trapasm.S Page 1) 174.7406 Tj 0 -28.4801 Td -(2500 #include "types.h") 100.4758 Tj +(2500 #define SEG_KCODE 1 // kernel code) 174.7406 Tj 0 -37.9735 Td -(2501 #include "defs.h") 96.1073 Tj +(2501 #define SEG_KDATA 2 // kernel data+stack) 200.9517 Tj 0 -47.4668 Td -(2502 #include "param.h") 100.4758 Tj +(2502 #define SEG_KCPU 3 // kernel per-cpu data) 209.6887 Tj 0 -56.9602 Td -(2503 #include "mmu.h") 91.7388 Tj +(2503 ) 21.8426 Tj 0 -66.4535 Td -(2504 #include "proc.h") 96.1073 Tj +(2504 # vectors.S sends all traps here.) 174.7406 Tj 0 -75.9469 Td -(2505 #include "x86.h") 91.7388 Tj +(2505 .globl alltraps) 87.3703 Tj 0 -85.4403 Td -(2506 #include "traps.h") 100.4758 Tj +(2506 alltraps:) 61.1592 Tj 0 -94.9336 Td -(2507 #include "spinlock.h") 113.5814 Tj +(2507 # Build trap frame.) 113.5814 Tj 0 -104.427 Td -(2508 ) 21.8426 Tj +(2508 pushl %ds) 69.8962 Tj 0 -113.9203 Td -(2509 // Interrupt descriptor table \(shared by all CPUs\).) 244.6368 Tj +(2509 pushl %es) 69.8962 Tj 0 -123.4137 Td -(2510 struct gatedesc idt[256];) 131.0554 Tj +(2510 pushl %fs) 69.8962 Tj 0 -132.9071 Td -(2511 extern uint vectors[]; // in vectors.S: array of 256 entr\ -y pointers) 318.9016 Tj +(2511 pushl %gs) 69.8962 Tj 0 -142.4004 Td -(2512 struct spinlock tickslock;) 135.4239 Tj +(2512 pushal) 56.7907 Tj 0 -151.8938 Td -(2513 int ticks;) 65.5277 Tj +(2513 ) 21.8426 Tj 0 -161.3871 Td -(2514 ) 21.8426 Tj +(2514 # Set up data and per-cpu segments.) 183.4776 Tj 0 -170.8805 Td -(2515 void) 39.3166 Tj +(2515 movw $\(SEG_KDATA<<3\), %ax) 139.7925 Tj 0 -180.3739 Td -(2516 tvinit\(void\)) 74.2647 Tj +(2516 movw %ax, %ds) 87.3703 Tj 0 -189.8672 Td -(2517 {) 26.2111 Tj +(2517 movw %ax, %es) 87.3703 Tj 0 -199.3606 Td -(2518 int i;) 56.7907 Tj +(2518 movw $\(SEG_KCPU<<3\), %ax) 135.4239 Tj 0 -208.8539 Td -(2519 ) 21.8426 Tj +(2519 movw %ax, %fs) 87.3703 Tj 0 -218.3473 Td -(2520 for\(i = 0; i < 256; i++\)) 135.4239 Tj +(2520 movw %ax, %gs) 87.3703 Tj 0 -227.8407 Td -(2521 SETGATE\(idt[i], 0, SEG_KCODE<<3, vectors[i], 0\);) 249.0053 Tj +(2521 ) 21.8426 Tj 0 -237.334 Td -(2522 SETGATE\(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSC\ -ALL], DPL_USER\);) 340.7441 Tj +(2522 # Call trap\(tf\), where tf=%esp) 161.635 Tj 0 -246.8274 Td -(2523 ) 21.8426 Tj +(2523 pushl %esp) 74.2647 Tj 0 -256.3207 Td -(2524 initlock\(&tickslock, "time"\);) 157.2665 Tj +(2524 call trap) 69.8962 Tj 0 -265.8141 Td -(2525 }) 26.2111 Tj +(2525 addl $4, %esp) 87.3703 Tj 0 -275.3075 Td (2526 ) 21.8426 Tj 0 -284.8008 Td -(2527 void) 39.3166 Tj +(2527 # Return falls through to trapret...) 187.8461 Tj 0 -294.2942 Td -(2528 idtinit\(void\)) 78.6333 Tj +(2528 .globl trapret) 83.0018 Tj 0 -303.7875 Td -(2529 {) 26.2111 Tj +(2529 trapret:) 56.7907 Tj 0 -313.2809 Td -(2530 lidt\(idt, sizeof\(idt\)\);) 131.0554 Tj +(2530 popal) 52.4222 Tj 0 -322.7743 Td -(2531 }) 26.2111 Tj +(2531 popl %gs) 65.5277 Tj 0 -332.2676 Td -(2532 ) 21.8426 Tj +(2532 popl %fs) 65.5277 Tj 0 -341.761 Td -(2533 void) 39.3166 Tj +(2533 popl %es) 65.5277 Tj 0 -351.2543 Td -(2534 trap\(struct trapframe *tf\)) 135.4239 Tj +(2534 popl %ds) 65.5277 Tj 0 -360.7477 Td -(2535 {) 26.2111 Tj +(2535 addl $0x8, %esp # trapno and errcode) 192.2146 Tj 0 -370.2411 Td -(2536 if\(tf->trapno == T_SYSCALL\){) 152.898 Tj +(2536 iret) 48.0537 Tj 0 -379.7344 Td -(2537 if\(cp->killed\)) 100.4758 Tj +(2537 ) 21.8426 Tj 0 -389.2278 Td -(2538 exit\(\);) 78.6333 Tj +(2538 ) 21.8426 Tj 0 -398.7211 Td -(2539 cp->tf = tf;) 91.7388 Tj +(2539 ) 21.8426 Tj 0 -408.2145 Td -(2540 syscall\(\);) 83.0018 Tj +(2540 ) 21.8426 Tj 0 -417.7079 Td -(2541 if\(cp->killed\)) 100.4758 Tj +(2541 ) 21.8426 Tj 0 -427.2012 Td -(2542 exit\(\);) 78.6333 Tj +(2542 ) 21.8426 Tj 0 -436.6946 Td -(2543 return;) 69.8962 Tj +(2543 ) 21.8426 Tj 0 -446.1879 Td -(2544 }) 34.9481 Tj +(2544 ) 21.8426 Tj 0 -455.6813 Td (2545 ) 21.8426 Tj 0 -465.1747 Td -(2546 switch\(tf->trapno\){) 113.5814 Tj +(2546 ) 21.8426 Tj 0 -474.668 Td -(2547 case IRQ_OFFSET + IRQ_TIMER:) 152.898 Tj +(2547 ) 21.8426 Tj 0 -484.1614 Td -(2548 if\(cpu\(\) == 0\){) 104.8443 Tj +(2548 ) 21.8426 Tj 0 -493.6547 Td -(2549 acquire\(&tickslock\);) 135.4239 Tj +(2549 ) 21.8426 Tj 0 -522.1348 Td (Sheet 25) 34.9481 Tj Q @@ -10584,101 +10667,97 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/trap.c Page 2) 161.635 Tj +(Aug 8 01:04 2009 xv6/trap.c Page 1) 161.635 Tj 0 -28.4801 Td -(2550 ticks++;) 83.0018 Tj +(2550 #include "types.h") 100.4758 Tj 0 -37.9735 Td -(2551 wakeup\(&ticks\);) 113.5814 Tj +(2551 #include "defs.h") 96.1073 Tj 0 -47.4668 Td -(2552 release\(&tickslock\);) 135.4239 Tj +(2552 #include "param.h") 100.4758 Tj 0 -56.9602 Td -(2553 }) 43.6851 Tj +(2553 #include "mmu.h") 91.7388 Tj 0 -66.4535 Td -(2554 lapic_eoi\(\);) 91.7388 Tj +(2554 #include "proc.h") 96.1073 Tj 0 -75.9469 Td -(2555 break;) 65.5277 Tj +(2555 #include "x86.h") 91.7388 Tj 0 -85.4403 Td -(2556 case IRQ_OFFSET + IRQ_IDE:) 144.161 Tj +(2556 #include "traps.h") 100.4758 Tj 0 -94.9336 Td -(2557 ide_intr\(\);) 87.3703 Tj +(2557 #include "spinlock.h") 113.5814 Tj 0 -104.427 Td -(2558 lapic_eoi\(\);) 91.7388 Tj +(2558 ) 21.8426 Tj 0 -113.9203 Td -(2559 break;) 65.5277 Tj +(2559 // Interrupt descriptor table \(shared by all CPUs\).) 244.6368 Tj 0 -123.4137 Td -(2560 case IRQ_OFFSET + IRQ_KBD:) 144.161 Tj +(2560 struct gatedesc idt[256];) 131.0554 Tj 0 -132.9071 Td -(2561 kbd_intr\(\);) 87.3703 Tj +(2561 extern uint vectors[]; // in vectors.S: array of 256 entr\ +y pointers) 318.9016 Tj 0 -142.4004 Td -(2562 lapic_eoi\(\);) 91.7388 Tj +(2562 struct spinlock tickslock;) 135.4239 Tj 0 -151.8938 Td -(2563 break;) 65.5277 Tj +(2563 int ticks;) 65.5277 Tj 0 -161.3871 Td -(2564 case IRQ_OFFSET + IRQ_SPURIOUS:) 166.0035 Tj +(2564 ) 21.8426 Tj 0 -170.8805 Td -(2565 cprintf\("cpu%d: spurious interrupt at %x:%x\\n",) 244.6368 Tj +(2565 void) 39.3166 Tj 0 -180.3739 Td -(2566 cpu\(\), tf->cs, tf->eip\);) 179.1091 Tj +(2566 tvinit\(void\)) 74.2647 Tj 0 -189.8672 Td -(2567 lapic_eoi\(\);) 91.7388 Tj +(2567 {) 26.2111 Tj 0 -199.3606 Td -(2568 break;) 65.5277 Tj +(2568 int i;) 56.7907 Tj 0 -208.8539 Td (2569 ) 21.8426 Tj 0 -218.3473 Td -(2570 default:) 65.5277 Tj +(2570 for\(i = 0; i < 256; i++\)) 135.4239 Tj 0 -227.8407 Td -(2571 if\(cp == 0 || \(tf->cs&3\) == 0\){) 174.7406 Tj +(2571 SETGATE\(idt[i], 0, SEG_KCODE<<3, vectors[i], 0\);) 249.0053 Tj 0 -237.334 Td -(2572 // In kernel, it must be our mistake.) 209.6887 Tj +(2572 SETGATE\(idt[T_SYSCALL], 1, SEG_KCODE<<3, vectors[T_SYSC\ +ALL], DPL_USER\);) 340.7441 Tj 0 -246.8274 Td -(2573 cprintf\("unexpected trap %d from cpu %d eip %x\\n",) 266.4794 Tj +(2573 ) 21.8426 Tj 0 -256.3207 Td -(2574 tf->trapno, cpu\(\), tf->eip\);) 205.3202 Tj +(2574 initlock\(&tickslock, "time"\);) 157.2665 Tj 0 -265.8141 Td -(2575 panic\("trap"\);) 109.2129 Tj +(2575 }) 26.2111 Tj 0 -275.3075 Td -(2576 }) 43.6851 Tj +(2576 ) 21.8426 Tj 0 -284.8008 Td -(2577 // In user space, assume process misbehaved.) 231.5313 Tj +(2577 void) 39.3166 Tj 0 -294.2942 Td -(2578 cprintf\("pid %d %s: trap %d err %d on cpu %d eip %x -\ -- kill proc\\n",) 336.3756 Tj +(2578 idtinit\(void\)) 78.6333 Tj 0 -303.7875 Td -(2579 cp->pid, cp->name, tf->trapno, tf->err, cpu\(\)\ -, tf->eip\);) 318.9016 Tj +(2579 {) 26.2111 Tj 0 -313.2809 Td -(2580 cp->killed = 1;) 104.8443 Tj +(2580 lidt\(idt, sizeof\(idt\)\);) 131.0554 Tj 0 -322.7743 Td -(2581 }) 34.9481 Tj +(2581 }) 26.2111 Tj 0 -332.2676 Td (2582 ) 21.8426 Tj 0 -341.761 Td -(2583 // Force process exit if it has been killed and is in us\ -er space.) 314.533 Tj +(2583 ) 21.8426 Tj 0 -351.2543 Td -(2584 // \(If it is still executing in the kernel, let it keep\ - running) 305.796 Tj +(2584 ) 21.8426 Tj 0 -360.7477 Td -(2585 // until it gets to the regular system call return.\)) 257.7424 Tj +(2585 ) 21.8426 Tj 0 -370.2411 Td -(2586 if\(cp && cp->killed && \(tf->cs&3\) == DPL_USER\)) 231.5313 Tj +(2586 ) 21.8426 Tj 0 -379.7344 Td -(2587 exit\(\);) 69.8962 Tj +(2587 ) 21.8426 Tj 0 -389.2278 Td (2588 ) 21.8426 Tj 0 -398.7211 Td -(2589 // Force process to give up CPU on clock tick.) 231.5313 Tj +(2589 ) 21.8426 Tj 0 -408.2145 Td -(2590 // If interrupts were on while locks held, would need to\ - check nlock.) 332.0071 Tj +(2590 ) 21.8426 Tj 0 -417.7079 Td -(2591 if\(cp && cp->state == RUNNING && tf->trapno == IRQ_OFFS\ -ET+IRQ_TIMER\)) 327.6386 Tj +(2591 ) 21.8426 Tj 0 -427.2012 Td -(2592 yield\(\);) 74.2647 Tj +(2592 ) 21.8426 Tj 0 -436.6946 Td -(2593 }) 26.2111 Tj +(2593 ) 21.8426 Tj 0 -446.1879 Td (2594 ) 21.8426 Tj 0 -455.6813 Td @@ -10721,6 +10800,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -10738,107 +10819,107 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/syscall.h Page 1) 174.7406 Tj +(Aug 8 01:04 2009 xv6/trap.c Page 2) 161.635 Tj 0 -28.4801 Td -(2600 // System call numbers) 117.9499 Tj +(2600 void) 39.3166 Tj 0 -37.9735 Td -(2601 #define SYS_fork 1) 113.5814 Tj +(2601 trap\(struct trapframe *tf\)) 135.4239 Tj 0 -47.4668 Td -(2602 #define SYS_exit 2) 113.5814 Tj +(2602 {) 26.2111 Tj 0 -56.9602 Td -(2603 #define SYS_wait 3) 113.5814 Tj +(2603 if\(tf->trapno == T_SYSCALL\){) 152.898 Tj 0 -66.4535 Td -(2604 #define SYS_pipe 4) 113.5814 Tj +(2604 if\(cp->killed\)) 100.4758 Tj 0 -75.9469 Td -(2605 #define SYS_write 5) 113.5814 Tj +(2605 exit\(\);) 78.6333 Tj 0 -85.4403 Td -(2606 #define SYS_read 6) 113.5814 Tj +(2606 cp->tf = tf;) 91.7388 Tj 0 -94.9336 Td -(2607 #define SYS_close 7) 113.5814 Tj +(2607 syscall\(\);) 83.0018 Tj 0 -104.427 Td -(2608 #define SYS_kill 8) 113.5814 Tj +(2608 if\(cp->killed\)) 100.4758 Tj 0 -113.9203 Td -(2609 #define SYS_exec 9) 113.5814 Tj +(2609 exit\(\);) 78.6333 Tj 0 -123.4137 Td -(2610 #define SYS_open 10) 113.5814 Tj +(2610 return;) 69.8962 Tj 0 -132.9071 Td -(2611 #define SYS_mknod 11) 113.5814 Tj +(2611 }) 34.9481 Tj 0 -142.4004 Td -(2612 #define SYS_unlink 12) 113.5814 Tj +(2612 ) 21.8426 Tj 0 -151.8938 Td -(2613 #define SYS_fstat 13) 113.5814 Tj +(2613 switch\(tf->trapno\){) 113.5814 Tj 0 -161.3871 Td -(2614 #define SYS_link 14) 113.5814 Tj +(2614 case T_IRQ0 + IRQ_TIMER:) 135.4239 Tj 0 -170.8805 Td -(2615 #define SYS_mkdir 15) 113.5814 Tj +(2615 if\(cpu\(\) == 0\){) 104.8443 Tj 0 -180.3739 Td -(2616 #define SYS_chdir 16) 113.5814 Tj +(2616 acquire\(&tickslock\);) 135.4239 Tj 0 -189.8672 Td -(2617 #define SYS_dup 17) 113.5814 Tj +(2617 ticks++;) 83.0018 Tj 0 -199.3606 Td -(2618 #define SYS_getpid 18) 113.5814 Tj +(2618 wakeup\(&ticks\);) 113.5814 Tj 0 -208.8539 Td -(2619 #define SYS_sbrk 19) 113.5814 Tj +(2619 release\(&tickslock\);) 135.4239 Tj 0 -218.3473 Td -(2620 #define SYS_sleep 20) 113.5814 Tj +(2620 }) 43.6851 Tj 0 -227.8407 Td -(2621 ) 21.8426 Tj +(2621 lapiceoi\(\);) 87.3703 Tj 0 -237.334 Td -(2622 ) 21.8426 Tj +(2622 break;) 65.5277 Tj 0 -246.8274 Td -(2623 ) 21.8426 Tj +(2623 case T_IRQ0 + IRQ_IDE:) 126.6869 Tj 0 -256.3207 Td -(2624 ) 21.8426 Tj +(2624 ideintr\(\);) 83.0018 Tj 0 -265.8141 Td -(2625 ) 21.8426 Tj +(2625 lapiceoi\(\);) 87.3703 Tj 0 -275.3075 Td -(2626 ) 21.8426 Tj +(2626 break;) 65.5277 Tj 0 -284.8008 Td -(2627 ) 21.8426 Tj +(2627 case T_IRQ0 + IRQ_KBD:) 126.6869 Tj 0 -294.2942 Td -(2628 ) 21.8426 Tj +(2628 kbdintr\(\);) 83.0018 Tj 0 -303.7875 Td -(2629 ) 21.8426 Tj +(2629 lapiceoi\(\);) 87.3703 Tj 0 -313.2809 Td -(2630 ) 21.8426 Tj +(2630 break;) 65.5277 Tj 0 -322.7743 Td -(2631 ) 21.8426 Tj +(2631 case T_IRQ0 + IRQ_COM1:) 131.0554 Tj 0 -332.2676 Td -(2632 ) 21.8426 Tj +(2632 uartintr\(\);) 87.3703 Tj 0 -341.761 Td -(2633 ) 21.8426 Tj +(2633 lapiceoi\(\);) 87.3703 Tj 0 -351.2543 Td -(2634 ) 21.8426 Tj +(2634 break;) 65.5277 Tj 0 -360.7477 Td -(2635 ) 21.8426 Tj +(2635 case T_IRQ0 + 7:) 100.4758 Tj 0 -370.2411 Td -(2636 ) 21.8426 Tj +(2636 case T_IRQ0 + IRQ_SPURIOUS:) 148.5295 Tj 0 -379.7344 Td -(2637 ) 21.8426 Tj +(2637 cprintf\("cpu%d: spurious interrupt at %x:%x\\n",) 244.6368 Tj 0 -389.2278 Td -(2638 ) 21.8426 Tj +(2638 cpu\(\), tf->cs, tf->eip\);) 179.1091 Tj 0 -398.7211 Td -(2639 ) 21.8426 Tj +(2639 lapiceoi\(\);) 87.3703 Tj 0 -408.2145 Td -(2640 ) 21.8426 Tj +(2640 break;) 65.5277 Tj 0 -417.7079 Td (2641 ) 21.8426 Tj 0 -427.2012 Td -(2642 ) 21.8426 Tj +(2642 default:) 65.5277 Tj 0 -436.6946 Td -(2643 ) 21.8426 Tj +(2643 if\(cp == 0 || \(tf->cs&3\) == 0\){) 174.7406 Tj 0 -446.1879 Td -(2644 ) 21.8426 Tj +(2644 // In kernel, it must be our mistake.) 209.6887 Tj 0 -455.6813 Td -(2645 ) 21.8426 Tj +(2645 cprintf\("unexpected trap %d from cpu %d eip %x\\n",) 266.4794 Tj 0 -465.1747 Td -(2646 ) 21.8426 Tj +(2646 tf->trapno, cpu\(\), tf->eip\);) 205.3202 Tj 0 -474.668 Td -(2647 ) 21.8426 Tj +(2647 panic\("trap"\);) 109.2129 Tj 0 -484.1614 Td -(2648 ) 21.8426 Tj +(2648 }) 43.6851 Tj 0 -493.6547 Td -(2649 ) 21.8426 Tj +(2649 // In user space, assume process misbehaved.) 231.5313 Tj 0 -522.1348 Td (Sheet 26) 34.9481 Tj Q @@ -10857,106 +10938,109 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/syscall.c Page 1) 174.7406 Tj +(Aug 8 01:04 2009 xv6/trap.c Page 3) 161.635 Tj 0 -28.4801 Td -(2650 #include "types.h") 100.4758 Tj +(2650 cprintf\("pid %d %s: trap %d err %d on cpu %d eip %x -\ +- kill proc\\n",) 336.3756 Tj 0 -37.9735 Td -(2651 #include "defs.h") 96.1073 Tj +(2651 cp->pid, cp->name, tf->trapno, tf->err, cpu\(\)\ +, tf->eip\);) 318.9016 Tj 0 -47.4668 Td -(2652 #include "param.h") 100.4758 Tj +(2652 cp->killed = 1;) 104.8443 Tj 0 -56.9602 Td -(2653 #include "mmu.h") 91.7388 Tj +(2653 }) 34.9481 Tj 0 -66.4535 Td -(2654 #include "proc.h") 96.1073 Tj +(2654 ) 21.8426 Tj 0 -75.9469 Td -(2655 #include "x86.h") 91.7388 Tj +(2655 // Force process exit if it has been killed and is in us\ +er space.) 314.533 Tj 0 -85.4403 Td -(2656 #include "syscall.h") 109.2129 Tj +(2656 // \(If it is still executing in the kernel, let it keep\ + running) 305.796 Tj 0 -94.9336 Td -(2657 ) 21.8426 Tj +(2657 // until it gets to the regular system call return.\)) 257.7424 Tj 0 -104.427 Td -(2658 // User code makes a system call with INT T_SYSCALL.) 249.0053 Tj +(2658 if\(cp && cp->killed && \(tf->cs&3\) == DPL_USER\)) 231.5313 Tj 0 -113.9203 Td -(2659 // System call number in %eax.) 152.898 Tj +(2659 exit\(\);) 69.8962 Tj 0 -123.4137 Td -(2660 // Arguments on the stack, from the user call to the C) 257.7424 Tj +(2660 ) 21.8426 Tj 0 -132.9071 Td -(2661 // library system call function. The saved user %esp point\ -s) 279.5849 Tj +(2661 // Force process to give up CPU on clock tick.) 231.5313 Tj 0 -142.4004 Td -(2662 // to a saved program counter, and then the first argument\ -.) 279.5849 Tj +(2662 // If interrupts were on while locks held, would need to\ + check nlock.) 332.0071 Tj 0 -151.8938 Td -(2663 ) 21.8426 Tj +(2663 if\(cp && cp->state == RUNNING && tf->trapno == T_IRQ0+I\ +RQ_TIMER\)) 310.1645 Tj 0 -161.3871 Td -(2664 // Fetch the int at addr from process p.) 196.5831 Tj +(2664 yield\(\);) 74.2647 Tj 0 -170.8805 Td -(2665 int) 34.9481 Tj +(2665 ) 21.8426 Tj 0 -180.3739 Td -(2666 fetchint\(struct proc *p, uint addr, int *ip\)) 214.0572 Tj +(2666 // Check if the process has been killed since we yielded) 275.2164 Tj 0 -189.8672 Td -(2667 {) 26.2111 Tj +(2667 if\(cp && cp->killed && \(tf->cs&3\) == DPL_USER\)) 231.5313 Tj 0 -199.3606 Td -(2668 if\(addr >= p->sz || addr+4 > p->sz\)) 183.4776 Tj +(2668 exit\(\);) 69.8962 Tj 0 -208.8539 Td -(2669 return -1;) 83.0018 Tj +(2669 }) 26.2111 Tj 0 -218.3473 Td -(2670 *ip = *\(int*\)\(p->mem + addr\);) 157.2665 Tj +(2670 ) 21.8426 Tj 0 -227.8407 Td -(2671 return 0;) 69.8962 Tj +(2671 ) 21.8426 Tj 0 -237.334 Td -(2672 }) 26.2111 Tj +(2672 ) 21.8426 Tj 0 -246.8274 Td (2673 ) 21.8426 Tj 0 -256.3207 Td -(2674 // Fetch the nul-terminated string at addr from process p.) 275.2164 Tj +(2674 ) 21.8426 Tj 0 -265.8141 Td -(2675 // Doesn't actually copy the string - just sets *pp to poi\ -nt at it.) 314.533 Tj +(2675 ) 21.8426 Tj 0 -275.3075 Td -(2676 // Returns length of string, not including nul.) 227.1628 Tj +(2676 ) 21.8426 Tj 0 -284.8008 Td -(2677 int) 34.9481 Tj +(2677 ) 21.8426 Tj 0 -294.2942 Td -(2678 fetchstr\(struct proc *p, uint addr, char **pp\)) 222.7942 Tj +(2678 ) 21.8426 Tj 0 -303.7875 Td -(2679 {) 26.2111 Tj +(2679 ) 21.8426 Tj 0 -313.2809 Td -(2680 char *s, *ep;) 87.3703 Tj +(2680 ) 21.8426 Tj 0 -322.7743 Td (2681 ) 21.8426 Tj 0 -332.2676 Td -(2682 if\(addr >= p->sz\)) 104.8443 Tj +(2682 ) 21.8426 Tj 0 -341.761 Td -(2683 return -1;) 83.0018 Tj +(2683 ) 21.8426 Tj 0 -351.2543 Td -(2684 *pp = p->mem + addr;) 117.9499 Tj +(2684 ) 21.8426 Tj 0 -360.7477 Td -(2685 ep = p->mem + p->sz;) 117.9499 Tj +(2685 ) 21.8426 Tj 0 -370.2411 Td -(2686 for\(s = *pp; s < ep; s++\)) 139.7925 Tj +(2686 ) 21.8426 Tj 0 -379.7344 Td -(2687 if\(*s == 0\)) 87.3703 Tj +(2687 ) 21.8426 Tj 0 -389.2278 Td -(2688 return s - *pp;) 113.5814 Tj +(2688 ) 21.8426 Tj 0 -398.7211 Td -(2689 return -1;) 74.2647 Tj +(2689 ) 21.8426 Tj 0 -408.2145 Td -(2690 }) 26.2111 Tj +(2690 ) 21.8426 Tj 0 -417.7079 Td (2691 ) 21.8426 Tj 0 -427.2012 Td -(2692 // Fetch the nth 32-bit system call argument.) 218.4257 Tj +(2692 ) 21.8426 Tj 0 -436.6946 Td -(2693 int) 34.9481 Tj +(2693 ) 21.8426 Tj 0 -446.1879 Td -(2694 argint\(int n, int *ip\)) 117.9499 Tj +(2694 ) 21.8426 Tj 0 -455.6813 Td -(2695 {) 26.2111 Tj +(2695 ) 21.8426 Tj 0 -465.1747 Td -(2696 return fetchint\(cp, cp->tf->esp + 4 + 4*n, ip\);) 235.8998 Tj +(2696 ) 21.8426 Tj 0 -474.668 Td -(2697 }) 26.2111 Tj +(2697 ) 21.8426 Tj 0 -484.1614 Td (2698 ) 21.8426 Tj 0 -493.6547 Td @@ -10991,6 +11075,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -11008,110 +11094,105 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/syscall.c Page 2) 174.7406 Tj +(Aug 8 01:04 2009 xv6/syscall.h Page 1) 174.7406 Tj 0 -28.4801 Td -(2700 // Fetch the nth word-sized system call argument as a poin\ -ter) 288.322 Tj +(2700 // System call numbers) 117.9499 Tj 0 -37.9735 Td -(2701 // to a block of memory of size n bytes. Check that the p\ -ointer) 301.4275 Tj +(2701 #define SYS_fork 1) 113.5814 Tj 0 -47.4668 Td -(2702 // lies within the process address space.) 200.9517 Tj +(2702 #define SYS_exit 2) 113.5814 Tj 0 -56.9602 Td -(2703 int) 34.9481 Tj +(2703 #define SYS_wait 3) 113.5814 Tj 0 -66.4535 Td -(2704 argptr\(int n, char **pp, int size\)) 170.3721 Tj +(2704 #define SYS_pipe 4) 113.5814 Tj 0 -75.9469 Td -(2705 {) 26.2111 Tj +(2705 #define SYS_write 5) 113.5814 Tj 0 -85.4403 Td -(2706 int i;) 56.7907 Tj +(2706 #define SYS_read 6) 113.5814 Tj 0 -94.9336 Td -(2707 ) 21.8426 Tj +(2707 #define SYS_close 7) 113.5814 Tj 0 -104.427 Td -(2708 if\(argint\(n, &i\) < 0\)) 122.3184 Tj +(2708 #define SYS_kill 8) 113.5814 Tj 0 -113.9203 Td -(2709 return -1;) 83.0018 Tj +(2709 #define SYS_exec 9) 113.5814 Tj 0 -123.4137 Td -(2710 if\(\(uint\)i >= cp->sz || \(uint\)i+size >= cp->sz\)) 235.8998 Tj +(2710 #define SYS_open 10) 113.5814 Tj 0 -132.9071 Td -(2711 return -1;) 83.0018 Tj +(2711 #define SYS_mknod 11) 113.5814 Tj 0 -142.4004 Td -(2712 *pp = cp->mem + i;) 109.2129 Tj +(2712 #define SYS_unlink 12) 113.5814 Tj 0 -151.8938 Td -(2713 return 0;) 69.8962 Tj +(2713 #define SYS_fstat 13) 113.5814 Tj 0 -161.3871 Td -(2714 }) 26.2111 Tj +(2714 #define SYS_link 14) 113.5814 Tj 0 -170.8805 Td -(2715 ) 21.8426 Tj +(2715 #define SYS_mkdir 15) 113.5814 Tj 0 -180.3739 Td -(2716 // Fetch the nth word-sized system call argument as a stri\ -ng pointer.) 323.2701 Tj +(2716 #define SYS_chdir 16) 113.5814 Tj 0 -189.8672 Td -(2717 // Check that the pointer is valid and the string is nul-t\ -erminated.) 318.9016 Tj +(2717 #define SYS_dup 17) 113.5814 Tj 0 -199.3606 Td -(2718 // \(There is no shared writable memory, so the string can\ -'t change) 310.1645 Tj +(2718 #define SYS_getpid 18) 113.5814 Tj 0 -208.8539 Td -(2719 // between this check and being used by the kernel.\)) 249.0053 Tj +(2719 #define SYS_sbrk 19) 113.5814 Tj 0 -218.3473 Td -(2720 int) 34.9481 Tj +(2720 #define SYS_sleep 20) 113.5814 Tj 0 -227.8407 Td -(2721 argstr\(int n, char **pp\)) 126.6869 Tj +(2721 ) 21.8426 Tj 0 -237.334 Td -(2722 {) 26.2111 Tj +(2722 ) 21.8426 Tj 0 -246.8274 Td -(2723 int addr;) 69.8962 Tj +(2723 ) 21.8426 Tj 0 -256.3207 Td -(2724 if\(argint\(n, &addr\) < 0\)) 135.4239 Tj +(2724 ) 21.8426 Tj 0 -265.8141 Td -(2725 return -1;) 83.0018 Tj +(2725 ) 21.8426 Tj 0 -275.3075 Td -(2726 return fetchstr\(cp, addr, pp\);) 161.635 Tj +(2726 ) 21.8426 Tj 0 -284.8008 Td -(2727 }) 26.2111 Tj +(2727 ) 21.8426 Tj 0 -294.2942 Td (2728 ) 21.8426 Tj 0 -303.7875 Td -(2729 extern int sys_chdir\(void\);) 139.7925 Tj +(2729 ) 21.8426 Tj 0 -313.2809 Td -(2730 extern int sys_close\(void\);) 139.7925 Tj +(2730 ) 21.8426 Tj 0 -322.7743 Td -(2731 extern int sys_dup\(void\);) 131.0554 Tj +(2731 ) 21.8426 Tj 0 -332.2676 Td -(2732 extern int sys_exec\(void\);) 135.4239 Tj +(2732 ) 21.8426 Tj 0 -341.761 Td -(2733 extern int sys_exit\(void\);) 135.4239 Tj +(2733 ) 21.8426 Tj 0 -351.2543 Td -(2734 extern int sys_fork\(void\);) 135.4239 Tj +(2734 ) 21.8426 Tj 0 -360.7477 Td -(2735 extern int sys_fstat\(void\);) 139.7925 Tj +(2735 ) 21.8426 Tj 0 -370.2411 Td -(2736 extern int sys_getpid\(void\);) 144.161 Tj +(2736 ) 21.8426 Tj 0 -379.7344 Td -(2737 extern int sys_kill\(void\);) 135.4239 Tj +(2737 ) 21.8426 Tj 0 -389.2278 Td -(2738 extern int sys_link\(void\);) 135.4239 Tj +(2738 ) 21.8426 Tj 0 -398.7211 Td -(2739 extern int sys_mkdir\(void\);) 139.7925 Tj +(2739 ) 21.8426 Tj 0 -408.2145 Td -(2740 extern int sys_mknod\(void\);) 139.7925 Tj +(2740 ) 21.8426 Tj 0 -417.7079 Td -(2741 extern int sys_open\(void\);) 135.4239 Tj +(2741 ) 21.8426 Tj 0 -427.2012 Td -(2742 extern int sys_pipe\(void\);) 135.4239 Tj +(2742 ) 21.8426 Tj 0 -436.6946 Td -(2743 extern int sys_read\(void\);) 135.4239 Tj +(2743 ) 21.8426 Tj 0 -446.1879 Td -(2744 extern int sys_sbrk\(void\);) 135.4239 Tj +(2744 ) 21.8426 Tj 0 -455.6813 Td -(2745 extern int sys_sleep\(void\);) 139.7925 Tj +(2745 ) 21.8426 Tj 0 -465.1747 Td -(2746 extern int sys_unlink\(void\);) 144.161 Tj +(2746 ) 21.8426 Tj 0 -474.668 Td -(2747 extern int sys_wait\(void\);) 135.4239 Tj +(2747 ) 21.8426 Tj 0 -484.1614 Td -(2748 extern int sys_write\(void\);) 139.7925 Tj +(2748 ) 21.8426 Tj 0 -493.6547 Td (2749 ) 21.8426 Tj 0 -522.1348 Td @@ -11132,104 +11213,106 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/syscall.c Page 3) 174.7406 Tj +(Aug 8 01:04 2009 xv6/syscall.c Page 1) 174.7406 Tj 0 -28.4801 Td -(2750 static int \(*syscalls[]\)\(void\) = {) 170.3721 Tj +(2750 #include "types.h") 100.4758 Tj 0 -37.9735 Td -(2751 [SYS_chdir] sys_chdir,) 126.6869 Tj +(2751 #include "defs.h") 96.1073 Tj 0 -47.4668 Td -(2752 [SYS_close] sys_close,) 126.6869 Tj +(2752 #include "param.h") 100.4758 Tj 0 -56.9602 Td -(2753 [SYS_dup] sys_dup,) 117.9499 Tj +(2753 #include "mmu.h") 91.7388 Tj 0 -66.4535 Td -(2754 [SYS_exec] sys_exec,) 122.3184 Tj +(2754 #include "proc.h") 96.1073 Tj 0 -75.9469 Td -(2755 [SYS_exit] sys_exit,) 122.3184 Tj +(2755 #include "x86.h") 91.7388 Tj 0 -85.4403 Td -(2756 [SYS_fork] sys_fork,) 122.3184 Tj +(2756 #include "syscall.h") 109.2129 Tj 0 -94.9336 Td -(2757 [SYS_fstat] sys_fstat,) 126.6869 Tj +(2757 ) 21.8426 Tj 0 -104.427 Td -(2758 [SYS_getpid] sys_getpid,) 131.0554 Tj +(2758 // User code makes a system call with INT T_SYSCALL.) 249.0053 Tj 0 -113.9203 Td -(2759 [SYS_kill] sys_kill,) 122.3184 Tj +(2759 // System call number in %eax.) 152.898 Tj 0 -123.4137 Td -(2760 [SYS_link] sys_link,) 122.3184 Tj +(2760 // Arguments on the stack, from the user call to the C) 257.7424 Tj 0 -132.9071 Td -(2761 [SYS_mkdir] sys_mkdir,) 126.6869 Tj +(2761 // library system call function. The saved user %esp point\ +s) 279.5849 Tj 0 -142.4004 Td -(2762 [SYS_mknod] sys_mknod,) 126.6869 Tj +(2762 // to a saved program counter, and then the first argument\ +.) 279.5849 Tj 0 -151.8938 Td -(2763 [SYS_open] sys_open,) 122.3184 Tj +(2763 ) 21.8426 Tj 0 -161.3871 Td -(2764 [SYS_pipe] sys_pipe,) 122.3184 Tj +(2764 // Fetch the int at addr from process p.) 196.5831 Tj 0 -170.8805 Td -(2765 [SYS_read] sys_read,) 122.3184 Tj +(2765 int) 34.9481 Tj 0 -180.3739 Td -(2766 [SYS_sbrk] sys_sbrk,) 122.3184 Tj +(2766 fetchint\(struct proc *p, uint addr, int *ip\)) 214.0572 Tj 0 -189.8672 Td -(2767 [SYS_sleep] sys_sleep,) 126.6869 Tj +(2767 {) 26.2111 Tj 0 -199.3606 Td -(2768 [SYS_unlink] sys_unlink,) 131.0554 Tj +(2768 if\(addr >= p->sz || addr+4 > p->sz\)) 183.4776 Tj 0 -208.8539 Td -(2769 [SYS_wait] sys_wait,) 122.3184 Tj +(2769 return -1;) 83.0018 Tj 0 -218.3473 Td -(2770 [SYS_write] sys_write,) 126.6869 Tj +(2770 *ip = *\(int*\)\(p->mem + addr\);) 157.2665 Tj 0 -227.8407 Td -(2771 };) 30.5796 Tj +(2771 return 0;) 69.8962 Tj 0 -237.334 Td -(2772 ) 21.8426 Tj +(2772 }) 26.2111 Tj 0 -246.8274 Td -(2773 void) 39.3166 Tj +(2773 ) 21.8426 Tj 0 -256.3207 Td -(2774 syscall\(void\)) 78.6333 Tj +(2774 // Fetch the nul-terminated string at addr from process p.) 275.2164 Tj 0 -265.8141 Td -(2775 {) 26.2111 Tj +(2775 // Doesn't actually copy the string - just sets *pp to poi\ +nt at it.) 314.533 Tj 0 -275.3075 Td -(2776 int num;) 65.5277 Tj +(2776 // Returns length of string, not including nul.) 227.1628 Tj 0 -284.8008 Td -(2777 ) 21.8426 Tj +(2777 int) 34.9481 Tj 0 -294.2942 Td -(2778 num = cp->tf->eax;) 109.2129 Tj +(2778 fetchstr\(struct proc *p, uint addr, char **pp\)) 222.7942 Tj 0 -303.7875 Td -(2779 if\(num >= 0 && num < NELEM\(syscalls\) && syscalls[num]\ -\)) 266.4794 Tj +(2779 {) 26.2111 Tj 0 -313.2809 Td -(2780 cp->tf->eax = syscalls[num]\(\);) 170.3721 Tj +(2780 char *s, *ep;) 87.3703 Tj 0 -322.7743 Td -(2781 else {) 56.7907 Tj +(2781 ) 21.8426 Tj 0 -332.2676 Td -(2782 cprintf\("%d %s: unknown sys call %d\\n",) 209.6887 Tj +(2782 if\(addr >= p->sz\)) 104.8443 Tj 0 -341.761 Td -(2783 cp->pid, cp->name, num\);) 179.1091 Tj +(2783 return -1;) 83.0018 Tj 0 -351.2543 Td -(2784 cp->tf->eax = -1;) 113.5814 Tj +(2784 *pp = p->mem + addr;) 117.9499 Tj 0 -360.7477 Td -(2785 }) 34.9481 Tj +(2785 ep = p->mem + p->sz;) 117.9499 Tj 0 -370.2411 Td -(2786 }) 26.2111 Tj +(2786 for\(s = *pp; s < ep; s++\)) 139.7925 Tj 0 -379.7344 Td -(2787 ) 21.8426 Tj +(2787 if\(*s == 0\)) 87.3703 Tj 0 -389.2278 Td -(2788 ) 21.8426 Tj +(2788 return s - *pp;) 113.5814 Tj 0 -398.7211 Td -(2789 ) 21.8426 Tj +(2789 return -1;) 74.2647 Tj 0 -408.2145 Td -(2790 ) 21.8426 Tj +(2790 }) 26.2111 Tj 0 -417.7079 Td (2791 ) 21.8426 Tj 0 -427.2012 Td -(2792 ) 21.8426 Tj +(2792 // Fetch the nth 32-bit system call argument.) 218.4257 Tj 0 -436.6946 Td -(2793 ) 21.8426 Tj +(2793 int) 34.9481 Tj 0 -446.1879 Td -(2794 ) 21.8426 Tj +(2794 argint\(int n, int *ip\)) 117.9499 Tj 0 -455.6813 Td -(2795 ) 21.8426 Tj +(2795 {) 26.2111 Tj 0 -465.1747 Td -(2796 ) 21.8426 Tj +(2796 return fetchint\(cp, cp->tf->esp + 4 + 4*n, ip\);) 235.8998 Tj 0 -474.668 Td -(2797 ) 21.8426 Tj +(2797 }) 26.2111 Tj 0 -484.1614 Td (2798 ) 21.8426 Tj 0 -493.6547 Td @@ -11264,6 +11347,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -11281,105 +11366,110 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysproc.c Page 1) 174.7406 Tj +(Aug 8 01:04 2009 xv6/syscall.c Page 2) 174.7406 Tj 0 -28.4801 Td -(2800 #include "types.h") 100.4758 Tj +(2800 // Fetch the nth word-sized system call argument as a poin\ +ter) 288.322 Tj 0 -37.9735 Td -(2801 #include "defs.h") 96.1073 Tj +(2801 // to a block of memory of size n bytes. Check that the p\ +ointer) 301.4275 Tj 0 -47.4668 Td -(2802 #include "param.h") 100.4758 Tj +(2802 // lies within the process address space.) 200.9517 Tj 0 -56.9602 Td -(2803 #include "mmu.h") 91.7388 Tj +(2803 int) 34.9481 Tj 0 -66.4535 Td -(2804 #include "proc.h") 96.1073 Tj +(2804 argptr\(int n, char **pp, int size\)) 170.3721 Tj 0 -75.9469 Td -(2805 ) 21.8426 Tj +(2805 {) 26.2111 Tj 0 -85.4403 Td -(2806 int) 34.9481 Tj +(2806 int i;) 56.7907 Tj 0 -94.9336 Td -(2807 sys_fork\(void\)) 83.0018 Tj +(2807 ) 21.8426 Tj 0 -104.427 Td -(2808 {) 26.2111 Tj +(2808 if\(argint\(n, &i\) < 0\)) 122.3184 Tj 0 -113.9203 Td -(2809 int pid;) 65.5277 Tj +(2809 return -1;) 83.0018 Tj 0 -123.4137 Td -(2810 struct proc *np;) 100.4758 Tj +(2810 if\(\(uint\)i >= cp->sz || \(uint\)i+size >= cp->sz\)) 235.8998 Tj 0 -132.9071 Td -(2811 ) 21.8426 Tj +(2811 return -1;) 83.0018 Tj 0 -142.4004 Td -(2812 if\(\(np = copyproc\(cp\)\) == 0\)) 152.898 Tj +(2812 *pp = cp->mem + i;) 109.2129 Tj 0 -151.8938 Td -(2813 return -1;) 83.0018 Tj +(2813 return 0;) 69.8962 Tj 0 -161.3871 Td -(2814 pid = np->pid;) 91.7388 Tj +(2814 }) 26.2111 Tj 0 -170.8805 Td -(2815 np->state = RUNNABLE;) 122.3184 Tj +(2815 ) 21.8426 Tj 0 -180.3739 Td -(2816 return pid;) 78.6333 Tj +(2816 // Fetch the nth word-sized system call argument as a stri\ +ng pointer.) 323.2701 Tj 0 -189.8672 Td -(2817 }) 26.2111 Tj +(2817 // Check that the pointer is valid and the string is nul-t\ +erminated.) 318.9016 Tj 0 -199.3606 Td -(2818 ) 21.8426 Tj +(2818 // \(There is no shared writable memory, so the string can\ +'t change) 310.1645 Tj 0 -208.8539 Td -(2819 int) 34.9481 Tj +(2819 // between this check and being used by the kernel.\)) 249.0053 Tj 0 -218.3473 Td -(2820 sys_exit\(void\)) 83.0018 Tj +(2820 int) 34.9481 Tj 0 -227.8407 Td -(2821 {) 26.2111 Tj +(2821 argstr\(int n, char **pp\)) 126.6869 Tj 0 -237.334 Td -(2822 exit\(\);) 61.1592 Tj +(2822 {) 26.2111 Tj 0 -246.8274 Td -(2823 return 0; // not reached) 139.7925 Tj +(2823 int addr;) 69.8962 Tj 0 -256.3207 Td -(2824 }) 26.2111 Tj +(2824 if\(argint\(n, &addr\) < 0\)) 135.4239 Tj 0 -265.8141 Td -(2825 ) 21.8426 Tj +(2825 return -1;) 83.0018 Tj 0 -275.3075 Td -(2826 int) 34.9481 Tj +(2826 return fetchstr\(cp, addr, pp\);) 161.635 Tj 0 -284.8008 Td -(2827 sys_wait\(void\)) 83.0018 Tj +(2827 }) 26.2111 Tj 0 -294.2942 Td -(2828 {) 26.2111 Tj +(2828 ) 21.8426 Tj 0 -303.7875 Td -(2829 return wait\(\);) 91.7388 Tj +(2829 extern int sys_chdir\(void\);) 139.7925 Tj 0 -313.2809 Td -(2830 }) 26.2111 Tj +(2830 extern int sys_close\(void\);) 139.7925 Tj 0 -322.7743 Td -(2831 ) 21.8426 Tj +(2831 extern int sys_dup\(void\);) 131.0554 Tj 0 -332.2676 Td -(2832 int) 34.9481 Tj +(2832 extern int sys_exec\(void\);) 135.4239 Tj 0 -341.761 Td -(2833 sys_kill\(void\)) 83.0018 Tj +(2833 extern int sys_exit\(void\);) 135.4239 Tj 0 -351.2543 Td -(2834 {) 26.2111 Tj +(2834 extern int sys_fork\(void\);) 135.4239 Tj 0 -360.7477 Td -(2835 int pid;) 65.5277 Tj +(2835 extern int sys_fstat\(void\);) 139.7925 Tj 0 -370.2411 Td -(2836 ) 21.8426 Tj +(2836 extern int sys_getpid\(void\);) 144.161 Tj 0 -379.7344 Td -(2837 if\(argint\(0, &pid\) < 0\)) 131.0554 Tj +(2837 extern int sys_kill\(void\);) 135.4239 Tj 0 -389.2278 Td -(2838 return -1;) 83.0018 Tj +(2838 extern int sys_link\(void\);) 135.4239 Tj 0 -398.7211 Td -(2839 return kill\(pid\);) 104.8443 Tj +(2839 extern int sys_mkdir\(void\);) 139.7925 Tj 0 -408.2145 Td -(2840 }) 26.2111 Tj +(2840 extern int sys_mknod\(void\);) 139.7925 Tj 0 -417.7079 Td -(2841 ) 21.8426 Tj +(2841 extern int sys_open\(void\);) 135.4239 Tj 0 -427.2012 Td -(2842 int) 34.9481 Tj +(2842 extern int sys_pipe\(void\);) 135.4239 Tj 0 -436.6946 Td -(2843 sys_getpid\(void\)) 91.7388 Tj +(2843 extern int sys_read\(void\);) 135.4239 Tj 0 -446.1879 Td -(2844 {) 26.2111 Tj +(2844 extern int sys_sbrk\(void\);) 135.4239 Tj 0 -455.6813 Td -(2845 return cp->pid;) 96.1073 Tj +(2845 extern int sys_sleep\(void\);) 139.7925 Tj 0 -465.1747 Td -(2846 }) 26.2111 Tj +(2846 extern int sys_unlink\(void\);) 144.161 Tj 0 -474.668 Td -(2847 ) 21.8426 Tj +(2847 extern int sys_wait\(void\);) 135.4239 Tj 0 -484.1614 Td -(2848 ) 21.8426 Tj +(2848 extern int sys_write\(void\);) 139.7925 Tj 0 -493.6547 Td (2849 ) 21.8426 Tj 0 -522.1348 Td @@ -11400,81 +11490,82 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysproc.c Page 2) 174.7406 Tj +(Aug 8 01:04 2009 xv6/syscall.c Page 3) 174.7406 Tj 0 -28.4801 Td -(2850 int) 34.9481 Tj +(2850 static int \(*syscalls[]\)\(void\) = {) 170.3721 Tj 0 -37.9735 Td -(2851 sys_sbrk\(void\)) 83.0018 Tj +(2851 [SYS_chdir] sys_chdir,) 126.6869 Tj 0 -47.4668 Td -(2852 {) 26.2111 Tj +(2852 [SYS_close] sys_close,) 126.6869 Tj 0 -56.9602 Td -(2853 int addr;) 69.8962 Tj +(2853 [SYS_dup] sys_dup,) 117.9499 Tj 0 -66.4535 Td -(2854 int n;) 56.7907 Tj +(2854 [SYS_exec] sys_exec,) 122.3184 Tj 0 -75.9469 Td -(2855 ) 21.8426 Tj +(2855 [SYS_exit] sys_exit,) 122.3184 Tj 0 -85.4403 Td -(2856 if\(argint\(0, &n\) < 0\)) 122.3184 Tj +(2856 [SYS_fork] sys_fork,) 122.3184 Tj 0 -94.9336 Td -(2857 return -1;) 83.0018 Tj +(2857 [SYS_fstat] sys_fstat,) 126.6869 Tj 0 -104.427 Td -(2858 if\(\(addr = growproc\(n\)\) < 0\)) 152.898 Tj +(2858 [SYS_getpid] sys_getpid,) 131.0554 Tj 0 -113.9203 Td -(2859 return -1;) 83.0018 Tj +(2859 [SYS_kill] sys_kill,) 122.3184 Tj 0 -123.4137 Td -(2860 return addr;) 83.0018 Tj +(2860 [SYS_link] sys_link,) 122.3184 Tj 0 -132.9071 Td -(2861 }) 26.2111 Tj +(2861 [SYS_mkdir] sys_mkdir,) 126.6869 Tj 0 -142.4004 Td -(2862 ) 21.8426 Tj +(2862 [SYS_mknod] sys_mknod,) 126.6869 Tj 0 -151.8938 Td -(2863 int) 34.9481 Tj +(2863 [SYS_open] sys_open,) 122.3184 Tj 0 -161.3871 Td -(2864 sys_sleep\(void\)) 87.3703 Tj +(2864 [SYS_pipe] sys_pipe,) 122.3184 Tj 0 -170.8805 Td -(2865 {) 26.2111 Tj +(2865 [SYS_read] sys_read,) 122.3184 Tj 0 -180.3739 Td -(2866 int n, ticks0;) 91.7388 Tj +(2866 [SYS_sbrk] sys_sbrk,) 122.3184 Tj 0 -189.8672 Td -(2867 ) 21.8426 Tj +(2867 [SYS_sleep] sys_sleep,) 126.6869 Tj 0 -199.3606 Td -(2868 if\(argint\(0, &n\) < 0\)) 122.3184 Tj +(2868 [SYS_unlink] sys_unlink,) 131.0554 Tj 0 -208.8539 Td -(2869 return -1;) 83.0018 Tj +(2869 [SYS_wait] sys_wait,) 122.3184 Tj 0 -218.3473 Td -(2870 acquire\(&tickslock\);) 117.9499 Tj +(2870 [SYS_write] sys_write,) 126.6869 Tj 0 -227.8407 Td -(2871 ticks0 = ticks;) 96.1073 Tj +(2871 };) 30.5796 Tj 0 -237.334 Td -(2872 while\(ticks - ticks0 < n\){) 144.161 Tj +(2872 ) 21.8426 Tj 0 -246.8274 Td -(2873 if\(cp->killed\){) 104.8443 Tj +(2873 void) 39.3166 Tj 0 -256.3207 Td -(2874 release\(&tickslock\);) 135.4239 Tj +(2874 syscall\(void\)) 78.6333 Tj 0 -265.8141 Td -(2875 return -1;) 91.7388 Tj +(2875 {) 26.2111 Tj 0 -275.3075 Td -(2876 }) 43.6851 Tj +(2876 int num;) 65.5277 Tj 0 -284.8008 Td -(2877 sleep\(&ticks, &tickslock\);) 152.898 Tj +(2877 ) 21.8426 Tj 0 -294.2942 Td -(2878 }) 34.9481 Tj +(2878 num = cp->tf->eax;) 109.2129 Tj 0 -303.7875 Td -(2879 release\(&tickslock\);) 117.9499 Tj +(2879 if\(num >= 0 && num < NELEM\(syscalls\) && syscalls[num]\ +\)) 266.4794 Tj 0 -313.2809 Td -(2880 return 0;) 69.8962 Tj +(2880 cp->tf->eax = syscalls[num]\(\);) 170.3721 Tj 0 -322.7743 Td -(2881 }) 26.2111 Tj +(2881 else {) 56.7907 Tj 0 -332.2676 Td -(2882 ) 21.8426 Tj +(2882 cprintf\("%d %s: unknown sys call %d\\n",) 209.6887 Tj 0 -341.761 Td -(2883 ) 21.8426 Tj +(2883 cp->pid, cp->name, num\);) 179.1091 Tj 0 -351.2543 Td -(2884 ) 21.8426 Tj +(2884 cp->tf->eax = -1;) 113.5814 Tj 0 -360.7477 Td -(2885 ) 21.8426 Tj +(2885 }) 34.9481 Tj 0 -370.2411 Td -(2886 ) 21.8426 Tj +(2886 }) 26.2111 Tj 0 -379.7344 Td (2887 ) 21.8426 Tj 0 -389.2278 Td @@ -11531,6 +11622,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -11548,89 +11641,89 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/buf.h Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/sysproc.c Page 1) 174.7406 Tj 0 -28.4801 Td -(2900 struct buf {) 74.2647 Tj +(2900 #include "types.h") 100.4758 Tj 0 -37.9735 Td -(2901 int flags;) 74.2647 Tj +(2901 #include "x86.h") 91.7388 Tj 0 -47.4668 Td -(2902 uint dev;) 69.8962 Tj +(2902 #include "defs.h") 96.1073 Tj 0 -56.9602 Td -(2903 uint sector;) 83.0018 Tj +(2903 #include "param.h") 100.4758 Tj 0 -66.4535 Td -(2904 struct buf *prev; // LRU cache list) 183.4776 Tj +(2904 #include "mmu.h") 91.7388 Tj 0 -75.9469 Td -(2905 struct buf *next;) 104.8443 Tj +(2905 #include "proc.h") 96.1073 Tj 0 -85.4403 Td -(2906 struct buf *qnext; // disk queue) 170.3721 Tj +(2906 ) 21.8426 Tj 0 -94.9336 Td -(2907 uchar data[512];) 100.4758 Tj +(2907 int) 34.9481 Tj 0 -104.427 Td -(2908 };) 30.5796 Tj +(2908 sys_fork\(void\)) 83.0018 Tj 0 -113.9203 Td -(2909 #define B_BUSY 0x1 // buffer is locked by some process) 266.4794 Tj +(2909 {) 26.2111 Tj 0 -123.4137 Td -(2910 #define B_VALID 0x2 // buffer has been read from disk) 257.7424 Tj +(2910 return fork\(\);) 91.7388 Tj 0 -132.9071 Td -(2911 #define B_DIRTY 0x4 // buffer needs to be written to disk) 275.2164 Tj +(2911 }) 26.2111 Tj 0 -142.4004 Td (2912 ) 21.8426 Tj 0 -151.8938 Td -(2913 ) 21.8426 Tj +(2913 int) 34.9481 Tj 0 -161.3871 Td -(2914 ) 21.8426 Tj +(2914 sys_exit\(void\)) 83.0018 Tj 0 -170.8805 Td -(2915 ) 21.8426 Tj +(2915 {) 26.2111 Tj 0 -180.3739 Td -(2916 ) 21.8426 Tj +(2916 exit\(\);) 61.1592 Tj 0 -189.8672 Td -(2917 ) 21.8426 Tj +(2917 return 0; // not reached) 139.7925 Tj 0 -199.3606 Td -(2918 ) 21.8426 Tj +(2918 }) 26.2111 Tj 0 -208.8539 Td (2919 ) 21.8426 Tj 0 -218.3473 Td -(2920 ) 21.8426 Tj +(2920 int) 34.9481 Tj 0 -227.8407 Td -(2921 ) 21.8426 Tj +(2921 sys_wait\(void\)) 83.0018 Tj 0 -237.334 Td -(2922 ) 21.8426 Tj +(2922 {) 26.2111 Tj 0 -246.8274 Td -(2923 ) 21.8426 Tj +(2923 return wait\(\);) 91.7388 Tj 0 -256.3207 Td -(2924 ) 21.8426 Tj +(2924 }) 26.2111 Tj 0 -265.8141 Td (2925 ) 21.8426 Tj 0 -275.3075 Td -(2926 ) 21.8426 Tj +(2926 int) 34.9481 Tj 0 -284.8008 Td -(2927 ) 21.8426 Tj +(2927 sys_kill\(void\)) 83.0018 Tj 0 -294.2942 Td -(2928 ) 21.8426 Tj +(2928 {) 26.2111 Tj 0 -303.7875 Td -(2929 ) 21.8426 Tj +(2929 int pid;) 65.5277 Tj 0 -313.2809 Td (2930 ) 21.8426 Tj 0 -322.7743 Td -(2931 ) 21.8426 Tj +(2931 if\(argint\(0, &pid\) < 0\)) 131.0554 Tj 0 -332.2676 Td -(2932 ) 21.8426 Tj +(2932 return -1;) 83.0018 Tj 0 -341.761 Td -(2933 ) 21.8426 Tj +(2933 return kill\(pid\);) 104.8443 Tj 0 -351.2543 Td -(2934 ) 21.8426 Tj +(2934 }) 26.2111 Tj 0 -360.7477 Td (2935 ) 21.8426 Tj 0 -370.2411 Td -(2936 ) 21.8426 Tj +(2936 int) 34.9481 Tj 0 -379.7344 Td -(2937 ) 21.8426 Tj +(2937 sys_getpid\(void\)) 91.7388 Tj 0 -389.2278 Td -(2938 ) 21.8426 Tj +(2938 {) 26.2111 Tj 0 -398.7211 Td -(2939 ) 21.8426 Tj +(2939 return cp->pid;) 96.1073 Tj 0 -408.2145 Td -(2940 ) 21.8426 Tj +(2940 }) 26.2111 Tj 0 -417.7079 Td (2941 ) 21.8426 Tj 0 -427.2012 Td @@ -11667,73 +11760,73 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/dev.h Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/sysproc.c Page 2) 174.7406 Tj 0 -28.4801 Td -(2950 struct devsw {) 83.0018 Tj +(2950 int) 34.9481 Tj 0 -37.9735 Td -(2951 int \(*read\)\(struct inode*, char*, int\);) 200.9517 Tj +(2951 sys_sbrk\(void\)) 83.0018 Tj 0 -47.4668 Td -(2952 int \(*write\)\(struct inode*, char*, int\);) 205.3202 Tj +(2952 {) 26.2111 Tj 0 -56.9602 Td -(2953 };) 30.5796 Tj +(2953 int addr;) 69.8962 Tj 0 -66.4535 Td -(2954 ) 21.8426 Tj +(2954 int n;) 56.7907 Tj 0 -75.9469 Td -(2955 extern struct devsw devsw[];) 144.161 Tj +(2955 ) 21.8426 Tj 0 -85.4403 Td -(2956 ) 21.8426 Tj +(2956 if\(argint\(0, &n\) < 0\)) 122.3184 Tj 0 -94.9336 Td -(2957 #define CONSOLE 1) 96.1073 Tj +(2957 return -1;) 83.0018 Tj 0 -104.427 Td -(2958 ) 21.8426 Tj +(2958 addr = cp->sz;) 91.7388 Tj 0 -113.9203 Td -(2959 ) 21.8426 Tj +(2959 if\(growproc\(n\) < 0\)) 113.5814 Tj 0 -123.4137 Td -(2960 ) 21.8426 Tj +(2960 return -1;) 83.0018 Tj 0 -132.9071 Td -(2961 ) 21.8426 Tj +(2961 return addr;) 83.0018 Tj 0 -142.4004 Td -(2962 ) 21.8426 Tj +(2962 }) 26.2111 Tj 0 -151.8938 Td (2963 ) 21.8426 Tj 0 -161.3871 Td -(2964 ) 21.8426 Tj +(2964 int) 34.9481 Tj 0 -170.8805 Td -(2965 ) 21.8426 Tj +(2965 sys_sleep\(void\)) 87.3703 Tj 0 -180.3739 Td -(2966 ) 21.8426 Tj +(2966 {) 26.2111 Tj 0 -189.8672 Td -(2967 ) 21.8426 Tj +(2967 int n, ticks0;) 91.7388 Tj 0 -199.3606 Td (2968 ) 21.8426 Tj 0 -208.8539 Td -(2969 ) 21.8426 Tj +(2969 if\(argint\(0, &n\) < 0\)) 122.3184 Tj 0 -218.3473 Td -(2970 ) 21.8426 Tj +(2970 return -1;) 83.0018 Tj 0 -227.8407 Td -(2971 ) 21.8426 Tj +(2971 acquire\(&tickslock\);) 117.9499 Tj 0 -237.334 Td -(2972 ) 21.8426 Tj +(2972 ticks0 = ticks;) 96.1073 Tj 0 -246.8274 Td -(2973 ) 21.8426 Tj +(2973 while\(ticks - ticks0 < n\){) 144.161 Tj 0 -256.3207 Td -(2974 ) 21.8426 Tj +(2974 if\(cp->killed\){) 104.8443 Tj 0 -265.8141 Td -(2975 ) 21.8426 Tj +(2975 release\(&tickslock\);) 135.4239 Tj 0 -275.3075 Td -(2976 ) 21.8426 Tj +(2976 return -1;) 91.7388 Tj 0 -284.8008 Td -(2977 ) 21.8426 Tj +(2977 }) 43.6851 Tj 0 -294.2942 Td -(2978 ) 21.8426 Tj +(2978 sleep\(&ticks, &tickslock\);) 152.898 Tj 0 -303.7875 Td -(2979 ) 21.8426 Tj +(2979 }) 34.9481 Tj 0 -313.2809 Td -(2980 ) 21.8426 Tj +(2980 release\(&tickslock\);) 117.9499 Tj 0 -322.7743 Td -(2981 ) 21.8426 Tj +(2981 return 0;) 69.8962 Tj 0 -332.2676 Td -(2982 ) 21.8426 Tj +(2982 }) 26.2111 Tj 0 -341.761 Td (2983 ) 21.8426 Tj 0 -351.2543 Td @@ -11798,6 +11891,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -11815,31 +11910,31 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fcntl.h Page 1) 166.0035 Tj +(Aug 8 01:04 2009 xv6/buf.h Page 1) 157.2665 Tj 0 -28.4801 Td -(3000 #define O_RDONLY 0x000) 122.3184 Tj +(3000 struct buf {) 74.2647 Tj 0 -37.9735 Td -(3001 #define O_WRONLY 0x001) 122.3184 Tj +(3001 int flags;) 74.2647 Tj 0 -47.4668 Td -(3002 #define O_RDWR 0x002) 122.3184 Tj +(3002 uint dev;) 69.8962 Tj 0 -56.9602 Td -(3003 #define O_CREATE 0x200) 122.3184 Tj +(3003 uint sector;) 83.0018 Tj 0 -66.4535 Td -(3004 ) 21.8426 Tj +(3004 struct buf *prev; // LRU cache list) 183.4776 Tj 0 -75.9469 Td -(3005 ) 21.8426 Tj +(3005 struct buf *next;) 104.8443 Tj 0 -85.4403 Td -(3006 ) 21.8426 Tj +(3006 struct buf *qnext; // disk queue) 170.3721 Tj 0 -94.9336 Td -(3007 ) 21.8426 Tj +(3007 uchar data[512];) 100.4758 Tj 0 -104.427 Td -(3008 ) 21.8426 Tj +(3008 };) 30.5796 Tj 0 -113.9203 Td -(3009 ) 21.8426 Tj +(3009 #define B_BUSY 0x1 // buffer is locked by some process) 266.4794 Tj 0 -123.4137 Td -(3010 ) 21.8426 Tj +(3010 #define B_VALID 0x2 // buffer has been read from disk) 257.7424 Tj 0 -132.9071 Td -(3011 ) 21.8426 Tj +(3011 #define B_DIRTY 0x4 // buffer needs to be written to disk) 275.2164 Tj 0 -142.4004 Td (3012 ) 21.8426 Tj 0 -151.8938 Td @@ -11934,21 +12029,21 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/stat.h Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/fcntl.h Page 1) 166.0035 Tj 0 -28.4801 Td -(3050 struct stat {) 78.6333 Tj +(3050 #define O_RDONLY 0x000) 122.3184 Tj 0 -37.9735 Td -(3051 int dev; // Device number) 157.2665 Tj +(3051 #define O_WRONLY 0x001) 122.3184 Tj 0 -47.4668 Td -(3052 uint ino; // Inode number on device) 196.5831 Tj +(3052 #define O_RDWR 0x002) 122.3184 Tj 0 -56.9602 Td -(3053 short type; // Type of file) 152.898 Tj +(3053 #define O_CREATE 0x200) 122.3184 Tj 0 -66.4535 Td -(3054 short nlink; // Number of links to file) 200.9517 Tj +(3054 ) 21.8426 Tj 0 -75.9469 Td -(3055 uint size; // Size of file in bytes) 192.2146 Tj +(3055 ) 21.8426 Tj 0 -85.4403 Td -(3056 };) 30.5796 Tj +(3056 ) 21.8426 Tj 0 -94.9336 Td (3057 ) 21.8426 Tj 0 -104.427 Td @@ -12065,6 +12160,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -12082,29 +12179,29 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/file.h Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/stat.h Page 1) 161.635 Tj 0 -28.4801 Td -(3100 struct file {) 78.6333 Tj +(3100 #define T_DIR 1 // Directory) 157.2665 Tj 0 -37.9735 Td -(3101 enum { FD_CLOSED, FD_NONE, FD_PIPE, FD_INODE } type;) 257.7424 Tj +(3101 #define T_FILE 2 // File) 135.4239 Tj 0 -47.4668 Td -(3102 int ref; // reference count) 148.5295 Tj +(3102 #define T_DEV 3 // Special device) 179.1091 Tj 0 -56.9602 Td -(3103 char readable;) 91.7388 Tj +(3103 ) 21.8426 Tj 0 -66.4535 Td -(3104 char writable;) 91.7388 Tj +(3104 struct stat {) 78.6333 Tj 0 -75.9469 Td -(3105 struct pipe *pipe;) 109.2129 Tj +(3105 short type; // Type of file) 152.898 Tj 0 -85.4403 Td -(3106 struct inode *ip;) 104.8443 Tj +(3106 int dev; // Device number) 157.2665 Tj 0 -94.9336 Td -(3107 uint off;) 69.8962 Tj +(3107 uint ino; // Inode number on device) 196.5831 Tj 0 -104.427 Td -(3108 };) 30.5796 Tj +(3108 short nlink; // Number of links to file) 200.9517 Tj 0 -113.9203 Td -(3109 ) 21.8426 Tj +(3109 uint size; // Size of file in bytes) 192.2146 Tj 0 -123.4137 Td -(3110 ) 21.8426 Tj +(3110 };) 30.5796 Tj 0 -132.9071 Td (3111 ) 21.8426 Tj 0 -142.4004 Td @@ -12201,7 +12298,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.h Page 1) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.h Page 1) 152.898 Tj 0 -28.4801 Td (3150 // On-disk file system format.) 152.898 Tj 0 -37.9735 Td @@ -12217,90 +12314,90 @@ q 0 -85.4403 Td (3156 ) 21.8426 Tj 0 -94.9336 Td -(3157 #define BSIZE 512 // block size) 161.635 Tj +(3157 #define ROOTINO 1 // root i-number) 174.7406 Tj 0 -104.427 Td -(3158 ) 21.8426 Tj +(3158 #define BSIZE 512 // block size) 161.635 Tj 0 -113.9203 Td -(3159 // File system super block) 135.4239 Tj +(3159 ) 21.8426 Tj 0 -123.4137 Td -(3160 struct superblock {) 104.8443 Tj +(3160 // File system super block) 135.4239 Tj 0 -132.9071 Td -(3161 uint size; // Size of file system image \(blocks\ -\)) 275.2164 Tj +(3161 struct superblock {) 104.8443 Tj 0 -142.4004 Td -(3162 uint nblocks; // Number of data blocks) 218.4257 Tj +(3162 uint size; // Size of file system image \(blocks\ +\)) 275.2164 Tj 0 -151.8938 Td -(3163 uint ninodes; // Number of inodes.) 200.9517 Tj +(3163 uint nblocks; // Number of data blocks) 218.4257 Tj 0 -161.3871 Td -(3164 };) 30.5796 Tj +(3164 uint ninodes; // Number of inodes.) 200.9517 Tj 0 -170.8805 Td -(3165 ) 21.8426 Tj +(3165 };) 30.5796 Tj 0 -180.3739 Td -(3166 #define NADDRS \(NDIRECT+1\)) 135.4239 Tj +(3166 ) 21.8426 Tj 0 -189.8672 Td (3167 #define NDIRECT 12) 100.4758 Tj 0 -199.3606 Td -(3168 #define INDIRECT 12) 104.8443 Tj +(3168 #define NINDIRECT \(BSIZE / sizeof\(uint\)\)) 196.5831 Tj 0 -208.8539 Td -(3169 #define NINDIRECT \(BSIZE / sizeof\(uint\)\)) 196.5831 Tj +(3169 #define MAXFILE \(NDIRECT + NINDIRECT\)) 183.4776 Tj 0 -218.3473 Td -(3170 #define MAXFILE \(NDIRECT + NINDIRECT\)) 187.8461 Tj +(3170 ) 21.8426 Tj 0 -227.8407 Td -(3171 ) 21.8426 Tj +(3171 // On-disk inode structure) 135.4239 Tj 0 -237.334 Td -(3172 // On-disk inode structure) 135.4239 Tj +(3172 struct dinode {) 87.3703 Tj 0 -246.8274 Td -(3173 struct dinode {) 87.3703 Tj +(3173 short type; // File type) 179.1091 Tj 0 -256.3207 Td -(3174 short type; // File type) 179.1091 Tj +(3174 short major; // Major device number \(T_DEV onl\ +y\)) 279.5849 Tj 0 -265.8141 Td -(3175 short major; // Major device number \(T_DEV onl\ +(3175 short minor; // Minor device number \(T_DEV onl\ y\)) 279.5849 Tj 0 -275.3075 Td -(3176 short minor; // Minor device number \(T_DEV onl\ -y\)) 279.5849 Tj -0 -284.8008 Td -(3177 short nlink; // Number of links to inode in fil\ +(3176 short nlink; // Number of links to inode in fil\ e system) 310.1645 Tj +0 -284.8008 Td +(3177 uint size; // Size of file \(bytes\)) 227.1628 Tj 0 -294.2942 Td -(3178 uint size; // Size of file \(bytes\)) 227.1628 Tj +(3178 uint addrs[NDIRECT+1]; // Data block addresses) 240.2683 Tj 0 -303.7875 Td -(3179 uint addrs[NADDRS]; // Data block addresses) 227.1628 Tj +(3179 };) 30.5796 Tj 0 -313.2809 Td -(3180 };) 30.5796 Tj +(3180 ) 21.8426 Tj 0 -322.7743 Td -(3181 ) 21.8426 Tj +(3181 // Inodes per block.) 109.2129 Tj 0 -332.2676 Td -(3182 #define T_DIR 1 // Directory) 157.2665 Tj +(3182 #define IPB \(BSIZE / sizeof\(struct dinode\)\)) 253.3738 Tj 0 -341.761 Td -(3183 #define T_FILE 2 // File) 135.4239 Tj +(3183 ) 21.8426 Tj 0 -351.2543 Td -(3184 #define T_DEV 3 // Special device) 179.1091 Tj +(3184 // Block containing inode i) 139.7925 Tj 0 -360.7477 Td -(3185 ) 21.8426 Tj +(3185 #define IBLOCK\(i\) \(\(i\) / IPB + 2\)) 183.4776 Tj 0 -370.2411 Td -(3186 // Inodes per block.) 109.2129 Tj +(3186 ) 21.8426 Tj 0 -379.7344 Td -(3187 #define IPB \(BSIZE / sizeof\(struct dinode\)\)) 253.3738 Tj +(3187 // Bitmap bits per block) 126.6869 Tj 0 -389.2278 Td -(3188 ) 21.8426 Tj +(3188 #define BPB \(BSIZE*8\)) 157.2665 Tj 0 -398.7211 Td -(3189 // Block containing inode i) 139.7925 Tj +(3189 ) 21.8426 Tj 0 -408.2145 Td -(3190 #define IBLOCK\(i\) \(\(i\) / IPB + 2\)) 183.4776 Tj +(3190 // Block containing bit for block b) 174.7406 Tj 0 -417.7079 Td -(3191 ) 21.8426 Tj +(3191 #define BBLOCK\(b, ninodes\) \(b/BPB + \(ninodes\)/IPB + 3\ +\)) 257.7424 Tj 0 -427.2012 Td -(3192 // Bitmap bits per block) 126.6869 Tj +(3192 ) 21.8426 Tj 0 -436.6946 Td -(3193 #define BPB \(BSIZE*8\)) 157.2665 Tj +(3193 ) 21.8426 Tj 0 -446.1879 Td (3194 ) 21.8426 Tj 0 -455.6813 Td -(3195 // Block containing bit for block b) 174.7406 Tj +(3195 ) 21.8426 Tj 0 -465.1747 Td -(3196 #define BBLOCK\(b, ninodes\) \(b/BPB + \(ninodes\)/IPB + 3\ -\)) 257.7424 Tj +(3196 ) 21.8426 Tj 0 -474.668 Td (3197 ) 21.8426 Tj 0 -484.1614 Td @@ -12337,6 +12434,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -12354,7 +12453,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.h Page 2) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.h Page 2) 152.898 Tj 0 -28.4801 Td (3200 // Directory is a file containing a sequence of dirent str\ uctures.) 310.1645 Tj @@ -12474,89 +12573,89 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fsvar.h Page 1) 166.0035 Tj +(Aug 8 01:04 2009 xv6/file.h Page 1) 161.635 Tj 0 -28.4801 Td -(3250 // in-core file system types) 144.161 Tj +(3250 struct file {) 78.6333 Tj 0 -37.9735 Td -(3251 ) 21.8426 Tj +(3251 enum { FD_NONE, FD_PIPE, FD_INODE } type;) 209.6887 Tj 0 -47.4668 Td -(3252 struct inode {) 83.0018 Tj +(3252 int ref; // reference count) 148.5295 Tj 0 -56.9602 Td -(3253 uint dev; // Device number) 187.8461 Tj +(3253 char readable;) 91.7388 Tj 0 -66.4535 Td -(3254 uint inum; // Inode number) 183.4776 Tj +(3254 char writable;) 91.7388 Tj 0 -75.9469 Td -(3255 int ref; // Reference count) 196.5831 Tj +(3255 struct pipe *pipe;) 109.2129 Tj 0 -85.4403 Td -(3256 int flags; // I_BUSY, I_VALID) 196.5831 Tj +(3256 struct inode *ip;) 104.8443 Tj 0 -94.9336 Td -(3257 ) 21.8426 Tj +(3257 uint off;) 69.8962 Tj 0 -104.427 Td -(3258 short type; // copy of disk inode) 209.6887 Tj +(3258 };) 30.5796 Tj 0 -113.9203 Td -(3259 short major;) 83.0018 Tj +(3259 ) 21.8426 Tj 0 -123.4137 Td -(3260 short minor;) 83.0018 Tj +(3260 ) 21.8426 Tj 0 -132.9071 Td -(3261 short nlink;) 83.0018 Tj +(3261 // in-core file system types) 144.161 Tj 0 -142.4004 Td -(3262 uint size;) 74.2647 Tj +(3262 ) 21.8426 Tj 0 -151.8938 Td -(3263 uint addrs[NADDRS];) 113.5814 Tj +(3263 struct inode {) 83.0018 Tj 0 -161.3871 Td -(3264 };) 30.5796 Tj +(3264 uint dev; // Device number) 187.8461 Tj 0 -170.8805 Td -(3265 ) 21.8426 Tj +(3265 uint inum; // Inode number) 183.4776 Tj 0 -180.3739 Td -(3266 #define I_BUSY 0x1) 100.4758 Tj +(3266 int ref; // Reference count) 196.5831 Tj 0 -189.8672 Td -(3267 #define I_VALID 0x2) 104.8443 Tj +(3267 int flags; // I_BUSY, I_VALID) 196.5831 Tj 0 -199.3606 Td (3268 ) 21.8426 Tj 0 -208.8539 Td -(3269 ) 21.8426 Tj +(3269 short type; // copy of disk inode) 209.6887 Tj 0 -218.3473 Td -(3270 ) 21.8426 Tj +(3270 short major;) 83.0018 Tj 0 -227.8407 Td -(3271 ) 21.8426 Tj +(3271 short minor;) 83.0018 Tj 0 -237.334 Td -(3272 ) 21.8426 Tj +(3272 short nlink;) 83.0018 Tj 0 -246.8274 Td -(3273 ) 21.8426 Tj +(3273 uint size;) 74.2647 Tj 0 -256.3207 Td -(3274 ) 21.8426 Tj +(3274 uint addrs[NDIRECT+1];) 126.6869 Tj 0 -265.8141 Td -(3275 ) 21.8426 Tj +(3275 };) 30.5796 Tj 0 -275.3075 Td (3276 ) 21.8426 Tj 0 -284.8008 Td -(3277 ) 21.8426 Tj +(3277 #define I_BUSY 0x1) 100.4758 Tj 0 -294.2942 Td -(3278 ) 21.8426 Tj +(3278 #define I_VALID 0x2) 104.8443 Tj 0 -303.7875 Td (3279 ) 21.8426 Tj 0 -313.2809 Td (3280 ) 21.8426 Tj 0 -322.7743 Td -(3281 ) 21.8426 Tj +(3281 // device implementations) 131.0554 Tj 0 -332.2676 Td (3282 ) 21.8426 Tj 0 -341.761 Td -(3283 ) 21.8426 Tj +(3283 struct devsw {) 83.0018 Tj 0 -351.2543 Td -(3284 ) 21.8426 Tj +(3284 int \(*read\)\(struct inode*, char*, int\);) 200.9517 Tj 0 -360.7477 Td -(3285 ) 21.8426 Tj +(3285 int \(*write\)\(struct inode*, char*, int\);) 205.3202 Tj 0 -370.2411 Td -(3286 ) 21.8426 Tj +(3286 };) 30.5796 Tj 0 -379.7344 Td (3287 ) 21.8426 Tj 0 -389.2278 Td -(3288 ) 21.8426 Tj +(3288 extern struct devsw devsw[];) 144.161 Tj 0 -398.7211 Td (3289 ) 21.8426 Tj 0 -408.2145 Td -(3290 ) 21.8426 Tj +(3290 #define CONSOLE 1) 96.1073 Tj 0 -417.7079 Td (3291 ) 21.8426 Tj 0 -427.2012 Td @@ -12605,6 +12704,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -12622,7 +12723,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/ide.c Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/ide.c Page 1) 157.2665 Tj 0 -28.4801 Td (3300 // Simple PIO-based \(non-DMA\) IDE driver code.) 222.7942 Tj 0 -37.9735 Td @@ -12664,25 +12765,24 @@ q 0 -208.8539 Td (3319 ) 21.8426 Tj 0 -218.3473 Td -(3320 // ide_queue points to the buf now being read/written to t\ -he disk.) 310.1645 Tj +(3320 // idequeue points to the buf now being read/written to th\ +e disk.) 305.796 Tj 0 -227.8407 Td -(3321 // ide_queue->qnext points to the next buf to be processed\ -.) 279.5849 Tj +(3321 // idequeue->qnext points to the next buf to be processed.) 275.2164 Tj 0 -237.334 Td -(3322 // You must hold ide_lock while manipulating queue.) 244.6368 Tj +(3322 // You must hold idelock while manipulating queue.) 240.2683 Tj 0 -246.8274 Td (3323 ) 21.8426 Tj 0 -256.3207 Td -(3324 static struct spinlock ide_lock;) 161.635 Tj +(3324 static struct spinlock idelock;) 157.2665 Tj 0 -265.8141 Td -(3325 static struct buf *ide_queue;) 148.5295 Tj +(3325 static struct buf *idequeue;) 144.161 Tj 0 -275.3075 Td (3326 ) 21.8426 Tj 0 -284.8008 Td -(3327 static int disk_1_present;) 135.4239 Tj +(3327 static int havedisk1;) 113.5814 Tj 0 -294.2942 Td -(3328 static void ide_start_request\(\);) 161.635 Tj +(3328 static void idestart\(struct buf*\);) 170.3721 Tj 0 -303.7875 Td (3329 ) 21.8426 Tj 0 -313.2809 Td @@ -12690,7 +12790,7 @@ he disk.) 310.1645 Tj 0 -322.7743 Td (3331 static int) 65.5277 Tj 0 -332.2676 Td -(3332 ide_wait_ready\(int check_error\)) 157.2665 Tj +(3332 idewait\(int checkerr\)) 113.5814 Tj 0 -341.761 Td (3333 {) 26.2111 Tj 0 -351.2543 Td @@ -12698,12 +12798,12 @@ he disk.) 310.1645 Tj 0 -360.7477 Td (3335 ) 21.8426 Tj 0 -370.2411 Td -(3336 while\(\(\(r = inb\(0x1f7\)\) & IDE_BSY\) || !\(r & IDE_\ -DRDY\)\)) 266.4794 Tj +(3336 while\(\(\(r = inb\(0x1f7\)\) & \(IDE_BSY|IDE_DRDY\)\) !\ += IDE_DRDY\)) 283.9534 Tj 0 -379.7344 Td (3337 ;) 43.6851 Tj 0 -389.2278 Td -(3338 if\(check_error && \(r & \(IDE_DF|IDE_ERR\)\) != 0\)) 231.5313 Tj +(3338 if\(checkerr && \(r & \(IDE_DF|IDE_ERR\)\) != 0\)) 218.4257 Tj 0 -398.7211 Td (3339 return -1;) 83.0018 Tj 0 -408.2145 Td @@ -12744,11 +12844,11 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/ide.c Page 2) 157.2665 Tj +(Aug 8 01:04 2009 xv6/ide.c Page 2) 157.2665 Tj 0 -28.4801 Td (3350 void) 39.3166 Tj 0 -37.9735 Td -(3351 ide_init\(void\)) 83.0018 Tj +(3351 ideinit\(void\)) 78.6333 Tj 0 -47.4668 Td (3352 {) 26.2111 Tj 0 -56.9602 Td @@ -12756,13 +12856,13 @@ q 0 -66.4535 Td (3354 ) 21.8426 Tj 0 -75.9469 Td -(3355 initlock\(&ide_lock, "ide"\);) 148.5295 Tj +(3355 initlock\(&idelock, "ide"\);) 144.161 Tj 0 -85.4403 Td -(3356 pic_enable\(IRQ_IDE\);) 117.9499 Tj +(3356 picenable\(IRQ_IDE\);) 113.5814 Tj 0 -94.9336 Td -(3357 ioapic_enable\(IRQ_IDE, ncpu - 1\);) 174.7406 Tj +(3357 ioapicenable\(IRQ_IDE, ncpu - 1\);) 170.3721 Tj 0 -104.427 Td -(3358 ide_wait_ready\(0\);) 109.2129 Tj +(3358 idewait\(0\);) 78.6333 Tj 0 -113.9203 Td (3359 ) 21.8426 Tj 0 -123.4137 Td @@ -12774,7 +12874,7 @@ q 0 -151.8938 Td (3363 if\(inb\(0x1f7\) != 0\){) 126.6869 Tj 0 -161.3871 Td -(3364 disk_1_present = 1;) 131.0554 Tj +(3364 havedisk1 = 1;) 109.2129 Tj 0 -170.8805 Td (3365 break;) 74.2647 Tj 0 -180.3739 Td @@ -12792,21 +12892,21 @@ q 0 -237.334 Td (3372 ) 21.8426 Tj 0 -246.8274 Td -(3373 // Start the request for b. Caller must hold ide_lock.) 262.1109 Tj +(3373 // Start the request for b. Caller must hold idelock.) 257.7424 Tj 0 -256.3207 Td (3374 static void) 69.8962 Tj 0 -265.8141 Td -(3375 ide_start_request\(struct buf *b\)) 161.635 Tj +(3375 idestart\(struct buf *b\)) 122.3184 Tj 0 -275.3075 Td (3376 {) 26.2111 Tj 0 -284.8008 Td (3377 if\(b == 0\)) 74.2647 Tj 0 -294.2942 Td -(3378 panic\("ide_start_request"\);) 157.2665 Tj +(3378 panic\("idestart"\);) 117.9499 Tj 0 -303.7875 Td (3379 ) 21.8426 Tj 0 -313.2809 Td -(3380 ide_wait_ready\(0\);) 109.2129 Tj +(3380 idewait\(0\);) 78.6333 Tj 0 -322.7743 Td (3381 outb\(0x3f6, 0\); // generate interrupt) 196.5831 Tj 0 -332.2676 Td @@ -12876,6 +12976,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -12893,13 +12995,13 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/ide.c Page 3) 157.2665 Tj +(Aug 8 01:04 2009 xv6/ide.c Page 3) 157.2665 Tj 0 -28.4801 Td (3400 // Interrupt handler.) 113.5814 Tj 0 -37.9735 Td (3401 void) 39.3166 Tj 0 -47.4668 Td -(3402 ide_intr\(void\)) 83.0018 Tj +(3402 ideintr\(void\)) 78.6333 Tj 0 -56.9602 Td (3403 {) 26.2111 Tj 0 -66.4535 Td @@ -12907,53 +13009,53 @@ q 0 -75.9469 Td (3405 ) 21.8426 Tj 0 -85.4403 Td -(3406 acquire\(&ide_lock\);) 113.5814 Tj +(3406 // Take first buffer off queue.) 166.0035 Tj 0 -94.9336 Td -(3407 if\(\(b = ide_queue\) == 0\){) 139.7925 Tj +(3407 acquire\(&idelock\);) 109.2129 Tj 0 -104.427 Td -(3408 release\(&ide_lock\);) 122.3184 Tj +(3408 if\(\(b = idequeue\) == 0\){) 135.4239 Tj 0 -113.9203 Td -(3409 return;) 69.8962 Tj +(3409 release\(&idelock\);) 117.9499 Tj 0 -123.4137 Td -(3410 }) 34.9481 Tj +(3410 cprintf\("Spurious IDE interrupt.\\n"\);) 200.9517 Tj 0 -132.9071 Td -(3411 ) 21.8426 Tj +(3411 return;) 69.8962 Tj 0 -142.4004 Td -(3412 // Read data if needed.) 131.0554 Tj +(3412 }) 34.9481 Tj 0 -151.8938 Td -(3413 if\(!\(b->flags & B_DIRTY\) && ide_wait_ready\(1\) >= 0\)) 253.3738 Tj +(3413 idequeue = b->qnext;) 117.9499 Tj 0 -161.3871 Td -(3414 insl\(0x1f0, b->data, 512/4\);) 161.635 Tj +(3414 ) 21.8426 Tj 0 -170.8805 Td -(3415 ) 21.8426 Tj +(3415 // Read data if needed.) 131.0554 Tj 0 -180.3739 Td -(3416 // Wake process waiting for this buf.) 192.2146 Tj +(3416 if\(!\(b->flags & B_DIRTY\) && idewait\(1\) >= 0\)) 222.7942 Tj 0 -189.8672 Td -(3417 b->flags |= B_VALID;) 117.9499 Tj +(3417 insl\(0x1f0, b->data, 512/4\);) 161.635 Tj 0 -199.3606 Td -(3418 b->flags &= ~B_DIRTY;) 122.3184 Tj +(3418 ) 21.8426 Tj 0 -208.8539 Td -(3419 wakeup\(b\);) 74.2647 Tj +(3419 // Wake process waiting for this buf.) 192.2146 Tj 0 -218.3473 Td -(3420 ) 21.8426 Tj +(3420 b->flags |= B_VALID;) 117.9499 Tj 0 -227.8407 Td -(3421 // Start disk on next buf in queue.) 183.4776 Tj +(3421 b->flags &= ~B_DIRTY;) 122.3184 Tj 0 -237.334 Td -(3422 if\(\(ide_queue = b->qnext\) != 0\)) 166.0035 Tj +(3422 wakeup\(b\);) 74.2647 Tj 0 -246.8274 Td -(3423 ide_start_request\(ide_queue\);) 166.0035 Tj +(3423 ) 21.8426 Tj 0 -256.3207 Td -(3424 ) 21.8426 Tj +(3424 // Start disk on next buf in queue.) 183.4776 Tj 0 -265.8141 Td -(3425 release\(&ide_lock\);) 113.5814 Tj +(3425 if\(idequeue != 0\)) 104.8443 Tj 0 -275.3075 Td -(3426 }) 26.2111 Tj +(3426 idestart\(idequeue\);) 122.3184 Tj 0 -284.8008 Td (3427 ) 21.8426 Tj 0 -294.2942 Td -(3428 ) 21.8426 Tj +(3428 release\(&idelock\);) 109.2129 Tj 0 -303.7875 Td -(3429 ) 21.8426 Tj +(3429 }) 26.2111 Tj 0 -313.2809 Td (3430 ) 21.8426 Tj 0 -322.7743 Td @@ -13012,7 +13114,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/ide.c Page 4) 157.2665 Tj +(Aug 8 01:04 2009 xv6/ide.c Page 4) 157.2665 Tj 0 -28.4801 Td (3450 // Sync buf with disk.) 117.9499 Tj 0 -37.9735 Td @@ -13024,7 +13126,7 @@ ALID.) 297.059 Tj 0 -56.9602 Td (3453 void) 39.3166 Tj 0 -66.4535 Td -(3454 ide_rw\(struct buf *b\)) 113.5814 Tj +(3454 iderw\(struct buf *b\)) 109.2129 Tj 0 -75.9469 Td (3455 {) 26.2111 Tj 0 -85.4403 Td @@ -13034,27 +13136,27 @@ ALID.) 297.059 Tj 0 -104.427 Td (3458 if\(!\(b->flags & B_BUSY\)\)) 135.4239 Tj 0 -113.9203 Td -(3459 panic\("ide_rw: buf not busy"\);) 170.3721 Tj +(3459 panic\("iderw: buf not busy"\);) 166.0035 Tj 0 -123.4137 Td (3460 if\(\(b->flags & \(B_VALID|B_DIRTY\)\) == B_VALID\)) 227.1628 Tj 0 -132.9071 Td -(3461 panic\("ide_rw: nothing to do"\);) 174.7406 Tj +(3461 panic\("iderw: nothing to do"\);) 170.3721 Tj 0 -142.4004 Td -(3462 if\(b->dev != 0 && !disk_1_present\)) 179.1091 Tj +(3462 if\(b->dev != 0 && !havedisk1\)) 157.2665 Tj 0 -151.8938 Td -(3463 panic\("ide disk 1 not present"\);) 179.1091 Tj +(3463 panic\("idrw: ide disk 1 not present"\);) 205.3202 Tj 0 -161.3871 Td (3464 ) 21.8426 Tj 0 -170.8805 Td -(3465 acquire\(&ide_lock\);) 113.5814 Tj +(3465 acquire\(&idelock\);) 109.2129 Tj 0 -180.3739 Td (3466 ) 21.8426 Tj 0 -189.8672 Td -(3467 // Append b to ide_queue.) 139.7925 Tj +(3467 // Append b to idequeue.) 135.4239 Tj 0 -199.3606 Td (3468 b->qnext = 0;) 87.3703 Tj 0 -208.8539 Td -(3469 for\(pp=&ide_queue; *pp; pp=&\(*pp\)->qnext\)) 209.6887 Tj +(3469 for\(pp=&idequeue; *pp; pp=&\(*pp\)->qnext\)) 205.3202 Tj 0 -218.3473 Td (3470 ;) 43.6851 Tj 0 -227.8407 Td @@ -13064,9 +13166,9 @@ ALID.) 297.059 Tj 0 -246.8274 Td (3473 // Start disk if necessary.) 148.5295 Tj 0 -256.3207 Td -(3474 if\(ide_queue == b\)) 109.2129 Tj +(3474 if\(idequeue == b\)) 104.8443 Tj 0 -265.8141 Td -(3475 ide_start_request\(b\);) 131.0554 Tj +(3475 idestart\(b\);) 91.7388 Tj 0 -275.3075 Td (3476 ) 21.8426 Tj 0 -284.8008 Td @@ -13076,11 +13178,11 @@ ALID.) 297.059 Tj 0 -303.7875 Td (3479 while\(\(b->flags & \(B_VALID|B_DIRTY\)\) != B_VALID\)) 240.2683 Tj 0 -313.2809 Td -(3480 sleep\(b, &ide_lock\);) 126.6869 Tj +(3480 sleep\(b, &idelock\);) 122.3184 Tj 0 -322.7743 Td (3481 ) 21.8426 Tj 0 -332.2676 Td -(3482 release\(&ide_lock\);) 113.5814 Tj +(3482 release\(&idelock\);) 109.2129 Tj 0 -341.761 Td (3483 }) 26.2111 Tj 0 -351.2543 Td @@ -13145,6 +13247,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -13162,7 +13266,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/bio.c Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/bio.c Page 1) 157.2665 Tj 0 -28.4801 Td (3500 // Buffer cache.) 91.7388 Tj 0 -37.9735 Td @@ -13228,35 +13332,35 @@ o disk.) 305.796 Tj 0 -294.2942 Td (3528 ) 21.8426 Tj 0 -303.7875 Td -(3529 struct buf buf[NBUF];) 113.5814 Tj +(3529 struct {) 56.7907 Tj 0 -313.2809 Td -(3530 struct spinlock buf_table_lock;) 157.2665 Tj +(3530 struct spinlock lock;) 122.3184 Tj 0 -322.7743 Td -(3531 ) 21.8426 Tj +(3531 struct buf buf[NBUF];) 122.3184 Tj 0 -332.2676 Td -(3532 // Linked list of all buffers, through prev/next.) 235.8998 Tj +(3532 ) 21.8426 Tj 0 -341.761 Td -(3533 // bufhead->next is most recently used.) 192.2146 Tj +(3533 // Linked list of all buffers, through prev/next.) 244.6368 Tj 0 -351.2543 Td -(3534 // bufhead->tail is least recently used.) 196.5831 Tj +(3534 // head.next is most recently used.) 183.4776 Tj 0 -360.7477 Td -(3535 struct buf bufhead;) 104.8443 Tj +(3535 struct buf head;) 100.4758 Tj 0 -370.2411 Td -(3536 ) 21.8426 Tj +(3536 } bcache;) 61.1592 Tj 0 -379.7344 Td -(3537 void) 39.3166 Tj +(3537 ) 21.8426 Tj 0 -389.2278 Td -(3538 binit\(void\)) 69.8962 Tj +(3538 void) 39.3166 Tj 0 -398.7211 Td -(3539 {) 26.2111 Tj +(3539 binit\(void\)) 69.8962 Tj 0 -408.2145 Td -(3540 struct buf *b;) 91.7388 Tj +(3540 {) 26.2111 Tj 0 -417.7079 Td -(3541 ) 21.8426 Tj +(3541 struct buf *b;) 91.7388 Tj 0 -427.2012 Td -(3542 initlock\(&buf_table_lock, "buf_table"\);) 200.9517 Tj +(3542 ) 21.8426 Tj 0 -436.6946 Td -(3543 ) 21.8426 Tj +(3543 initlock\(&bcache.lock, "bcache"\);) 174.7406 Tj 0 -446.1879 Td (3544 ) 21.8426 Tj 0 -455.6813 Td @@ -13287,73 +13391,74 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/bio.c Page 2) 157.2665 Tj +(Aug 8 01:04 2009 xv6/bio.c Page 2) 157.2665 Tj 0 -28.4801 Td (3550 // Create linked list of buffers) 170.3721 Tj 0 -37.9735 Td -(3551 bufhead.prev = &bufhead;) 135.4239 Tj +(3551 bcache.head.prev = &bcache.head;) 170.3721 Tj 0 -47.4668 Td -(3552 bufhead.next = &bufhead;) 135.4239 Tj +(3552 bcache.head.next = &bcache.head;) 170.3721 Tj 0 -56.9602 Td -(3553 for\(b = buf; b < buf+NBUF; b++\){) 170.3721 Tj +(3553 for\(b = bcache.buf; b < bcache.buf+NBUF; b++\){) 231.5313 Tj 0 -66.4535 Td -(3554 b->next = bufhead.next;) 139.7925 Tj +(3554 b->next = bcache.head.next;) 157.2665 Tj 0 -75.9469 Td -(3555 b->prev = &bufhead;) 122.3184 Tj +(3555 b->prev = &bcache.head;) 139.7925 Tj 0 -85.4403 Td -(3556 bufhead.next->prev = b;) 139.7925 Tj +(3556 b->dev = -1;) 91.7388 Tj 0 -94.9336 Td -(3557 bufhead.next = b;) 113.5814 Tj +(3557 bcache.head.next->prev = b;) 157.2665 Tj 0 -104.427 Td -(3558 }) 34.9481 Tj +(3558 bcache.head.next = b;) 131.0554 Tj 0 -113.9203 Td -(3559 }) 26.2111 Tj +(3559 }) 34.9481 Tj 0 -123.4137 Td -(3560 ) 21.8426 Tj +(3560 }) 26.2111 Tj 0 -132.9071 Td -(3561 // Look through buffer cache for sector on device dev.) 257.7424 Tj +(3561 ) 21.8426 Tj 0 -142.4004 Td -(3562 // If not found, allocate fresh block.) 187.8461 Tj +(3562 // Look through buffer cache for sector on device dev.) 257.7424 Tj 0 -151.8938 Td -(3563 // In either case, return locked buffer.) 196.5831 Tj +(3563 // If not found, allocate fresh block.) 187.8461 Tj 0 -161.3871 Td -(3564 static struct buf*) 100.4758 Tj +(3564 // In either case, return locked buffer.) 196.5831 Tj 0 -170.8805 Td -(3565 bget\(uint dev, uint sector\)) 139.7925 Tj +(3565 static struct buf*) 100.4758 Tj 0 -180.3739 Td -(3566 {) 26.2111 Tj +(3566 bget\(uint dev, uint sector\)) 139.7925 Tj 0 -189.8672 Td -(3567 struct buf *b;) 91.7388 Tj +(3567 {) 26.2111 Tj 0 -199.3606 Td -(3568 ) 21.8426 Tj +(3568 struct buf *b;) 91.7388 Tj 0 -208.8539 Td -(3569 acquire\(&buf_table_lock\);) 139.7925 Tj +(3569 ) 21.8426 Tj 0 -218.3473 Td -(3570 ) 21.8426 Tj +(3570 acquire\(&bcache.lock\);) 126.6869 Tj 0 -227.8407 Td -(3571 loop:) 48.0537 Tj +(3571 ) 21.8426 Tj 0 -237.334 Td -(3572 // Try for cached block.) 135.4239 Tj +(3572 loop:) 48.0537 Tj 0 -246.8274 Td -(3573 for\(b = bufhead.next; b != &bufhead; b = b->next\){) 249.0053 Tj +(3573 // Try for cached block.) 135.4239 Tj 0 -256.3207 Td -(3574 if\(\(b->flags & \(B_BUSY|B_VALID\)\) &&) 192.2146 Tj +(3574 for\(b = bcache.head.next; b != &bcache.head; b = b->nex\ +t\){) 283.9534 Tj 0 -265.8141 Td -(3575 b->dev == dev && b->sector == sector\){) 218.4257 Tj +(3575 if\(b->dev == dev && b->sector == sector\){) 218.4257 Tj 0 -275.3075 Td -(3576 if\(b->flags & B_BUSY\){) 144.161 Tj +(3576 if\(!\(b->flags & B_BUSY\)\){) 157.2665 Tj 0 -284.8008 Td -(3577 sleep\(buf, &buf_table_lock\);) 179.1091 Tj +(3577 b->flags |= B_BUSY;) 139.7925 Tj 0 -294.2942 Td -(3578 goto loop;) 100.4758 Tj +(3578 release\(&bcache.lock\);) 152.898 Tj 0 -303.7875 Td -(3579 }) 52.4222 Tj +(3579 return b;) 96.1073 Tj 0 -313.2809 Td -(3580 b->flags |= B_BUSY;) 131.0554 Tj +(3580 }) 52.4222 Tj 0 -322.7743 Td -(3581 release\(&buf_table_lock\);) 157.2665 Tj +(3581 sleep\(b, &bcache.lock\);) 148.5295 Tj 0 -332.2676 Td -(3582 return b;) 87.3703 Tj +(3582 goto loop;) 91.7388 Tj 0 -341.761 Td (3583 }) 43.6851 Tj 0 -351.2543 Td @@ -13363,17 +13468,18 @@ q 0 -370.2411 Td (3586 // Allocate fresh block.) 135.4239 Tj 0 -379.7344 Td -(3587 for\(b = bufhead.prev; b != &bufhead; b = b->prev\){) 249.0053 Tj +(3587 for\(b = bcache.head.prev; b != &bcache.head; b = b->pre\ +v\){) 283.9534 Tj 0 -389.2278 Td (3588 if\(\(b->flags & B_BUSY\) == 0\){) 166.0035 Tj 0 -398.7211 Td -(3589 b->flags = B_BUSY;) 126.6869 Tj +(3589 b->dev = dev;) 104.8443 Tj 0 -408.2145 Td -(3590 b->dev = dev;) 104.8443 Tj +(3590 b->sector = sector;) 131.0554 Tj 0 -417.7079 Td -(3591 b->sector = sector;) 131.0554 Tj +(3591 b->flags = B_BUSY;) 126.6869 Tj 0 -427.2012 Td -(3592 release\(&buf_table_lock\);) 157.2665 Tj +(3592 release\(&bcache.lock\);) 144.161 Tj 0 -436.6946 Td (3593 return b;) 87.3703 Tj 0 -446.1879 Td @@ -13418,6 +13524,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -13435,7 +13543,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/bio.c Page 3) 157.2665 Tj +(Aug 8 01:04 2009 xv6/bio.c Page 3) 157.2665 Tj 0 -28.4801 Td (3600 // Return a B_BUSY buf with the contents of the indicated \ disk sector.) 327.6386 Tj @@ -13454,7 +13562,7 @@ disk sector.) 327.6386 Tj 0 -94.9336 Td (3607 if\(!\(b->flags & B_VALID\)\)) 139.7925 Tj 0 -104.427 Td -(3608 ide_rw\(b\);) 83.0018 Tj +(3608 iderw\(b\);) 78.6333 Tj 0 -113.9203 Td (3609 return b;) 69.8962 Tj 0 -123.4137 Td @@ -13462,7 +13570,7 @@ disk sector.) 327.6386 Tj 0 -132.9071 Td (3611 ) 21.8426 Tj 0 -142.4004 Td -(3612 // Write buf's contents to disk. Must be locked.) 235.8998 Tj +(3612 // Write b's contents to disk. Must be locked.) 227.1628 Tj 0 -151.8938 Td (3613 void) 39.3166 Tj 0 -161.3871 Td @@ -13476,13 +13584,13 @@ disk sector.) 327.6386 Tj 0 -199.3606 Td (3618 b->flags |= B_DIRTY;) 117.9499 Tj 0 -208.8539 Td -(3619 ide_rw\(b\);) 74.2647 Tj +(3619 iderw\(b\);) 69.8962 Tj 0 -218.3473 Td (3620 }) 26.2111 Tj 0 -227.8407 Td (3621 ) 21.8426 Tj 0 -237.334 Td -(3622 // Release the buffer buf.) 135.4239 Tj +(3622 // Release the buffer b.) 126.6869 Tj 0 -246.8274 Td (3623 void) 39.3166 Tj 0 -256.3207 Td @@ -13496,7 +13604,7 @@ disk sector.) 327.6386 Tj 0 -294.2942 Td (3628 ) 21.8426 Tj 0 -303.7875 Td -(3629 acquire\(&buf_table_lock\);) 139.7925 Tj +(3629 acquire\(&bcache.lock\);) 126.6869 Tj 0 -313.2809 Td (3630 ) 21.8426 Tj 0 -322.7743 Td @@ -13504,23 +13612,23 @@ disk sector.) 327.6386 Tj 0 -332.2676 Td (3632 b->prev->next = b->next;) 135.4239 Tj 0 -341.761 Td -(3633 b->next = bufhead.next;) 131.0554 Tj +(3633 b->next = bcache.head.next;) 148.5295 Tj 0 -351.2543 Td -(3634 b->prev = &bufhead;) 113.5814 Tj +(3634 b->prev = &bcache.head;) 131.0554 Tj 0 -360.7477 Td -(3635 bufhead.next->prev = b;) 131.0554 Tj +(3635 bcache.head.next->prev = b;) 148.5295 Tj 0 -370.2411 Td -(3636 bufhead.next = b;) 104.8443 Tj +(3636 bcache.head.next = b;) 122.3184 Tj 0 -379.7344 Td (3637 ) 21.8426 Tj 0 -389.2278 Td (3638 b->flags &= ~B_BUSY;) 117.9499 Tj 0 -398.7211 Td -(3639 wakeup\(buf\);) 83.0018 Tj +(3639 wakeup\(b\);) 74.2647 Tj 0 -408.2145 Td (3640 ) 21.8426 Tj 0 -417.7079 Td -(3641 release\(&buf_table_lock\);) 139.7925 Tj +(3641 release\(&bcache.lock\);) 126.6869 Tj 0 -427.2012 Td (3642 }) 26.2111 Tj 0 -436.6946 Td @@ -13555,7 +13663,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 1) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 1) 152.898 Tj 0 -28.4801 Td (3650 // File system implementation. Four layers:) 214.0572 Tj 0 -37.9735 Td @@ -13604,61 +13712,61 @@ ions) 283.9534 Tj 0 -218.3473 Td (3670 #include "fs.h") 87.3703 Tj 0 -227.8407 Td -(3671 #include "fsvar.h") 100.4758 Tj +(3671 #include "file.h") 96.1073 Tj 0 -237.334 Td -(3672 #include "dev.h") 91.7388 Tj +(3672 ) 21.8426 Tj 0 -246.8274 Td -(3673 ) 21.8426 Tj +(3673 #define min\(a, b\) \(\(a\) < \(b\) ? \(a\) : \(b\)\)) 200.9517 Tj 0 -256.3207 Td -(3674 #define min\(a, b\) \(\(a\) < \(b\) ? \(a\) : \(b\)\)) 200.9517 Tj +(3674 static void itrunc\(struct inode*\);) 170.3721 Tj 0 -265.8141 Td -(3675 static void itrunc\(struct inode*\);) 170.3721 Tj +(3675 ) 21.8426 Tj 0 -275.3075 Td -(3676 ) 21.8426 Tj +(3676 // Read the super block.) 126.6869 Tj 0 -284.8008 Td -(3677 // Read the super block.) 126.6869 Tj +(3677 static void) 69.8962 Tj 0 -294.2942 Td -(3678 static void) 69.8962 Tj +(3678 readsb\(int dev, struct superblock *sb\)) 187.8461 Tj 0 -303.7875 Td -(3679 readsb\(int dev, struct superblock *sb\)) 187.8461 Tj +(3679 {) 26.2111 Tj 0 -313.2809 Td -(3680 {) 26.2111 Tj +(3680 struct buf *bp;) 96.1073 Tj 0 -322.7743 Td -(3681 struct buf *bp;) 96.1073 Tj +(3681 ) 21.8426 Tj 0 -332.2676 Td -(3682 ) 21.8426 Tj +(3682 bp = bread\(dev, 1\);) 113.5814 Tj 0 -341.761 Td -(3683 bp = bread\(dev, 1\);) 113.5814 Tj +(3683 memmove\(sb, bp->data, sizeof\(*sb\)\);) 183.4776 Tj 0 -351.2543 Td -(3684 memmove\(sb, bp->data, sizeof\(*sb\)\);) 183.4776 Tj +(3684 brelse\(bp\);) 78.6333 Tj 0 -360.7477 Td -(3685 brelse\(bp\);) 78.6333 Tj +(3685 }) 26.2111 Tj 0 -370.2411 Td -(3686 }) 26.2111 Tj +(3686 ) 21.8426 Tj 0 -379.7344 Td -(3687 ) 21.8426 Tj +(3687 // Zero a block.) 91.7388 Tj 0 -389.2278 Td -(3688 // Zero a block.) 91.7388 Tj +(3688 static void) 69.8962 Tj 0 -398.7211 Td -(3689 static void) 69.8962 Tj +(3689 bzero\(int dev, int bno\)) 122.3184 Tj 0 -408.2145 Td -(3690 bzero\(int dev, int bno\)) 122.3184 Tj +(3690 {) 26.2111 Tj 0 -417.7079 Td -(3691 {) 26.2111 Tj +(3691 struct buf *bp;) 96.1073 Tj 0 -427.2012 Td -(3692 struct buf *bp;) 96.1073 Tj +(3692 ) 21.8426 Tj 0 -436.6946 Td -(3693 ) 21.8426 Tj +(3693 bp = bread\(dev, bno\);) 122.3184 Tj 0 -446.1879 Td -(3694 bp = bread\(dev, bno\);) 122.3184 Tj +(3694 memset\(bp->data, 0, BSIZE\);) 148.5295 Tj 0 -455.6813 Td -(3695 memset\(bp->data, 0, BSIZE\);) 148.5295 Tj +(3695 bwrite\(bp\);) 78.6333 Tj 0 -465.1747 Td -(3696 bwrite\(bp\);) 78.6333 Tj +(3696 brelse\(bp\);) 78.6333 Tj 0 -474.668 Td -(3697 brelse\(bp\);) 78.6333 Tj +(3697 }) 26.2111 Tj 0 -484.1614 Td -(3698 }) 26.2111 Tj +(3698 ) 21.8426 Tj 0 -493.6547 Td (3699 ) 21.8426 Tj 0 -522.1348 Td @@ -13691,6 +13799,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -13708,7 +13818,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 2) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 2) 152.898 Tj 0 -28.4801 Td (3700 // Blocks.) 65.5277 Tj 0 -37.9735 Td @@ -13829,7 +13939,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 3) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 3) 152.898 Tj 0 -28.4801 Td (3750 // Inodes.) 65.5277 Tj 0 -37.9735 Td @@ -13925,13 +14035,13 @@ ero) 288.322 Tj 0 -408.2145 Td (3790 {) 26.2111 Tj 0 -417.7079 Td -(3791 initlock\(&icache.lock, "icache.lock"\);) 196.5831 Tj +(3791 initlock\(&icache.lock, "icache"\);) 174.7406 Tj 0 -427.2012 Td (3792 }) 26.2111 Tj 0 -436.6946 Td (3793 ) 21.8426 Tj 0 -446.1879 Td -(3794 ) 21.8426 Tj +(3794 static struct inode* iget\(uint dev, uint inum\);) 227.1628 Tj 0 -455.6813 Td (3795 ) 21.8426 Tj 0 -465.1747 Td @@ -13972,6 +14082,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -13989,100 +14101,98 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 4) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 4) 152.898 Tj 0 -28.4801 Td -(3800 // Find the inode with number inum on device dev) 231.5313 Tj +(3800 // Allocate a new inode with the given type on device dev.) 275.2164 Tj 0 -37.9735 Td -(3801 // and return the in-memory copy.) 166.0035 Tj +(3801 struct inode*) 78.6333 Tj 0 -47.4668 Td -(3802 static struct inode*) 109.2129 Tj +(3802 ialloc\(uint dev, short type\)) 144.161 Tj 0 -56.9602 Td -(3803 iget\(uint dev, uint inum\)) 131.0554 Tj +(3803 {) 26.2111 Tj 0 -66.4535 Td -(3804 {) 26.2111 Tj +(3804 int inum;) 69.8962 Tj 0 -75.9469 Td -(3805 struct inode *ip, *empty;) 139.7925 Tj +(3805 struct buf *bp;) 96.1073 Tj 0 -85.4403 Td -(3806 ) 21.8426 Tj +(3806 struct dinode *dip;) 113.5814 Tj 0 -94.9336 Td -(3807 acquire\(&icache.lock\);) 126.6869 Tj +(3807 struct superblock sb;) 122.3184 Tj 0 -104.427 Td (3808 ) 21.8426 Tj 0 -113.9203 Td -(3809 // Try for cached inode.) 135.4239 Tj +(3809 readsb\(dev, &sb\);) 104.8443 Tj 0 -123.4137 Td -(3810 empty = 0;) 74.2647 Tj +(3810 for\(inum = 1; inum < sb.ninodes; inum++\){ // loop ove\ +r inode blocks) 327.6386 Tj 0 -132.9071 Td -(3811 for\(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; \ -ip++\){) 297.059 Tj +(3811 bp = bread\(dev, IBLOCK\(inum\)\);) 170.3721 Tj 0 -142.4004 Td -(3812 if\(ip->ref > 0 && ip->dev == dev && ip->inum == inum\)\ -{) 275.2164 Tj +(3812 dip = \(struct dinode*\)bp->data + inum%IPB;) 222.7942 Tj 0 -151.8938 Td -(3813 ip->ref++;) 91.7388 Tj +(3813 if\(dip->type == 0\){ // a free inode) 196.5831 Tj 0 -161.3871 Td -(3814 release\(&icache.lock\);) 144.161 Tj +(3814 memset\(dip, 0, sizeof\(*dip\)\);) 174.7406 Tj 0 -170.8805 Td -(3815 return ip;) 91.7388 Tj +(3815 dip->type = type;) 122.3184 Tj 0 -180.3739 Td -(3816 }) 43.6851 Tj +(3816 bwrite\(bp\); // mark it allocated on the disk) 249.0053 Tj 0 -189.8672 Td -(3817 if\(empty == 0 && ip->ref == 0\) // Remember empty \ -slot.) 288.322 Tj +(3817 brelse\(bp\);) 96.1073 Tj 0 -199.3606 Td -(3818 empty = ip;) 96.1073 Tj +(3818 return iget\(dev, inum\);) 148.5295 Tj 0 -208.8539 Td -(3819 }) 34.9481 Tj +(3819 }) 43.6851 Tj 0 -218.3473 Td -(3820 ) 21.8426 Tj +(3820 brelse\(bp\);) 87.3703 Tj 0 -227.8407 Td -(3821 // Allocate fresh inode.) 135.4239 Tj +(3821 }) 34.9481 Tj 0 -237.334 Td -(3822 if\(empty == 0\)) 91.7388 Tj +(3822 panic\("ialloc: no inodes"\);) 148.5295 Tj 0 -246.8274 Td -(3823 panic\("iget: no inodes"\);) 148.5295 Tj +(3823 }) 26.2111 Tj 0 -256.3207 Td (3824 ) 21.8426 Tj 0 -265.8141 Td -(3825 ip = empty;) 78.6333 Tj +(3825 // Copy inode, which has changed, from memory to disk.) 257.7424 Tj 0 -275.3075 Td -(3826 ip->dev = dev;) 91.7388 Tj +(3826 void) 39.3166 Tj 0 -284.8008 Td -(3827 ip->inum = inum;) 100.4758 Tj +(3827 iupdate\(struct inode *ip\)) 131.0554 Tj 0 -294.2942 Td -(3828 ip->ref = 1;) 83.0018 Tj +(3828 {) 26.2111 Tj 0 -303.7875 Td -(3829 ip->flags = 0;) 91.7388 Tj +(3829 struct buf *bp;) 96.1073 Tj 0 -313.2809 Td -(3830 release\(&icache.lock\);) 126.6869 Tj +(3830 struct dinode *dip;) 113.5814 Tj 0 -322.7743 Td (3831 ) 21.8426 Tj 0 -332.2676 Td -(3832 return ip;) 74.2647 Tj +(3832 bp = bread\(ip->dev, IBLOCK\(ip->inum\)\);) 196.5831 Tj 0 -341.761 Td -(3833 }) 26.2111 Tj +(3833 dip = \(struct dinode*\)bp->data + ip->inum%IPB;) 231.5313 Tj 0 -351.2543 Td -(3834 ) 21.8426 Tj +(3834 dip->type = ip->type;) 122.3184 Tj 0 -360.7477 Td -(3835 // Increment reference count for ip.) 179.1091 Tj +(3835 dip->major = ip->major;) 131.0554 Tj 0 -370.2411 Td -(3836 // Returns ip to enable ip = idup\(ip1\) idiom.) 218.4257 Tj +(3836 dip->minor = ip->minor;) 131.0554 Tj 0 -379.7344 Td -(3837 struct inode*) 78.6333 Tj +(3837 dip->nlink = ip->nlink;) 131.0554 Tj 0 -389.2278 Td -(3838 idup\(struct inode *ip\)) 117.9499 Tj +(3838 dip->size = ip->size;) 122.3184 Tj 0 -398.7211 Td -(3839 {) 26.2111 Tj +(3839 memmove\(dip->addrs, ip->addrs, sizeof\(ip->addrs\)\);) 249.0053 Tj 0 -408.2145 Td -(3840 acquire\(&icache.lock\);) 126.6869 Tj +(3840 bwrite\(bp\);) 78.6333 Tj 0 -417.7079 Td -(3841 ip->ref++;) 74.2647 Tj +(3841 brelse\(bp\);) 78.6333 Tj 0 -427.2012 Td -(3842 release\(&icache.lock\);) 126.6869 Tj +(3842 }) 26.2111 Tj 0 -436.6946 Td -(3843 return ip;) 74.2647 Tj +(3843 ) 21.8426 Tj 0 -446.1879 Td -(3844 }) 26.2111 Tj +(3844 ) 21.8426 Tj 0 -455.6813 Td (3845 ) 21.8426 Tj 0 -465.1747 Td @@ -14111,97 +14221,100 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 5) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 5) 152.898 Tj 0 -28.4801 Td -(3850 // Lock the given inode.) 126.6869 Tj +(3850 // Find the inode with number inum on device dev) 231.5313 Tj 0 -37.9735 Td -(3851 void) 39.3166 Tj +(3851 // and return the in-memory copy.) 166.0035 Tj 0 -47.4668 Td -(3852 ilock\(struct inode *ip\)) 122.3184 Tj +(3852 static struct inode*) 109.2129 Tj 0 -56.9602 Td -(3853 {) 26.2111 Tj +(3853 iget\(uint dev, uint inum\)) 131.0554 Tj 0 -66.4535 Td -(3854 struct buf *bp;) 96.1073 Tj +(3854 {) 26.2111 Tj 0 -75.9469 Td -(3855 struct dinode *dip;) 113.5814 Tj +(3855 struct inode *ip, *empty;) 139.7925 Tj 0 -85.4403 Td (3856 ) 21.8426 Tj 0 -94.9336 Td -(3857 if\(ip == 0 || ip->ref < 1\)) 144.161 Tj +(3857 acquire\(&icache.lock\);) 126.6869 Tj 0 -104.427 Td -(3858 panic\("ilock"\);) 104.8443 Tj +(3858 ) 21.8426 Tj 0 -113.9203 Td -(3859 ) 21.8426 Tj +(3859 // Try for cached inode.) 135.4239 Tj 0 -123.4137 Td -(3860 acquire\(&icache.lock\);) 126.6869 Tj +(3860 empty = 0;) 74.2647 Tj 0 -132.9071 Td -(3861 while\(ip->flags & I_BUSY\)) 139.7925 Tj +(3861 for\(ip = &icache.inode[0]; ip < &icache.inode[NINODE]; \ +ip++\){) 297.059 Tj 0 -142.4004 Td -(3862 sleep\(ip, &icache.lock\);) 144.161 Tj +(3862 if\(ip->ref > 0 && ip->dev == dev && ip->inum == inum\)\ +{) 275.2164 Tj 0 -151.8938 Td -(3863 ip->flags |= I_BUSY;) 117.9499 Tj +(3863 ip->ref++;) 91.7388 Tj 0 -161.3871 Td -(3864 release\(&icache.lock\);) 126.6869 Tj +(3864 release\(&icache.lock\);) 144.161 Tj 0 -170.8805 Td -(3865 ) 21.8426 Tj +(3865 return ip;) 91.7388 Tj 0 -180.3739 Td -(3866 if\(!\(ip->flags & I_VALID\)\){) 148.5295 Tj +(3866 }) 43.6851 Tj 0 -189.8672 Td -(3867 bp = bread\(ip->dev, IBLOCK\(ip->inum\)\);) 205.3202 Tj +(3867 if\(empty == 0 && ip->ref == 0\) // Remember empty \ +slot.) 288.322 Tj 0 -199.3606 Td -(3868 dip = \(struct dinode*\)bp->data + ip->inum%IPB;) 240.2683 Tj +(3868 empty = ip;) 96.1073 Tj 0 -208.8539 Td -(3869 ip->type = dip->type;) 131.0554 Tj +(3869 }) 34.9481 Tj 0 -218.3473 Td -(3870 ip->major = dip->major;) 139.7925 Tj +(3870 ) 21.8426 Tj 0 -227.8407 Td -(3871 ip->minor = dip->minor;) 139.7925 Tj +(3871 // Allocate fresh inode.) 135.4239 Tj 0 -237.334 Td -(3872 ip->nlink = dip->nlink;) 139.7925 Tj +(3872 if\(empty == 0\)) 91.7388 Tj 0 -246.8274 Td -(3873 ip->size = dip->size;) 131.0554 Tj +(3873 panic\("iget: no inodes"\);) 148.5295 Tj 0 -256.3207 Td -(3874 memmove\(ip->addrs, dip->addrs, sizeof\(ip->addrs\)\);) 257.7424 Tj +(3874 ) 21.8426 Tj 0 -265.8141 Td -(3875 brelse\(bp\);) 87.3703 Tj +(3875 ip = empty;) 78.6333 Tj 0 -275.3075 Td -(3876 ip->flags |= I_VALID;) 131.0554 Tj +(3876 ip->dev = dev;) 91.7388 Tj 0 -284.8008 Td -(3877 if\(ip->type == 0\)) 113.5814 Tj +(3877 ip->inum = inum;) 100.4758 Tj 0 -294.2942 Td -(3878 panic\("ilock: no type"\);) 152.898 Tj +(3878 ip->ref = 1;) 83.0018 Tj 0 -303.7875 Td -(3879 }) 34.9481 Tj +(3879 ip->flags = 0;) 91.7388 Tj 0 -313.2809 Td -(3880 }) 26.2111 Tj +(3880 release\(&icache.lock\);) 126.6869 Tj 0 -322.7743 Td (3881 ) 21.8426 Tj 0 -332.2676 Td -(3882 // Unlock the given inode.) 135.4239 Tj +(3882 return ip;) 74.2647 Tj 0 -341.761 Td -(3883 void) 39.3166 Tj +(3883 }) 26.2111 Tj 0 -351.2543 Td -(3884 iunlock\(struct inode *ip\)) 131.0554 Tj +(3884 ) 21.8426 Tj 0 -360.7477 Td -(3885 {) 26.2111 Tj +(3885 // Increment reference count for ip.) 179.1091 Tj 0 -370.2411 Td -(3886 if\(ip == 0 || !\(ip->flags & I_BUSY\) || ip->ref < 1\)) 253.3738 Tj +(3886 // Returns ip to enable ip = idup\(ip1\) idiom.) 218.4257 Tj 0 -379.7344 Td -(3887 panic\("iunlock"\);) 113.5814 Tj +(3887 struct inode*) 78.6333 Tj 0 -389.2278 Td -(3888 ) 21.8426 Tj +(3888 idup\(struct inode *ip\)) 117.9499 Tj 0 -398.7211 Td -(3889 acquire\(&icache.lock\);) 126.6869 Tj +(3889 {) 26.2111 Tj 0 -408.2145 Td -(3890 ip->flags &= ~I_BUSY;) 122.3184 Tj +(3890 acquire\(&icache.lock\);) 126.6869 Tj 0 -417.7079 Td -(3891 wakeup\(ip\);) 78.6333 Tj +(3891 ip->ref++;) 74.2647 Tj 0 -427.2012 Td (3892 release\(&icache.lock\);) 126.6869 Tj 0 -436.6946 Td -(3893 }) 26.2111 Tj +(3893 return ip;) 74.2647 Tj 0 -446.1879 Td -(3894 ) 21.8426 Tj +(3894 }) 26.2111 Tj 0 -455.6813 Td (3895 ) 21.8426 Tj 0 -465.1747 Td @@ -14242,6 +14355,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -14259,96 +14374,95 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 6) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 6) 152.898 Tj 0 -28.4801 Td -(3900 // Caller holds reference to unlocked ip. Drop reference.) 275.2164 Tj +(3900 // Lock the given inode.) 126.6869 Tj 0 -37.9735 Td (3901 void) 39.3166 Tj 0 -47.4668 Td -(3902 iput\(struct inode *ip\)) 117.9499 Tj +(3902 ilock\(struct inode *ip\)) 122.3184 Tj 0 -56.9602 Td (3903 {) 26.2111 Tj 0 -66.4535 Td -(3904 acquire\(&icache.lock\);) 126.6869 Tj +(3904 struct buf *bp;) 96.1073 Tj 0 -75.9469 Td -(3905 if\(ip->ref == 1 && \(ip->flags & I_VALID\) && ip->nlink\ - == 0\){) 292.6905 Tj +(3905 struct dinode *dip;) 113.5814 Tj 0 -85.4403 Td -(3906 // inode is no longer used: truncate and free inode.) 266.4794 Tj +(3906 ) 21.8426 Tj 0 -94.9336 Td -(3907 if\(ip->flags & I_BUSY\)) 135.4239 Tj +(3907 if\(ip == 0 || ip->ref < 1\)) 144.161 Tj 0 -104.427 Td -(3908 panic\("iput busy"\);) 131.0554 Tj +(3908 panic\("ilock"\);) 104.8443 Tj 0 -113.9203 Td -(3909 ip->flags |= I_BUSY;) 126.6869 Tj +(3909 ) 21.8426 Tj 0 -123.4137 Td -(3910 release\(&icache.lock\);) 135.4239 Tj +(3910 acquire\(&icache.lock\);) 126.6869 Tj 0 -132.9071 Td -(3911 itrunc\(ip\);) 87.3703 Tj +(3911 while\(ip->flags & I_BUSY\)) 139.7925 Tj 0 -142.4004 Td -(3912 ip->type = 0;) 96.1073 Tj +(3912 sleep\(ip, &icache.lock\);) 144.161 Tj 0 -151.8938 Td -(3913 iupdate\(ip\);) 91.7388 Tj +(3913 ip->flags |= I_BUSY;) 117.9499 Tj 0 -161.3871 Td -(3914 acquire\(&icache.lock\);) 135.4239 Tj +(3914 release\(&icache.lock\);) 126.6869 Tj 0 -170.8805 Td -(3915 ip->flags &= ~I_BUSY;) 131.0554 Tj +(3915 ) 21.8426 Tj 0 -180.3739 Td -(3916 wakeup\(ip\);) 87.3703 Tj +(3916 if\(!\(ip->flags & I_VALID\)\){) 148.5295 Tj 0 -189.8672 Td -(3917 }) 34.9481 Tj +(3917 bp = bread\(ip->dev, IBLOCK\(ip->inum\)\);) 205.3202 Tj 0 -199.3606 Td -(3918 ip->ref--;) 74.2647 Tj +(3918 dip = \(struct dinode*\)bp->data + ip->inum%IPB;) 240.2683 Tj 0 -208.8539 Td -(3919 release\(&icache.lock\);) 126.6869 Tj +(3919 ip->type = dip->type;) 131.0554 Tj 0 -218.3473 Td -(3920 }) 26.2111 Tj +(3920 ip->major = dip->major;) 139.7925 Tj 0 -227.8407 Td -(3921 ) 21.8426 Tj +(3921 ip->minor = dip->minor;) 139.7925 Tj 0 -237.334 Td -(3922 // Common idiom: unlock, then put.) 170.3721 Tj +(3922 ip->nlink = dip->nlink;) 139.7925 Tj 0 -246.8274 Td -(3923 void) 39.3166 Tj +(3923 ip->size = dip->size;) 131.0554 Tj 0 -256.3207 Td -(3924 iunlockput\(struct inode *ip\)) 144.161 Tj +(3924 memmove\(ip->addrs, dip->addrs, sizeof\(ip->addrs\)\);) 257.7424 Tj 0 -265.8141 Td -(3925 {) 26.2111 Tj +(3925 brelse\(bp\);) 87.3703 Tj 0 -275.3075 Td -(3926 iunlock\(ip\);) 83.0018 Tj +(3926 ip->flags |= I_VALID;) 131.0554 Tj 0 -284.8008 Td -(3927 iput\(ip\);) 69.8962 Tj +(3927 if\(ip->type == 0\)) 113.5814 Tj 0 -294.2942 Td -(3928 }) 26.2111 Tj +(3928 panic\("ilock: no type"\);) 152.898 Tj 0 -303.7875 Td -(3929 ) 21.8426 Tj +(3929 }) 34.9481 Tj 0 -313.2809 Td -(3930 ) 21.8426 Tj +(3930 }) 26.2111 Tj 0 -322.7743 Td (3931 ) 21.8426 Tj 0 -332.2676 Td -(3932 ) 21.8426 Tj +(3932 // Unlock the given inode.) 135.4239 Tj 0 -341.761 Td -(3933 ) 21.8426 Tj +(3933 void) 39.3166 Tj 0 -351.2543 Td -(3934 ) 21.8426 Tj +(3934 iunlock\(struct inode *ip\)) 131.0554 Tj 0 -360.7477 Td -(3935 ) 21.8426 Tj +(3935 {) 26.2111 Tj 0 -370.2411 Td -(3936 ) 21.8426 Tj +(3936 if\(ip == 0 || !\(ip->flags & I_BUSY\) || ip->ref < 1\)) 253.3738 Tj 0 -379.7344 Td -(3937 ) 21.8426 Tj +(3937 panic\("iunlock"\);) 113.5814 Tj 0 -389.2278 Td (3938 ) 21.8426 Tj 0 -398.7211 Td -(3939 ) 21.8426 Tj +(3939 acquire\(&icache.lock\);) 126.6869 Tj 0 -408.2145 Td -(3940 ) 21.8426 Tj +(3940 ip->flags &= ~I_BUSY;) 122.3184 Tj 0 -417.7079 Td -(3941 ) 21.8426 Tj +(3941 wakeup\(ip\);) 78.6333 Tj 0 -427.2012 Td -(3942 ) 21.8426 Tj +(3942 release\(&icache.lock\);) 126.6869 Tj 0 -436.6946 Td -(3943 ) 21.8426 Tj +(3943 }) 26.2111 Tj 0 -446.1879 Td (3944 ) 21.8426 Tj 0 -455.6813 Td @@ -14379,94 +14493,94 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 7) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 7) 152.898 Tj 0 -28.4801 Td -(3950 // Allocate a new inode with the given type on device dev.) 275.2164 Tj +(3950 // Caller holds reference to unlocked ip. Drop reference.) 275.2164 Tj 0 -37.9735 Td -(3951 struct inode*) 78.6333 Tj +(3951 void) 39.3166 Tj 0 -47.4668 Td -(3952 ialloc\(uint dev, short type\)) 144.161 Tj +(3952 iput\(struct inode *ip\)) 117.9499 Tj 0 -56.9602 Td (3953 {) 26.2111 Tj 0 -66.4535 Td -(3954 int inum;) 69.8962 Tj +(3954 acquire\(&icache.lock\);) 126.6869 Tj 0 -75.9469 Td -(3955 struct buf *bp;) 96.1073 Tj +(3955 if\(ip->ref == 1 && \(ip->flags & I_VALID\) && ip->nlink\ + == 0\){) 292.6905 Tj 0 -85.4403 Td -(3956 struct dinode *dip;) 113.5814 Tj +(3956 // inode is no longer used: truncate and free inode.) 266.4794 Tj 0 -94.9336 Td -(3957 struct superblock sb;) 122.3184 Tj +(3957 if\(ip->flags & I_BUSY\)) 135.4239 Tj 0 -104.427 Td -(3958 ) 21.8426 Tj +(3958 panic\("iput busy"\);) 131.0554 Tj 0 -113.9203 Td -(3959 readsb\(dev, &sb\);) 104.8443 Tj +(3959 ip->flags |= I_BUSY;) 126.6869 Tj 0 -123.4137 Td -(3960 for\(inum = 1; inum < sb.ninodes; inum++\){ // loop ove\ -r inode blocks) 327.6386 Tj +(3960 release\(&icache.lock\);) 135.4239 Tj 0 -132.9071 Td -(3961 bp = bread\(dev, IBLOCK\(inum\)\);) 170.3721 Tj +(3961 itrunc\(ip\);) 87.3703 Tj 0 -142.4004 Td -(3962 dip = \(struct dinode*\)bp->data + inum%IPB;) 222.7942 Tj +(3962 ip->type = 0;) 96.1073 Tj 0 -151.8938 Td -(3963 if\(dip->type == 0\){ // a free inode) 196.5831 Tj +(3963 iupdate\(ip\);) 91.7388 Tj 0 -161.3871 Td -(3964 memset\(dip, 0, sizeof\(*dip\)\);) 174.7406 Tj +(3964 acquire\(&icache.lock\);) 135.4239 Tj 0 -170.8805 Td -(3965 dip->type = type;) 122.3184 Tj +(3965 ip->flags = 0;) 100.4758 Tj 0 -180.3739 Td -(3966 bwrite\(bp\); // mark it allocated on the disk) 249.0053 Tj +(3966 wakeup\(ip\);) 87.3703 Tj 0 -189.8672 Td -(3967 brelse\(bp\);) 96.1073 Tj +(3967 }) 34.9481 Tj 0 -199.3606 Td -(3968 return iget\(dev, inum\);) 148.5295 Tj +(3968 ip->ref--;) 74.2647 Tj 0 -208.8539 Td -(3969 }) 43.6851 Tj +(3969 release\(&icache.lock\);) 126.6869 Tj 0 -218.3473 Td -(3970 brelse\(bp\);) 87.3703 Tj +(3970 }) 26.2111 Tj 0 -227.8407 Td -(3971 }) 34.9481 Tj +(3971 ) 21.8426 Tj 0 -237.334 Td -(3972 panic\("ialloc: no inodes"\);) 148.5295 Tj +(3972 // Common idiom: unlock, then put.) 170.3721 Tj 0 -246.8274 Td -(3973 }) 26.2111 Tj +(3973 void) 39.3166 Tj 0 -256.3207 Td -(3974 ) 21.8426 Tj +(3974 iunlockput\(struct inode *ip\)) 144.161 Tj 0 -265.8141 Td -(3975 // Copy inode, which has changed, from memory to disk.) 257.7424 Tj +(3975 {) 26.2111 Tj 0 -275.3075 Td -(3976 void) 39.3166 Tj +(3976 iunlock\(ip\);) 83.0018 Tj 0 -284.8008 Td -(3977 iupdate\(struct inode *ip\)) 131.0554 Tj +(3977 iput\(ip\);) 69.8962 Tj 0 -294.2942 Td -(3978 {) 26.2111 Tj +(3978 }) 26.2111 Tj 0 -303.7875 Td -(3979 struct buf *bp;) 96.1073 Tj +(3979 ) 21.8426 Tj 0 -313.2809 Td -(3980 struct dinode *dip;) 113.5814 Tj +(3980 ) 21.8426 Tj 0 -322.7743 Td (3981 ) 21.8426 Tj 0 -332.2676 Td -(3982 bp = bread\(ip->dev, IBLOCK\(ip->inum\)\);) 196.5831 Tj +(3982 ) 21.8426 Tj 0 -341.761 Td -(3983 dip = \(struct dinode*\)bp->data + ip->inum%IPB;) 231.5313 Tj +(3983 ) 21.8426 Tj 0 -351.2543 Td -(3984 dip->type = ip->type;) 122.3184 Tj +(3984 ) 21.8426 Tj 0 -360.7477 Td -(3985 dip->major = ip->major;) 131.0554 Tj +(3985 ) 21.8426 Tj 0 -370.2411 Td -(3986 dip->minor = ip->minor;) 131.0554 Tj +(3986 ) 21.8426 Tj 0 -379.7344 Td -(3987 dip->nlink = ip->nlink;) 131.0554 Tj +(3987 ) 21.8426 Tj 0 -389.2278 Td -(3988 dip->size = ip->size;) 122.3184 Tj +(3988 ) 21.8426 Tj 0 -398.7211 Td -(3989 memmove\(dip->addrs, ip->addrs, sizeof\(ip->addrs\)\);) 249.0053 Tj +(3989 ) 21.8426 Tj 0 -408.2145 Td -(3990 bwrite\(bp\);) 78.6333 Tj +(3990 ) 21.8426 Tj 0 -417.7079 Td -(3991 brelse\(bp\);) 78.6333 Tj +(3991 ) 21.8426 Tj 0 -427.2012 Td -(3992 }) 26.2111 Tj +(3992 ) 21.8426 Tj 0 -436.6946 Td (3993 ) 21.8426 Tj 0 -446.1879 Td @@ -14511,6 +14625,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -14528,7 +14644,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 8) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 8) 152.898 Tj 0 -28.4801 Td (4000 // Inode contents) 96.1073 Tj 0 -37.9735 Td @@ -14550,12 +14666,11 @@ re) 283.9534 Tj (4007 // Return the disk block address of the nth block in inode\ ip.) 292.6905 Tj 0 -104.427 Td -(4008 // If there is no such block, alloc controls whether one i\ -s allocated.) 327.6386 Tj +(4008 // If there is no such block, bmap allocates one.) 235.8998 Tj 0 -113.9203 Td (4009 static uint) 69.8962 Tj 0 -123.4137 Td -(4010 bmap\(struct inode *ip, uint bn, int alloc\)) 205.3202 Tj +(4010 bmap\(struct inode *ip, uint bn\)) 157.2665 Tj 0 -132.9071 Td (4011 {) 26.2111 Tj 0 -142.4004 Td @@ -14567,71 +14682,71 @@ s allocated.) 327.6386 Tj 0 -170.8805 Td (4015 if\(bn < NDIRECT\){) 104.8443 Tj 0 -180.3739 Td -(4016 if\(\(addr = ip->addrs[bn]\) == 0\){) 179.1091 Tj +(4016 if\(\(addr = ip->addrs[bn]\) == 0\)) 174.7406 Tj 0 -189.8672 Td -(4017 if\(!alloc\)) 91.7388 Tj +(4017 ip->addrs[bn] = addr = balloc\(ip->dev\);) 218.4257 Tj 0 -199.3606 Td -(4018 return -1;) 100.4758 Tj +(4018 return addr;) 91.7388 Tj 0 -208.8539 Td -(4019 ip->addrs[bn] = addr = balloc\(ip->dev\);) 218.4257 Tj +(4019 }) 34.9481 Tj 0 -218.3473 Td -(4020 }) 43.6851 Tj +(4020 bn -= NDIRECT;) 91.7388 Tj 0 -227.8407 Td -(4021 return addr;) 91.7388 Tj +(4021 ) 21.8426 Tj 0 -237.334 Td -(4022 }) 34.9481 Tj +(4022 if\(bn < NINDIRECT\){) 113.5814 Tj 0 -246.8274 Td -(4023 bn -= NDIRECT;) 91.7388 Tj +(4023 // Load indirect block, allocating if necessary.) 249.0053 Tj 0 -256.3207 Td -(4024 ) 21.8426 Tj +(4024 if\(\(addr = ip->addrs[NDIRECT]\) == 0\)) 196.5831 Tj 0 -265.8141 Td -(4025 if\(bn < NINDIRECT\){) 113.5814 Tj +(4025 ip->addrs[NDIRECT] = addr = balloc\(ip->dev\);) 240.2683 Tj 0 -275.3075 Td -(4026 // Load indirect block, allocating if necessary.) 249.0053 Tj +(4026 bp = bread\(ip->dev, addr\);) 152.898 Tj 0 -284.8008 Td -(4027 if\(\(addr = ip->addrs[INDIRECT]\) == 0\){) 205.3202 Tj +(4027 a = \(uint*\)bp->data;) 126.6869 Tj 0 -294.2942 Td -(4028 if\(!alloc\)) 91.7388 Tj +(4028 if\(\(addr = a[bn]\) == 0\){) 144.161 Tj 0 -303.7875 Td -(4029 return -1;) 100.4758 Tj +(4029 a[bn] = addr = balloc\(ip->dev\);) 183.4776 Tj 0 -313.2809 Td -(4030 ip->addrs[INDIRECT] = addr = balloc\(ip->dev\);) 244.6368 Tj +(4030 bwrite\(bp\);) 96.1073 Tj 0 -322.7743 Td (4031 }) 43.6851 Tj 0 -332.2676 Td -(4032 bp = bread\(ip->dev, addr\);) 152.898 Tj +(4032 brelse\(bp\);) 87.3703 Tj 0 -341.761 Td -(4033 a = \(uint*\)bp->data;) 126.6869 Tj +(4033 return addr;) 91.7388 Tj 0 -351.2543 Td -(4034 ) 21.8426 Tj +(4034 }) 34.9481 Tj 0 -360.7477 Td -(4035 if\(\(addr = a[bn]\) == 0\){) 144.161 Tj +(4035 ) 21.8426 Tj 0 -370.2411 Td -(4036 if\(!alloc\){) 96.1073 Tj +(4036 panic\("bmap: out of range"\);) 152.898 Tj 0 -379.7344 Td -(4037 brelse\(bp\);) 104.8443 Tj +(4037 }) 26.2111 Tj 0 -389.2278 Td -(4038 return -1;) 100.4758 Tj +(4038 ) 21.8426 Tj 0 -398.7211 Td -(4039 }) 52.4222 Tj +(4039 ) 21.8426 Tj 0 -408.2145 Td -(4040 a[bn] = addr = balloc\(ip->dev\);) 183.4776 Tj +(4040 ) 21.8426 Tj 0 -417.7079 Td -(4041 bwrite\(bp\);) 96.1073 Tj +(4041 ) 21.8426 Tj 0 -427.2012 Td -(4042 }) 43.6851 Tj +(4042 ) 21.8426 Tj 0 -436.6946 Td -(4043 brelse\(bp\);) 87.3703 Tj +(4043 ) 21.8426 Tj 0 -446.1879 Td -(4044 return addr;) 91.7388 Tj +(4044 ) 21.8426 Tj 0 -455.6813 Td -(4045 }) 34.9481 Tj +(4045 ) 21.8426 Tj 0 -465.1747 Td (4046 ) 21.8426 Tj 0 -474.668 Td -(4047 panic\("bmap: out of range"\);) 152.898 Tj +(4047 ) 21.8426 Tj 0 -484.1614 Td -(4048 }) 26.2111 Tj +(4048 ) 21.8426 Tj 0 -493.6547 Td (4049 ) 21.8426 Tj 0 -522.1348 Td @@ -14652,93 +14767,93 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 9) 152.898 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 9) 152.898 Tj 0 -28.4801 Td (4050 // Truncate inode \(discard contents\).) 183.4776 Tj 0 -37.9735 Td -(4051 static void) 69.8962 Tj +(4051 // Only called after the last dirent referring) 222.7942 Tj 0 -47.4668 Td -(4052 itrunc\(struct inode *ip\)) 126.6869 Tj +(4052 // to this inode has been erased on disk.) 200.9517 Tj 0 -56.9602 Td -(4053 {) 26.2111 Tj +(4053 static void) 69.8962 Tj 0 -66.4535 Td -(4054 int i, j;) 69.8962 Tj +(4054 itrunc\(struct inode *ip\)) 126.6869 Tj 0 -75.9469 Td -(4055 struct buf *bp;) 96.1073 Tj +(4055 {) 26.2111 Tj 0 -85.4403 Td -(4056 uint *a;) 65.5277 Tj +(4056 int i, j;) 69.8962 Tj 0 -94.9336 Td -(4057 ) 21.8426 Tj +(4057 struct buf *bp;) 96.1073 Tj 0 -104.427 Td -(4058 for\(i = 0; i < NDIRECT; i++\){) 157.2665 Tj +(4058 uint *a;) 65.5277 Tj 0 -113.9203 Td -(4059 if\(ip->addrs[i]\){) 113.5814 Tj +(4059 ) 21.8426 Tj 0 -123.4137 Td -(4060 bfree\(ip->dev, ip->addrs[i]\);) 174.7406 Tj +(4060 for\(i = 0; i < NDIRECT; i++\){) 157.2665 Tj 0 -132.9071 Td -(4061 ip->addrs[i] = 0;) 122.3184 Tj +(4061 if\(ip->addrs[i]\){) 113.5814 Tj 0 -142.4004 Td -(4062 }) 43.6851 Tj +(4062 bfree\(ip->dev, ip->addrs[i]\);) 174.7406 Tj 0 -151.8938 Td -(4063 }) 34.9481 Tj +(4063 ip->addrs[i] = 0;) 122.3184 Tj 0 -161.3871 Td -(4064 ) 21.8426 Tj +(4064 }) 43.6851 Tj 0 -170.8805 Td -(4065 if\(ip->addrs[INDIRECT]\){) 135.4239 Tj +(4065 }) 34.9481 Tj 0 -180.3739 Td -(4066 bp = bread\(ip->dev, ip->addrs[INDIRECT]\);) 218.4257 Tj +(4066 ) 21.8426 Tj 0 -189.8672 Td -(4067 a = \(uint*\)bp->data;) 126.6869 Tj +(4067 if\(ip->addrs[NDIRECT]\){) 131.0554 Tj 0 -199.3606 Td -(4068 for\(j = 0; j < NINDIRECT; j++\){) 174.7406 Tj +(4068 bp = bread\(ip->dev, ip->addrs[NDIRECT]\);) 214.0572 Tj 0 -208.8539 Td -(4069 if\(a[j]\)) 83.0018 Tj +(4069 a = \(uint*\)bp->data;) 126.6869 Tj 0 -218.3473 Td -(4070 bfree\(ip->dev, a[j]\);) 148.5295 Tj +(4070 for\(j = 0; j < NINDIRECT; j++\){) 174.7406 Tj 0 -227.8407 Td -(4071 }) 43.6851 Tj +(4071 if\(a[j]\)) 83.0018 Tj 0 -237.334 Td -(4072 brelse\(bp\);) 87.3703 Tj +(4072 bfree\(ip->dev, a[j]\);) 148.5295 Tj 0 -246.8274 Td -(4073 ip->addrs[INDIRECT] = 0;) 144.161 Tj +(4073 }) 43.6851 Tj 0 -256.3207 Td -(4074 }) 34.9481 Tj +(4074 brelse\(bp\);) 87.3703 Tj 0 -265.8141 Td -(4075 ) 21.8426 Tj +(4075 bfree\(ip->dev, ip->addrs[NDIRECT]\);) 192.2146 Tj 0 -275.3075 Td -(4076 ip->size = 0;) 87.3703 Tj +(4076 ip->addrs[NDIRECT] = 0;) 139.7925 Tj 0 -284.8008 Td -(4077 iupdate\(ip\);) 83.0018 Tj +(4077 }) 34.9481 Tj 0 -294.2942 Td -(4078 }) 26.2111 Tj +(4078 ) 21.8426 Tj 0 -303.7875 Td -(4079 ) 21.8426 Tj +(4079 ip->size = 0;) 87.3703 Tj 0 -313.2809 Td -(4080 // Copy stat information from inode.) 179.1091 Tj +(4080 iupdate\(ip\);) 83.0018 Tj 0 -322.7743 Td -(4081 void) 39.3166 Tj +(4081 }) 26.2111 Tj 0 -332.2676 Td -(4082 stati\(struct inode *ip, struct stat *st\)) 196.5831 Tj +(4082 ) 21.8426 Tj 0 -341.761 Td -(4083 {) 26.2111 Tj +(4083 // Copy stat information from inode.) 179.1091 Tj 0 -351.2543 Td -(4084 st->dev = ip->dev;) 109.2129 Tj +(4084 void) 39.3166 Tj 0 -360.7477 Td -(4085 st->ino = ip->inum;) 113.5814 Tj +(4085 stati\(struct inode *ip, struct stat *st\)) 196.5831 Tj 0 -370.2411 Td -(4086 st->type = ip->type;) 117.9499 Tj +(4086 {) 26.2111 Tj 0 -379.7344 Td -(4087 st->nlink = ip->nlink;) 126.6869 Tj +(4087 st->dev = ip->dev;) 109.2129 Tj 0 -389.2278 Td -(4088 st->size = ip->size;) 117.9499 Tj +(4088 st->ino = ip->inum;) 113.5814 Tj 0 -398.7211 Td -(4089 }) 26.2111 Tj +(4089 st->type = ip->type;) 117.9499 Tj 0 -408.2145 Td -(4090 ) 21.8426 Tj +(4090 st->nlink = ip->nlink;) 126.6869 Tj 0 -417.7079 Td -(4091 ) 21.8426 Tj +(4091 st->size = ip->size;) 117.9499 Tj 0 -427.2012 Td -(4092 ) 21.8426 Tj +(4092 }) 26.2111 Tj 0 -436.6946 Td (4093 ) 21.8426 Tj 0 -446.1879 Td @@ -14783,6 +14898,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -14800,7 +14917,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 10) 157.2665 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 10) 157.2665 Tj 0 -28.4801 Td (4100 // Read data from inode.) 126.6869 Tj 0 -37.9735 Td @@ -14841,7 +14958,7 @@ ajor].read\)) 318.9016 Tj 0 -199.3606 Td (4118 for\(tot=0; totdev, bmap\(ip, off/BSIZE, 0\)\);) 231.5313 Tj +(4119 bp = bread\(ip->dev, bmap\(ip, off/BSIZE\)\);) 218.4257 Tj 0 -218.3473 Td (4120 m = min\(n - tot, BSIZE - off%BSIZE\);) 196.5831 Tj 0 -227.8407 Td @@ -14920,7 +15037,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 11) 157.2665 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 11) 157.2665 Tj 0 -28.4801 Td (4150 // Write data to inode.) 122.3184 Tj 0 -37.9735 Td @@ -14949,7 +15066,7 @@ ajor].write\)) 323.2701 Tj 0 -142.4004 Td (4162 ) 21.8426 Tj 0 -151.8938 Td -(4163 if\(off + n < off\)) 104.8443 Tj +(4163 if\(off > ip->size || off + n < off\)) 183.4776 Tj 0 -161.3871 Td (4164 return -1;) 83.0018 Tj 0 -170.8805 Td @@ -14961,7 +15078,7 @@ ajor].write\)) 323.2701 Tj 0 -199.3606 Td (4168 for\(tot=0; totdev, bmap\(ip, off/BSIZE, 1\)\);) 231.5313 Tj +(4169 bp = bread\(ip->dev, bmap\(ip, off/BSIZE\)\);) 218.4257 Tj 0 -218.3473 Td (4170 m = min\(n - tot, BSIZE - off%BSIZE\);) 196.5831 Tj 0 -227.8407 Td @@ -15052,6 +15169,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -15069,7 +15188,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 12) 157.2665 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 12) 157.2665 Tj 0 -28.4801 Td (4200 // Directories) 83.0018 Tj 0 -37.9735 Td @@ -15115,7 +15234,7 @@ q 0 -227.8407 Td (4221 for\(off = 0; off < dp->size; off += BSIZE\){) 218.4257 Tj 0 -237.334 Td -(4222 bp = bread\(dp->dev, bmap\(dp, off / BSIZE, 0\)\);) 240.2683 Tj +(4222 bp = bread\(dp->dev, bmap\(dp, off / BSIZE\)\);) 227.1628 Tj 0 -246.8274 Td (4223 for\(de = \(struct dirent*\)bp->data;) 187.8461 Tj 0 -256.3207 Td @@ -15188,14 +15307,14 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 13) 157.2665 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 13) 157.2665 Tj 0 -28.4801 Td -(4250 // Write a new directory entry \(name, ino\) into the dire\ -ctory dp.) 305.796 Tj +(4250 // Write a new directory entry \(name, inum\) into the dir\ +ectory dp.) 310.1645 Tj 0 -37.9735 Td (4251 int) 34.9481 Tj 0 -47.4668 Td -(4252 dirlink\(struct inode *dp, char *name, uint ino\)) 227.1628 Tj +(4252 dirlink\(struct inode *dp, char *name, uint inum\)) 231.5313 Tj 0 -56.9602 Td (4253 {) 26.2111 Tj 0 -66.4535 Td @@ -15238,7 +15357,7 @@ zeof\(de\)\)) 283.9534 Tj 0 -237.334 Td (4272 strncpy\(de.name, name, DIRSIZ\);) 166.0035 Tj 0 -246.8274 Td -(4273 de.inum = ino;) 91.7388 Tj +(4273 de.inum = inum;) 96.1073 Tj 0 -256.3207 Td (4274 if\(writei\(dp, \(char*\)&de, off, sizeof\(de\)\) != siz\ eof\(de\)\)) 279.5849 Tj @@ -15322,6 +15441,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -15339,7 +15460,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 14) 157.2665 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 14) 157.2665 Tj 0 -28.4801 Td (4300 // Paths) 56.7907 Tj 0 -37.9735 Td @@ -15367,59 +15488,59 @@ a") 275.2164 Tj (4310 // skipelem\("///a//bb", name\) = "bb", setting name = "\ a") 275.2164 Tj 0 -132.9071 Td -(4311 // skipelem\("", name\) = skipelem\("////", name\) = 0) 249.0053 Tj +(4311 // skipelem\("a", name\) = "", setting name = "a") 235.8998 Tj 0 -142.4004 Td -(4312 //) 30.5796 Tj +(4312 // skipelem\("", name\) = skipelem\("////", name\) = 0) 249.0053 Tj 0 -151.8938 Td -(4313 static char*) 74.2647 Tj +(4313 //) 30.5796 Tj 0 -161.3871 Td -(4314 skipelem\(char *path, char *name\)) 161.635 Tj +(4314 static char*) 74.2647 Tj 0 -170.8805 Td -(4315 {) 26.2111 Tj +(4315 skipelem\(char *path, char *name\)) 161.635 Tj 0 -180.3739 Td -(4316 char *s;) 65.5277 Tj +(4316 {) 26.2111 Tj 0 -189.8672 Td -(4317 int len;) 65.5277 Tj +(4317 char *s;) 65.5277 Tj 0 -199.3606 Td -(4318 ) 21.8426 Tj +(4318 int len;) 65.5277 Tj 0 -208.8539 Td -(4319 while\(*path == '/'\)) 113.5814 Tj +(4319 ) 21.8426 Tj 0 -218.3473 Td -(4320 path++;) 69.8962 Tj +(4320 while\(*path == '/'\)) 113.5814 Tj 0 -227.8407 Td -(4321 if\(*path == 0\)) 91.7388 Tj +(4321 path++;) 69.8962 Tj 0 -237.334 Td -(4322 return 0;) 78.6333 Tj +(4322 if\(*path == 0\)) 91.7388 Tj 0 -246.8274 Td -(4323 s = path;) 69.8962 Tj +(4323 return 0;) 78.6333 Tj 0 -256.3207 Td -(4324 while\(*path != '/' && *path != 0\)) 174.7406 Tj +(4324 s = path;) 69.8962 Tj 0 -265.8141 Td -(4325 path++;) 69.8962 Tj +(4325 while\(*path != '/' && *path != 0\)) 174.7406 Tj 0 -275.3075 Td -(4326 len = path - s;) 96.1073 Tj +(4326 path++;) 69.8962 Tj 0 -284.8008 Td -(4327 if\(len >= DIRSIZ\)) 104.8443 Tj +(4327 len = path - s;) 96.1073 Tj 0 -294.2942 Td -(4328 memmove\(name, s, DIRSIZ\);) 148.5295 Tj +(4328 if\(len >= DIRSIZ\)) 104.8443 Tj 0 -303.7875 Td -(4329 else {) 56.7907 Tj +(4329 memmove\(name, s, DIRSIZ\);) 148.5295 Tj 0 -313.2809 Td -(4330 memmove\(name, s, len\);) 135.4239 Tj +(4330 else {) 56.7907 Tj 0 -322.7743 Td -(4331 name[len] = 0;) 100.4758 Tj +(4331 memmove\(name, s, len\);) 135.4239 Tj 0 -332.2676 Td -(4332 }) 34.9481 Tj +(4332 name[len] = 0;) 100.4758 Tj 0 -341.761 Td -(4333 while\(*path == '/'\)) 113.5814 Tj +(4333 }) 34.9481 Tj 0 -351.2543 Td -(4334 path++;) 69.8962 Tj +(4334 while\(*path == '/'\)) 113.5814 Tj 0 -360.7477 Td -(4335 return path;) 83.0018 Tj +(4335 path++;) 69.8962 Tj 0 -370.2411 Td -(4336 }) 26.2111 Tj +(4336 return path;) 83.0018 Tj 0 -379.7344 Td -(4337 ) 21.8426 Tj +(4337 }) 26.2111 Tj 0 -389.2278 Td (4338 ) 21.8426 Tj 0 -398.7211 Td @@ -15462,7 +15583,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/fs.c Page 15) 157.2665 Tj +(Aug 8 01:04 2009 xv6/fs.c Page 15) 157.2665 Tj 0 -28.4801 Td (4350 // Look up and return the inode for a path name.) 231.5313 Tj 0 -37.9735 Td @@ -15474,7 +15595,7 @@ y the final) 323.2701 Tj 0 -56.9602 Td (4353 static struct inode*) 109.2129 Tj 0 -66.4535 Td -(4354 _namei\(char *path, int parent, char *name\)) 205.3202 Tj +(4354 namex\(char *path, int nameiparent, char *name\)) 222.7942 Tj 0 -75.9469 Td (4355 {) 26.2111 Tj 0 -85.4403 Td @@ -15484,7 +15605,7 @@ y the final) 323.2701 Tj 0 -104.427 Td (4358 if\(*path == '/'\)) 100.4758 Tj 0 -113.9203 Td -(4359 ip = iget\(ROOTDEV, 1\);) 135.4239 Tj +(4359 ip = iget\(ROOTDEV, ROOTINO\);) 161.635 Tj 0 -123.4137 Td (4360 else) 48.0537 Tj 0 -132.9071 Td @@ -15504,7 +15625,7 @@ y the final) 323.2701 Tj 0 -199.3606 Td (4368 }) 43.6851 Tj 0 -208.8539 Td -(4369 if\(parent && *path == '\\0'\){) 161.635 Tj +(4369 if\(nameiparent && *path == '\\0'\){) 183.4776 Tj 0 -218.3473 Td (4370 // Stop one level early.) 152.898 Tj 0 -227.8407 Td @@ -15528,7 +15649,7 @@ y the final) 323.2701 Tj 0 -313.2809 Td (4380 }) 34.9481 Tj 0 -322.7743 Td -(4381 if\(parent\){) 78.6333 Tj +(4381 if\(nameiparent\){) 100.4758 Tj 0 -332.2676 Td (4382 iput\(ip\);) 78.6333 Tj 0 -341.761 Td @@ -15550,7 +15671,7 @@ y the final) 323.2701 Tj 0 -417.7079 Td (4391 char name[DIRSIZ];) 109.2129 Tj 0 -427.2012 Td -(4392 return _namei\(path, 0, name\);) 157.2665 Tj +(4392 return namex\(path, 0, name\);) 152.898 Tj 0 -436.6946 Td (4393 }) 26.2111 Tj 0 -446.1879 Td @@ -15562,7 +15683,7 @@ y the final) 323.2701 Tj 0 -474.668 Td (4397 {) 26.2111 Tj 0 -484.1614 Td -(4398 return _namei\(path, 1, name\);) 157.2665 Tj +(4398 return namex\(path, 1, name\);) 152.898 Tj 0 -493.6547 Td (4399 }) 26.2111 Tj 0 -522.1348 Td @@ -15595,6 +15716,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -15612,7 +15735,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/file.c Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/file.c Page 1) 161.635 Tj 0 -28.4801 Td (4400 #include "types.h") 100.4758 Tj 0 -37.9735 Td @@ -15624,61 +15747,61 @@ q 0 -66.4535 Td (4404 #include "spinlock.h") 113.5814 Tj 0 -75.9469 Td -(4405 #include "dev.h") 91.7388 Tj +(4405 ) 21.8426 Tj 0 -85.4403 Td -(4406 ) 21.8426 Tj +(4406 struct devsw devsw[NDEV];) 131.0554 Tj 0 -94.9336 Td -(4407 struct devsw devsw[NDEV];) 131.0554 Tj +(4407 struct {) 56.7907 Tj 0 -104.427 Td -(4408 struct spinlock file_table_lock;) 161.635 Tj +(4408 struct spinlock lock;) 122.3184 Tj 0 -113.9203 Td -(4409 struct file file[NFILE];) 126.6869 Tj +(4409 struct file file[NFILE];) 135.4239 Tj 0 -123.4137 Td -(4410 ) 21.8426 Tj +(4410 } ftable;) 61.1592 Tj 0 -132.9071 Td -(4411 void) 39.3166 Tj +(4411 ) 21.8426 Tj 0 -142.4004 Td -(4412 fileinit\(void\)) 83.0018 Tj +(4412 void) 39.3166 Tj 0 -151.8938 Td -(4413 {) 26.2111 Tj +(4413 fileinit\(void\)) 83.0018 Tj 0 -161.3871 Td -(4414 initlock\(&file_table_lock, "file_table"\);) 209.6887 Tj +(4414 {) 26.2111 Tj 0 -170.8805 Td -(4415 }) 26.2111 Tj +(4415 initlock\(&ftable.lock, "ftable"\);) 174.7406 Tj 0 -180.3739 Td -(4416 ) 21.8426 Tj +(4416 }) 26.2111 Tj 0 -189.8672 Td -(4417 // Allocate a file structure.) 148.5295 Tj +(4417 ) 21.8426 Tj 0 -199.3606 Td -(4418 struct file*) 74.2647 Tj +(4418 // Allocate a file structure.) 148.5295 Tj 0 -208.8539 Td -(4419 filealloc\(void\)) 87.3703 Tj +(4419 struct file*) 74.2647 Tj 0 -218.3473 Td -(4420 {) 26.2111 Tj +(4420 filealloc\(void\)) 87.3703 Tj 0 -227.8407 Td -(4421 int i;) 56.7907 Tj +(4421 {) 26.2111 Tj 0 -237.334 Td -(4422 ) 21.8426 Tj +(4422 struct file *f;) 96.1073 Tj 0 -246.8274 Td -(4423 acquire\(&file_table_lock\);) 144.161 Tj +(4423 ) 21.8426 Tj 0 -256.3207 Td -(4424 for\(i = 0; i < NFILE; i++\){) 148.5295 Tj +(4424 acquire\(&ftable.lock\);) 126.6869 Tj 0 -265.8141 Td -(4425 if\(file[i].type == FD_CLOSED\){) 170.3721 Tj +(4425 for\(f = ftable.file; f < ftable.file + NFILE; f++\){) 253.3738 Tj 0 -275.3075 Td -(4426 file[i].type = FD_NONE;) 148.5295 Tj +(4426 if\(f->ref == 0\){) 109.2129 Tj 0 -284.8008 Td -(4427 file[i].ref = 1;) 117.9499 Tj +(4427 f->ref = 1;) 96.1073 Tj 0 -294.2942 Td -(4428 release\(&file_table_lock\);) 161.635 Tj +(4428 release\(&ftable.lock\);) 144.161 Tj 0 -303.7875 Td -(4429 return file + i;) 117.9499 Tj +(4429 return f;) 87.3703 Tj 0 -313.2809 Td (4430 }) 43.6851 Tj 0 -322.7743 Td (4431 }) 34.9481 Tj 0 -332.2676 Td -(4432 release\(&file_table_lock\);) 144.161 Tj +(4432 release\(&ftable.lock\);) 126.6869 Tj 0 -341.761 Td (4433 return 0;) 69.8962 Tj 0 -351.2543 Td @@ -15694,15 +15817,15 @@ q 0 -398.7211 Td (4439 {) 26.2111 Tj 0 -408.2145 Td -(4440 acquire\(&file_table_lock\);) 144.161 Tj +(4440 acquire\(&ftable.lock\);) 126.6869 Tj 0 -417.7079 Td -(4441 if\(f->ref < 1 || f->type == FD_CLOSED\)) 196.5831 Tj +(4441 if\(f->ref < 1\)) 91.7388 Tj 0 -427.2012 Td (4442 panic\("filedup"\);) 113.5814 Tj 0 -436.6946 Td (4443 f->ref++;) 69.8962 Tj 0 -446.1879 Td -(4444 release\(&file_table_lock\);) 144.161 Tj +(4444 release\(&ftable.lock\);) 126.6869 Tj 0 -455.6813 Td (4445 return f;) 69.8962 Tj 0 -465.1747 Td @@ -15731,7 +15854,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/file.c Page 2) 161.635 Tj +(Aug 8 01:04 2009 xv6/file.c Page 2) 161.635 Tj 0 -28.4801 Td (4450 // Close file f. \(Decrement ref count, close when reache\ s 0.\)) 292.6905 Tj @@ -15746,15 +15869,15 @@ s 0.\)) 292.6905 Tj 0 -75.9469 Td (4455 ) 21.8426 Tj 0 -85.4403 Td -(4456 acquire\(&file_table_lock\);) 144.161 Tj +(4456 acquire\(&ftable.lock\);) 126.6869 Tj 0 -94.9336 Td -(4457 if\(f->ref < 1 || f->type == FD_CLOSED\)) 196.5831 Tj +(4457 if\(f->ref < 1\)) 91.7388 Tj 0 -104.427 Td (4458 panic\("fileclose"\);) 122.3184 Tj 0 -113.9203 Td (4459 if\(--f->ref > 0\){) 104.8443 Tj 0 -123.4137 Td -(4460 release\(&file_table_lock\);) 152.898 Tj +(4460 release\(&ftable.lock\);) 135.4239 Tj 0 -132.9071 Td (4461 return;) 69.8962 Tj 0 -142.4004 Td @@ -15764,9 +15887,9 @@ s 0.\)) 292.6905 Tj 0 -161.3871 Td (4464 f->ref = 0;) 78.6333 Tj 0 -170.8805 Td -(4465 f->type = FD_CLOSED;) 117.9499 Tj +(4465 f->type = FD_NONE;) 109.2129 Tj 0 -180.3739 Td -(4466 release\(&file_table_lock\);) 144.161 Tj +(4466 release\(&ftable.lock\);) 126.6869 Tj 0 -189.8672 Td (4467 ) 21.8426 Tj 0 -199.3606 Td @@ -15778,37 +15901,37 @@ s 0.\)) 292.6905 Tj 0 -227.8407 Td (4471 iput\(ff.ip\);) 91.7388 Tj 0 -237.334 Td -(4472 else) 48.0537 Tj +(4472 }) 26.2111 Tj 0 -246.8274 Td -(4473 panic\("fileclose"\);) 122.3184 Tj +(4473 ) 21.8426 Tj 0 -256.3207 Td -(4474 }) 26.2111 Tj +(4474 // Get metadata about file f.) 148.5295 Tj 0 -265.8141 Td -(4475 ) 21.8426 Tj +(4475 int) 34.9481 Tj 0 -275.3075 Td -(4476 // Get metadata about file f.) 148.5295 Tj +(4476 filestat\(struct file *f, struct stat *st\)) 200.9517 Tj 0 -284.8008 Td -(4477 int) 34.9481 Tj +(4477 {) 26.2111 Tj 0 -294.2942 Td -(4478 filestat\(struct file *f, struct stat *st\)) 200.9517 Tj +(4478 if\(f->type == FD_INODE\){) 135.4239 Tj 0 -303.7875 Td -(4479 {) 26.2111 Tj +(4479 ilock\(f->ip\);) 96.1073 Tj 0 -313.2809 Td -(4480 if\(f->type == FD_INODE\){) 135.4239 Tj +(4480 stati\(f->ip, st\);) 113.5814 Tj 0 -322.7743 Td -(4481 ilock\(f->ip\);) 96.1073 Tj +(4481 iunlock\(f->ip\);) 104.8443 Tj 0 -332.2676 Td -(4482 stati\(f->ip, st\);) 113.5814 Tj +(4482 return 0;) 78.6333 Tj 0 -341.761 Td -(4483 iunlock\(f->ip\);) 104.8443 Tj +(4483 }) 34.9481 Tj 0 -351.2543 Td -(4484 return 0;) 78.6333 Tj +(4484 return -1;) 74.2647 Tj 0 -360.7477 Td -(4485 }) 34.9481 Tj +(4485 }) 26.2111 Tj 0 -370.2411 Td -(4486 return -1;) 74.2647 Tj +(4486 ) 21.8426 Tj 0 -379.7344 Td -(4487 }) 26.2111 Tj +(4487 ) 21.8426 Tj 0 -389.2278 Td (4488 ) 21.8426 Tj 0 -398.7211 Td @@ -15863,6 +15986,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -15880,7 +16005,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/file.c Page 3) 161.635 Tj +(Aug 8 01:04 2009 xv6/file.c Page 3) 161.635 Tj 0 -28.4801 Td (4500 // Read from file f. Addr is kernel address.) 218.4257 Tj 0 -37.9735 Td @@ -15999,7 +16124,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 1) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 1) 174.7406 Tj 0 -28.4801 Td (4550 #include "types.h") 100.4758 Tj 0 -37.9735 Td @@ -16015,83 +16140,83 @@ q 0 -85.4403 Td (4556 #include "fs.h") 87.3703 Tj 0 -94.9336 Td -(4557 #include "fsvar.h") 100.4758 Tj +(4557 #include "file.h") 96.1073 Tj 0 -104.427 Td -(4558 #include "file.h") 96.1073 Tj +(4558 #include "fcntl.h") 100.4758 Tj 0 -113.9203 Td -(4559 #include "fcntl.h") 100.4758 Tj +(4559 ) 21.8426 Tj 0 -123.4137 Td -(4560 ) 21.8426 Tj -0 -132.9071 Td -(4561 // Fetch the nth word-sized system call argument as a file\ +(4560 // Fetch the nth word-sized system call argument as a file\ descriptor) 323.2701 Tj -0 -142.4004 Td -(4562 // and return both the descriptor and the corresponding st\ +0 -132.9071 Td +(4561 // and return both the descriptor and the corresponding st\ ruct file.) 318.9016 Tj +0 -142.4004 Td +(4562 static int) 65.5277 Tj 0 -151.8938 Td -(4563 static int) 65.5277 Tj +(4563 argfd\(int n, int *pfd, struct file **pf\)) 196.5831 Tj 0 -161.3871 Td -(4564 argfd\(int n, int *pfd, struct file **pf\)) 196.5831 Tj +(4564 {) 26.2111 Tj 0 -170.8805 Td -(4565 {) 26.2111 Tj +(4565 int fd;) 61.1592 Tj 0 -180.3739 Td -(4566 int fd;) 61.1592 Tj +(4566 struct file *f;) 96.1073 Tj 0 -189.8672 Td -(4567 struct file *f;) 96.1073 Tj +(4567 ) 21.8426 Tj 0 -199.3606 Td -(4568 ) 21.8426 Tj +(4568 if\(argint\(n, &fd\) < 0\)) 126.6869 Tj 0 -208.8539 Td -(4569 if\(argint\(n, &fd\) < 0\)) 126.6869 Tj +(4569 return -1;) 83.0018 Tj 0 -218.3473 Td -(4570 return -1;) 83.0018 Tj +(4570 if\(fd < 0 || fd >= NOFILE || \(f=cp->ofile[fd]\) == 0\)) 257.7424 Tj 0 -227.8407 Td -(4571 if\(fd < 0 || fd >= NOFILE || \(f=cp->ofile[fd]\) == 0\)) 257.7424 Tj +(4571 return -1;) 83.0018 Tj 0 -237.334 Td -(4572 return -1;) 83.0018 Tj +(4572 if\(pfd\)) 61.1592 Tj 0 -246.8274 Td -(4573 if\(pfd\)) 61.1592 Tj +(4573 *pfd = fd;) 83.0018 Tj 0 -256.3207 Td -(4574 *pfd = fd;) 83.0018 Tj +(4574 if\(pf\)) 56.7907 Tj 0 -265.8141 Td -(4575 if\(pf\)) 56.7907 Tj +(4575 *pf = f;) 74.2647 Tj 0 -275.3075 Td -(4576 *pf = f;) 74.2647 Tj +(4576 return 0;) 69.8962 Tj 0 -284.8008 Td -(4577 return 0;) 69.8962 Tj +(4577 }) 26.2111 Tj 0 -294.2942 Td -(4578 }) 26.2111 Tj +(4578 ) 21.8426 Tj 0 -303.7875 Td -(4579 ) 21.8426 Tj +(4579 // Allocate a file descriptor for the given file.) 235.8998 Tj 0 -313.2809 Td -(4580 // Allocate a file descriptor for the given file.) 235.8998 Tj +(4580 // Takes over file reference from caller on success.) 249.0053 Tj 0 -322.7743 Td -(4581 // Takes over file reference from caller on success.) 249.0053 Tj +(4581 static int) 65.5277 Tj 0 -332.2676 Td -(4582 static int) 65.5277 Tj +(4582 fdalloc\(struct file *f\)) 122.3184 Tj 0 -341.761 Td -(4583 fdalloc\(struct file *f\)) 122.3184 Tj +(4583 {) 26.2111 Tj 0 -351.2543 Td -(4584 {) 26.2111 Tj +(4584 int fd;) 61.1592 Tj 0 -360.7477 Td -(4585 int fd;) 61.1592 Tj +(4585 ) 21.8426 Tj 0 -370.2411 Td -(4586 ) 21.8426 Tj +(4586 for\(fd = 0; fd < NOFILE; fd++\){) 166.0035 Tj 0 -379.7344 Td -(4587 for\(fd = 0; fd < NOFILE; fd++\){) 166.0035 Tj +(4587 if\(cp->ofile[fd] == 0\){) 139.7925 Tj 0 -389.2278 Td -(4588 if\(cp->ofile[fd] == 0\){) 139.7925 Tj +(4588 cp->ofile[fd] = f;) 126.6869 Tj 0 -398.7211 Td -(4589 cp->ofile[fd] = f;) 126.6869 Tj +(4589 return fd;) 91.7388 Tj 0 -408.2145 Td -(4590 return fd;) 91.7388 Tj +(4590 }) 43.6851 Tj 0 -417.7079 Td -(4591 }) 43.6851 Tj +(4591 }) 34.9481 Tj 0 -427.2012 Td -(4592 }) 34.9481 Tj +(4592 return -1;) 74.2647 Tj 0 -436.6946 Td -(4593 return -1;) 74.2647 Tj +(4593 }) 26.2111 Tj 0 -446.1879 Td -(4594 }) 26.2111 Tj +(4594 ) 21.8426 Tj 0 -455.6813 Td (4595 ) 21.8426 Tj 0 -465.1747 Td @@ -16132,6 +16257,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -16149,81 +16276,81 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 2) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 2) 174.7406 Tj 0 -28.4801 Td (4600 int) 34.9481 Tj 0 -37.9735 Td -(4601 sys_read\(void\)) 83.0018 Tj +(4601 sys_dup\(void\)) 78.6333 Tj 0 -47.4668 Td (4602 {) 26.2111 Tj 0 -56.9602 Td (4603 struct file *f;) 96.1073 Tj 0 -66.4535 Td -(4604 int n;) 56.7907 Tj +(4604 int fd;) 61.1592 Tj 0 -75.9469 Td -(4605 char *p;) 65.5277 Tj +(4605 ) 21.8426 Tj 0 -85.4403 Td -(4606 ) 21.8426 Tj +(4606 if\(argfd\(0, 0, &f\) < 0\)) 131.0554 Tj 0 -94.9336 Td -(4607 if\(argfd\(0, 0, &f\) < 0 || argint\(2, &n\) < 0 || argp\ -tr\(1, &p, n\) < 0\)) 327.6386 Tj +(4607 return -1;) 83.0018 Tj 0 -104.427 Td -(4608 return -1;) 83.0018 Tj +(4608 if\(\(fd=fdalloc\(f\)\) < 0\)) 131.0554 Tj 0 -113.9203 Td -(4609 return fileread\(f, p, n\);) 139.7925 Tj +(4609 return -1;) 83.0018 Tj 0 -123.4137 Td -(4610 }) 26.2111 Tj +(4610 filedup\(f\);) 78.6333 Tj 0 -132.9071 Td -(4611 ) 21.8426 Tj +(4611 return fd;) 74.2647 Tj 0 -142.4004 Td -(4612 int) 34.9481 Tj +(4612 }) 26.2111 Tj 0 -151.8938 Td -(4613 sys_write\(void\)) 87.3703 Tj +(4613 ) 21.8426 Tj 0 -161.3871 Td -(4614 {) 26.2111 Tj +(4614 int) 34.9481 Tj 0 -170.8805 Td -(4615 struct file *f;) 96.1073 Tj +(4615 sys_read\(void\)) 83.0018 Tj 0 -180.3739 Td -(4616 int n;) 56.7907 Tj +(4616 {) 26.2111 Tj 0 -189.8672 Td -(4617 char *p;) 65.5277 Tj +(4617 struct file *f;) 96.1073 Tj 0 -199.3606 Td -(4618 ) 21.8426 Tj +(4618 int n;) 56.7907 Tj 0 -208.8539 Td -(4619 if\(argfd\(0, 0, &f\) < 0 || argint\(2, &n\) < 0 || argp\ -tr\(1, &p, n\) < 0\)) 327.6386 Tj +(4619 char *p;) 65.5277 Tj 0 -218.3473 Td -(4620 return -1;) 83.0018 Tj +(4620 ) 21.8426 Tj 0 -227.8407 Td -(4621 return filewrite\(f, p, n\);) 144.161 Tj +(4621 if\(argfd\(0, 0, &f\) < 0 || argint\(2, &n\) < 0 || argp\ +tr\(1, &p, n\) < 0\)) 327.6386 Tj 0 -237.334 Td -(4622 }) 26.2111 Tj +(4622 return -1;) 83.0018 Tj 0 -246.8274 Td -(4623 ) 21.8426 Tj +(4623 return fileread\(f, p, n\);) 139.7925 Tj 0 -256.3207 Td -(4624 int) 34.9481 Tj +(4624 }) 26.2111 Tj 0 -265.8141 Td -(4625 sys_dup\(void\)) 78.6333 Tj +(4625 ) 21.8426 Tj 0 -275.3075 Td -(4626 {) 26.2111 Tj +(4626 int) 34.9481 Tj 0 -284.8008 Td -(4627 struct file *f;) 96.1073 Tj +(4627 sys_write\(void\)) 87.3703 Tj 0 -294.2942 Td -(4628 int fd;) 61.1592 Tj +(4628 {) 26.2111 Tj 0 -303.7875 Td -(4629 ) 21.8426 Tj +(4629 struct file *f;) 96.1073 Tj 0 -313.2809 Td -(4630 if\(argfd\(0, 0, &f\) < 0\)) 131.0554 Tj +(4630 int n;) 56.7907 Tj 0 -322.7743 Td -(4631 return -1;) 83.0018 Tj +(4631 char *p;) 65.5277 Tj 0 -332.2676 Td -(4632 if\(\(fd=fdalloc\(f\)\) < 0\)) 131.0554 Tj +(4632 ) 21.8426 Tj 0 -341.761 Td -(4633 return -1;) 83.0018 Tj +(4633 if\(argfd\(0, 0, &f\) < 0 || argint\(2, &n\) < 0 || argp\ +tr\(1, &p, n\) < 0\)) 327.6386 Tj 0 -351.2543 Td -(4634 filedup\(f\);) 78.6333 Tj +(4634 return -1;) 83.0018 Tj 0 -360.7477 Td -(4635 return fd;) 74.2647 Tj +(4635 return filewrite\(f, p, n\);) 144.161 Tj 0 -370.2411 Td (4636 }) 26.2111 Tj 0 -379.7344 Td @@ -16270,7 +16397,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 3) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 3) 174.7406 Tj 0 -28.4801 Td (4650 int) 34.9481 Tj 0 -37.9735 Td @@ -16337,28 +16464,28 @@ zeof\(*st\)\) < 0\)) 314.533 Tj 0 -322.7743 Td (4681 if\(\(dp = nameiparent\(new, name\)\) == 0\)) 196.5831 Tj 0 -332.2676 Td -(4682 goto bad;) 83.0018 Tj +(4682 goto bad;) 78.6333 Tj 0 -341.761 Td (4683 ilock\(dp\);) 74.2647 Tj 0 -351.2543 Td (4684 if\(dp->dev != ip->dev || dirlink\(dp, name, ip->inum\) \ -< 0\)) 279.5849 Tj +< 0\){) 283.9534 Tj 0 -360.7477 Td -(4685 goto bad;) 78.6333 Tj +(4685 iunlockput\(dp\);) 104.8443 Tj 0 -370.2411 Td -(4686 iunlockput\(dp\);) 96.1073 Tj +(4686 goto bad;) 78.6333 Tj 0 -379.7344 Td -(4687 iput\(ip\);) 69.8962 Tj +(4687 }) 34.9481 Tj 0 -389.2278 Td -(4688 return 0;) 69.8962 Tj +(4688 iunlockput\(dp\);) 96.1073 Tj 0 -398.7211 Td -(4689 ) 21.8426 Tj +(4689 iput\(ip\);) 69.8962 Tj 0 -408.2145 Td -(4690 bad:) 39.3166 Tj +(4690 return 0;) 69.8962 Tj 0 -417.7079 Td -(4691 if\(dp\)) 56.7907 Tj +(4691 ) 21.8426 Tj 0 -427.2012 Td -(4692 iunlockput\(dp\);) 104.8443 Tj +(4692 bad:) 39.3166 Tj 0 -436.6946 Td (4693 ilock\(ip\);) 74.2647 Tj 0 -446.1879 Td @@ -16403,6 +16530,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -16420,7 +16549,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 4) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 4) 174.7406 Tj 0 -28.4801 Td (4700 // Is the directory dp empty except for "." and ".." ?) 257.7424 Tj 0 -37.9735 Td @@ -16541,7 +16670,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 5) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 5) 174.7406 Tj 0 -28.4801 Td (4750 int) 34.9481 Tj 0 -37.9735 Td @@ -16619,27 +16748,27 @@ eof\(de\)\)) 279.5849 Tj 0 -370.2411 Td (4786 panic\("unlink: writei"\);) 144.161 Tj 0 -379.7344 Td -(4787 iunlockput\(dp\);) 96.1073 Tj +(4787 if\(ip->type == T_DIR\){) 126.6869 Tj 0 -389.2278 Td -(4788 ) 21.8426 Tj +(4788 dp->nlink--;) 91.7388 Tj 0 -398.7211 Td -(4789 ip->nlink--;) 83.0018 Tj +(4789 iupdate\(dp\);) 91.7388 Tj 0 -408.2145 Td -(4790 iupdate\(ip\);) 83.0018 Tj +(4790 }) 34.9481 Tj 0 -417.7079 Td -(4791 iunlockput\(ip\);) 96.1073 Tj +(4791 iunlockput\(dp\);) 96.1073 Tj 0 -427.2012 Td -(4792 return 0;) 69.8962 Tj +(4792 ) 21.8426 Tj 0 -436.6946 Td -(4793 }) 26.2111 Tj +(4793 ip->nlink--;) 83.0018 Tj 0 -446.1879 Td -(4794 ) 21.8426 Tj +(4794 iupdate\(ip\);) 83.0018 Tj 0 -455.6813 Td -(4795 ) 21.8426 Tj +(4795 iunlockput\(ip\);) 96.1073 Tj 0 -465.1747 Td -(4796 ) 21.8426 Tj +(4796 return 0;) 69.8962 Tj 0 -474.668 Td -(4797 ) 21.8426 Tj +(4797 }) 26.2111 Tj 0 -484.1614 Td (4798 ) 21.8426 Tj 0 -493.6547 Td @@ -16674,6 +16803,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -16691,12 +16822,11 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 6) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 6) 174.7406 Tj 0 -28.4801 Td (4800 static struct inode*) 109.2129 Tj 0 -37.9735 Td -(4801 create\(char *path, int canexist, short type, short major,\ - short minor\)) 327.6386 Tj +(4801 create\(char *path, short type, short major, short minor\)) 266.4794 Tj 0 -47.4668 Td (4802 {) 26.2111 Tj 0 -56.9602 Td @@ -16716,82 +16846,80 @@ q 0 -123.4137 Td (4810 ) 21.8426 Tj 0 -132.9071 Td -(4811 if\(canexist && \(ip = dirlookup\(dp, name, &off\)\) != \ -0\){) 266.4794 Tj +(4811 if\(\(ip = dirlookup\(dp, name, &off\)\) != 0\){) 214.0572 Tj 0 -142.4004 Td (4812 iunlockput\(dp\);) 104.8443 Tj 0 -151.8938 Td (4813 ilock\(ip\);) 83.0018 Tj 0 -161.3871 Td -(4814 if\(ip->type != type || ip->major != major || ip->mino\ -r != minor\){) 323.2701 Tj +(4814 if\(type == T_FILE && ip->type == T_FILE\)) 214.0572 Tj 0 -170.8805 Td -(4815 iunlockput\(ip\);) 113.5814 Tj +(4815 return ip;) 91.7388 Tj 0 -180.3739 Td -(4816 return 0;) 87.3703 Tj +(4816 iunlockput\(ip\);) 104.8443 Tj 0 -189.8672 Td -(4817 }) 43.6851 Tj +(4817 return 0;) 78.6333 Tj 0 -199.3606 Td -(4818 return ip;) 83.0018 Tj +(4818 }) 34.9481 Tj 0 -208.8539 Td -(4819 }) 34.9481 Tj +(4819 ) 21.8426 Tj 0 -218.3473 Td -(4820 ) 21.8426 Tj +(4820 if\(\(ip = ialloc\(dp->dev, type\)\) == 0\)) 192.2146 Tj 0 -227.8407 Td -(4821 if\(\(ip = ialloc\(dp->dev, type\)\) == 0\){) 196.5831 Tj +(4821 panic\("create: ialloc"\);) 144.161 Tj 0 -237.334 Td -(4822 iunlockput\(dp\);) 104.8443 Tj +(4822 ) 21.8426 Tj 0 -246.8274 Td -(4823 return 0;) 78.6333 Tj +(4823 ilock\(ip\);) 74.2647 Tj 0 -256.3207 Td -(4824 }) 34.9481 Tj +(4824 ip->major = major;) 109.2129 Tj 0 -265.8141 Td -(4825 ilock\(ip\);) 74.2647 Tj +(4825 ip->minor = minor;) 109.2129 Tj 0 -275.3075 Td -(4826 ip->major = major;) 109.2129 Tj +(4826 ip->nlink = 1;) 91.7388 Tj 0 -284.8008 Td -(4827 ip->minor = minor;) 109.2129 Tj +(4827 iupdate\(ip\);) 83.0018 Tj 0 -294.2942 Td -(4828 ip->nlink = 1;) 91.7388 Tj +(4828 ) 21.8426 Tj 0 -303.7875 Td -(4829 iupdate\(ip\);) 83.0018 Tj +(4829 if\(type == T_DIR\){ // Create . and .. entries.) 235.8998 Tj 0 -313.2809 Td -(4830 ) 21.8426 Tj +(4830 dp->nlink++; // for "..") 148.5295 Tj 0 -322.7743 Td -(4831 if\(dirlink\(dp, name, ip->inum\) < 0\){) 187.8461 Tj +(4831 iupdate\(dp\);) 91.7388 Tj 0 -332.2676 Td -(4832 ip->nlink = 0;) 100.4758 Tj +(4832 // No ip->nlink++ for ".": avoid cyclic ref count.) 257.7424 Tj 0 -341.761 Td -(4833 iunlockput\(ip\);) 104.8443 Tj -0 -351.2543 Td -(4834 iunlockput\(dp\);) 104.8443 Tj -0 -360.7477 Td -(4835 return 0;) 78.6333 Tj -0 -370.2411 Td -(4836 }) 34.9481 Tj -0 -379.7344 Td -(4837 ) 21.8426 Tj -0 -389.2278 Td -(4838 if\(type == T_DIR\){ // Create . and .. entries.) 235.8998 Tj -0 -398.7211 Td -(4839 dp->nlink++; // for "..") 148.5295 Tj -0 -408.2145 Td -(4840 iupdate\(dp\);) 91.7388 Tj -0 -417.7079 Td -(4841 // No ip->nlink++ for ".": avoid cyclic ref count.) 257.7424 Tj -0 -427.2012 Td -(4842 if\(dirlink\(ip, ".", ip->inum\) < 0 || dirlink\(ip, "\ +(4833 if\(dirlink\(ip, ".", ip->inum\) < 0 || dirlink\(ip, "\ ..", dp->inum\) < 0\)) 340.7441 Tj +0 -351.2543 Td +(4834 panic\("create dots"\);) 139.7925 Tj +0 -360.7477 Td +(4835 }) 34.9481 Tj +0 -370.2411 Td +(4836 ) 21.8426 Tj +0 -379.7344 Td +(4837 if\(dirlink\(dp, name, ip->inum\) < 0\)) 183.4776 Tj +0 -389.2278 Td +(4838 panic\("create: dirlink"\);) 148.5295 Tj +0 -398.7211 Td +(4839 ) 21.8426 Tj +0 -408.2145 Td +(4840 iunlockput\(dp\);) 96.1073 Tj +0 -417.7079 Td +(4841 return ip;) 74.2647 Tj +0 -427.2012 Td +(4842 }) 26.2111 Tj 0 -436.6946 Td -(4843 panic\("create dots"\);) 139.7925 Tj +(4843 ) 21.8426 Tj 0 -446.1879 Td -(4844 }) 34.9481 Tj +(4844 ) 21.8426 Tj 0 -455.6813 Td -(4845 iunlockput\(dp\);) 96.1073 Tj +(4845 ) 21.8426 Tj 0 -465.1747 Td -(4846 return ip;) 74.2647 Tj +(4846 ) 21.8426 Tj 0 -474.668 Td -(4847 }) 26.2111 Tj +(4847 ) 21.8426 Tj 0 -484.1614 Td (4848 ) 21.8426 Tj 0 -493.6547 Td @@ -16814,7 +16942,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 7) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 7) 174.7406 Tj 0 -28.4801 Td (4850 int) 34.9481 Tj 0 -37.9735 Td @@ -16840,7 +16968,7 @@ q 0 -132.9071 Td (4861 if\(omode & O_CREATE\){) 122.3184 Tj 0 -142.4004 Td -(4862 if\(\(ip = create\(path, 1, T_FILE, 0, 0\)\) == 0\)) 235.8998 Tj +(4862 if\(\(ip = create\(path, T_FILE, 0, 0\)\) == 0\)) 222.7942 Tj 0 -151.8938 Td (4863 return -1;) 91.7388 Tj 0 -161.3871 Td @@ -16852,8 +16980,7 @@ q 0 -189.8672 Td (4867 ilock\(ip\);) 83.0018 Tj 0 -199.3606 Td -(4868 if\(ip->type == T_DIR && \(omode & \(O_RDWR|O_WRONLY\)\ -\)\){) 270.8479 Tj +(4868 if\(ip->type == T_DIR && omode != O_RDONLY\){) 227.1628 Tj 0 -208.8539 Td (4869 iunlockput\(ip\);) 113.5814 Tj 0 -218.3473 Td @@ -16948,6 +17075,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -16965,56 +17094,56 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 8) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 8) 174.7406 Tj 0 -28.4801 Td (4900 int) 34.9481 Tj 0 -37.9735 Td -(4901 sys_mknod\(void\)) 87.3703 Tj +(4901 sys_mkdir\(void\)) 87.3703 Tj 0 -47.4668 Td (4902 {) 26.2111 Tj 0 -56.9602 Td -(4903 struct inode *ip;) 104.8443 Tj +(4903 char *path;) 78.6333 Tj 0 -66.4535 Td -(4904 char *path;) 78.6333 Tj +(4904 struct inode *ip;) 104.8443 Tj 0 -75.9469 Td -(4905 int len;) 65.5277 Tj +(4905 ) 21.8426 Tj 0 -85.4403 Td -(4906 int major, minor;) 104.8443 Tj +(4906 if\(argstr\(0, &path\) < 0 || \(ip = create\(path, T_DIR\ +, 0, 0\)\) == 0\)) 314.533 Tj 0 -94.9336 Td -(4907 ) 21.8426 Tj +(4907 return -1;) 83.0018 Tj 0 -104.427 Td -(4908 if\(\(len=argstr\(0, &path\)\) < 0 ||) 170.3721 Tj +(4908 iunlockput\(ip\);) 96.1073 Tj 0 -113.9203 Td -(4909 argint\(1, &major\) < 0 ||) 148.5295 Tj +(4909 return 0;) 69.8962 Tj 0 -123.4137 Td -(4910 argint\(2, &minor\) < 0 ||) 148.5295 Tj +(4910 }) 26.2111 Tj 0 -132.9071 Td -(4911 \(ip = create\(path, 0, T_DEV, major, minor\)\) == 0\)) 257.7424 Tj +(4911 ) 21.8426 Tj 0 -142.4004 Td -(4912 return -1;) 83.0018 Tj +(4912 int) 34.9481 Tj 0 -151.8938 Td -(4913 iunlockput\(ip\);) 96.1073 Tj +(4913 sys_mknod\(void\)) 87.3703 Tj 0 -161.3871 Td -(4914 return 0;) 69.8962 Tj +(4914 {) 26.2111 Tj 0 -170.8805 Td -(4915 }) 26.2111 Tj +(4915 struct inode *ip;) 104.8443 Tj 0 -180.3739 Td -(4916 ) 21.8426 Tj +(4916 char *path;) 78.6333 Tj 0 -189.8672 Td -(4917 int) 34.9481 Tj +(4917 int len;) 65.5277 Tj 0 -199.3606 Td -(4918 sys_mkdir\(void\)) 87.3703 Tj +(4918 int major, minor;) 104.8443 Tj 0 -208.8539 Td -(4919 {) 26.2111 Tj +(4919 ) 21.8426 Tj 0 -218.3473 Td -(4920 char *path;) 78.6333 Tj +(4920 if\(\(len=argstr\(0, &path\)\) < 0 ||) 170.3721 Tj 0 -227.8407 Td -(4921 struct inode *ip;) 104.8443 Tj +(4921 argint\(1, &major\) < 0 ||) 148.5295 Tj 0 -237.334 Td -(4922 ) 21.8426 Tj +(4922 argint\(2, &minor\) < 0 ||) 148.5295 Tj 0 -246.8274 Td -(4923 if\(argstr\(0, &path\) < 0 || \(ip = create\(path, 0, T_\ -DIR, 0, 0\)\) == 0\)) 327.6386 Tj +(4923 \(ip = create\(path, T_DEV, major, minor\)\) == 0\)) 244.6368 Tj 0 -256.3207 Td (4924 return -1;) 83.0018 Tj 0 -265.8141 Td @@ -17086,7 +17215,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sysfile.c Page 9) 174.7406 Tj +(Aug 8 01:04 2009 xv6/sysfile.c Page 9) 174.7406 Tj 0 -28.4801 Td (4950 int) 34.9481 Tj 0 -37.9735 Td @@ -17219,6 +17348,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -17236,7 +17367,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/exec.c Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/exec.c Page 1) 161.635 Tj 0 -28.4801 Td (5000 #include "types.h") 100.4758 Tj 0 -37.9735 Td @@ -17264,7 +17395,7 @@ q 0 -142.4004 Td (5012 int i, argc, arglen, len, off;) 161.635 Tj 0 -151.8938 Td -(5013 uint sz, sp, argp;) 109.2129 Tj +(5013 uint sz, sp, argp, x;) 122.3184 Tj 0 -161.3871 Td (5014 struct elfhdr elf;) 109.2129 Tj 0 -170.8805 Td @@ -17274,72 +17405,72 @@ q 0 -189.8672 Td (5017 ) 21.8426 Tj 0 -199.3606 Td -(5018 if\(\(ip = namei\(path\)\) == 0\)) 148.5295 Tj +(5018 mem = 0;) 65.5277 Tj 0 -208.8539 Td -(5019 return -1;) 83.0018 Tj +(5019 sz = 0;) 61.1592 Tj 0 -218.3473 Td -(5020 ilock\(ip\);) 74.2647 Tj +(5020 ) 21.8426 Tj 0 -227.8407 Td -(5021 ) 21.8426 Tj +(5021 if\(\(ip = namei\(path\)\) == 0\)) 148.5295 Tj 0 -237.334 Td -(5022 // Compute memory size of new process.) 196.5831 Tj +(5022 return -1;) 83.0018 Tj 0 -246.8274 Td -(5023 mem = 0;) 65.5277 Tj +(5023 ilock\(ip\);) 74.2647 Tj 0 -256.3207 Td -(5024 sz = 0;) 61.1592 Tj +(5024 ) 21.8426 Tj 0 -265.8141 Td -(5025 ) 21.8426 Tj +(5025 // Check ELF header) 113.5814 Tj 0 -275.3075 Td -(5026 // Program segments.) 117.9499 Tj -0 -284.8008 Td -(5027 if\(readi\(ip, \(char*\)&elf, 0, sizeof\(elf\)\) < sizeo\ +(5026 if\(readi\(ip, \(char*\)&elf, 0, sizeof\(elf\)\) < sizeo\ f\(elf\)\)) 275.2164 Tj +0 -284.8008 Td +(5027 goto bad;) 78.6333 Tj 0 -294.2942 Td -(5028 goto bad;) 78.6333 Tj +(5028 if\(elf.magic != ELF_MAGIC\)) 144.161 Tj 0 -303.7875 Td -(5029 if\(elf.magic != ELF_MAGIC\)) 144.161 Tj +(5029 goto bad;) 78.6333 Tj 0 -313.2809 Td -(5030 goto bad;) 78.6333 Tj +(5030 ) 21.8426 Tj 0 -322.7743 Td -(5031 for\(i=0, off=elf.phoff; i sz\)) 148.5295 Tj +(5063 // Load program into memory.) 152.898 Tj 0 -161.3871 Td -(5064 goto bad;) 87.3703 Tj +(5064 for\(i=0, off=elf.phoff; i sz\)) 270.8479 Tj 0 -218.3473 Td -(5070 ) 21.8426 Tj +(5070 goto bad;) 87.3703 Tj 0 -227.8407 Td -(5071 // Initialize stack.) 117.9499 Tj +(5071 if\(ph.memsz < ph.filesz\)) 144.161 Tj 0 -237.334 Td -(5072 sp = sz;) 65.5277 Tj +(5072 goto bad;) 87.3703 Tj 0 -246.8274 Td -(5073 argp = sz - arglen - 4*\(argc+1\);) 170.3721 Tj +(5073 if\(readi\(ip, mem + ph.va, ph.offset, ph.filesz\) != \ +ph.filesz\)) 305.796 Tj 0 -256.3207 Td -(5074 ) 21.8426 Tj +(5074 goto bad;) 87.3703 Tj 0 -265.8141 Td -(5075 // Copy argv strings and pointers to stack.) 218.4257 Tj +(5075 memset\(mem + ph.va + ph.filesz, 0, ph.memsz - ph.file\ +sz\);) 288.322 Tj 0 -275.3075 Td -(5076 *\(uint*\)\(mem+argp + 4*argc\) = 0; // argv[argc]) 235.8998 Tj +(5076 }) 34.9481 Tj 0 -284.8008 Td -(5077 for\(i=argc-1; i>=0; i--\){) 139.7925 Tj +(5077 iunlockput\(ip\);) 96.1073 Tj 0 -294.2942 Td -(5078 len = strlen\(argv[i]\) + 1;) 152.898 Tj +(5078 ) 21.8426 Tj 0 -303.7875 Td -(5079 sp -= len;) 83.0018 Tj +(5079 // Initialize stack.) 117.9499 Tj 0 -313.2809 Td -(5080 memmove\(mem+sp, argv[i], len\);) 170.3721 Tj +(5080 sp = sz;) 65.5277 Tj 0 -322.7743 Td -(5081 *\(uint*\)\(mem+argp + 4*i\) = sp; // argv[i]) 222.7942 Tj +(5081 argp = sz - arglen - 4*\(argc+1\);) 170.3721 Tj 0 -332.2676 Td -(5082 }) 34.9481 Tj +(5082 ) 21.8426 Tj 0 -341.761 Td -(5083 ) 21.8426 Tj +(5083 // Copy argv strings and pointers to stack.) 218.4257 Tj 0 -351.2543 Td -(5084 // Stack frame for main\(argc, argv\), below arguments.) 262.1109 Tj +(5084 *\(uint*\)\(mem+argp + 4*argc\) = 0; // argv[argc]) 235.8998 Tj 0 -360.7477 Td -(5085 sp = argp;) 74.2647 Tj +(5085 for\(i=argc-1; i>=0; i--\){) 139.7925 Tj 0 -370.2411 Td -(5086 sp -= 4;) 65.5277 Tj +(5086 len = strlen\(argv[i]\) + 1;) 152.898 Tj 0 -379.7344 Td -(5087 *\(uint*\)\(mem+sp\) = argp;) 135.4239 Tj +(5087 sp -= len;) 83.0018 Tj 0 -389.2278 Td -(5088 sp -= 4;) 65.5277 Tj +(5088 memmove\(mem+sp, argv[i], len\);) 170.3721 Tj 0 -398.7211 Td -(5089 *\(uint*\)\(mem+sp\) = argc;) 135.4239 Tj +(5089 *\(uint*\)\(mem+argp + 4*i\) = sp; // argv[i]) 222.7942 Tj 0 -408.2145 Td -(5090 sp -= 4;) 65.5277 Tj +(5090 }) 34.9481 Tj 0 -417.7079 Td -(5091 *\(uint*\)\(mem+sp\) = 0xffffffff; // fake return pc) 249.0053 Tj +(5091 ) 21.8426 Tj 0 -427.2012 Td -(5092 ) 21.8426 Tj +(5092 // Stack frame for main\(argc, argv\), below arguments.) 262.1109 Tj 0 -436.6946 Td -(5093 // Save program name for debugging.) 183.4776 Tj +(5093 sp = argp;) 74.2647 Tj 0 -446.1879 Td -(5094 for\(last=s=path; *s; s++\)) 139.7925 Tj +(5094 sp -= 4;) 65.5277 Tj 0 -455.6813 Td -(5095 if\(*s == '/'\)) 96.1073 Tj +(5095 *\(uint*\)\(mem+sp\) = argp;) 135.4239 Tj 0 -465.1747 Td -(5096 last = s+1;) 96.1073 Tj +(5096 sp -= 4;) 65.5277 Tj 0 -474.668 Td -(5097 safestrcpy\(cp->name, last, sizeof\(cp->name\)\);) 227.1628 Tj +(5097 *\(uint*\)\(mem+sp\) = argc;) 135.4239 Tj 0 -484.1614 Td -(5098 ) 21.8426 Tj +(5098 sp -= 4;) 65.5277 Tj 0 -493.6547 Td -(5099 ) 21.8426 Tj +(5099 *\(uint*\)\(mem+sp\) = 0xffffffff; // fake return pc) 249.0053 Tj 0 -522.1348 Td (Sheet 50) 34.9481 Tj Q @@ -17493,6 +17624,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -17510,49 +17643,49 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/exec.c Page 3) 161.635 Tj +(Aug 8 01:04 2009 xv6/exec.c Page 3) 161.635 Tj 0 -28.4801 Td -(5100 // Commit to the new image.) 148.5295 Tj +(5100 // Save program name for debugging.) 183.4776 Tj 0 -37.9735 Td -(5101 kfree\(cp->mem, cp->sz\);) 131.0554 Tj +(5101 for\(last=s=path; *s; s++\)) 139.7925 Tj 0 -47.4668 Td -(5102 cp->mem = mem;) 91.7388 Tj +(5102 if\(*s == '/'\)) 96.1073 Tj 0 -56.9602 Td -(5103 cp->sz = sz;) 83.0018 Tj +(5103 last = s+1;) 96.1073 Tj 0 -66.4535 Td -(5104 cp->tf->eip = elf.entry; // main) 174.7406 Tj +(5104 safestrcpy\(cp->name, last, sizeof\(cp->name\)\);) 227.1628 Tj 0 -75.9469 Td -(5105 cp->tf->esp = sp;) 104.8443 Tj +(5105 ) 21.8426 Tj 0 -85.4403 Td -(5106 setupsegs\(cp\);) 91.7388 Tj +(5106 // Commit to the new image.) 148.5295 Tj 0 -94.9336 Td -(5107 return 0;) 69.8962 Tj +(5107 kfree\(cp->mem, cp->sz\);) 131.0554 Tj 0 -104.427 Td -(5108 ) 21.8426 Tj +(5108 cp->mem = mem;) 91.7388 Tj 0 -113.9203 Td -(5109 bad:) 43.6851 Tj +(5109 cp->sz = sz;) 83.0018 Tj 0 -123.4137 Td -(5110 if\(mem\)) 61.1592 Tj +(5110 cp->tf->eip = elf.entry; // main) 174.7406 Tj 0 -132.9071 Td -(5111 kfree\(mem, sz\);) 104.8443 Tj +(5111 cp->tf->esp = sp;) 104.8443 Tj 0 -142.4004 Td -(5112 iunlockput\(ip\);) 96.1073 Tj +(5112 usegment\(\);) 78.6333 Tj 0 -151.8938 Td -(5113 return -1;) 74.2647 Tj +(5113 return 0;) 69.8962 Tj 0 -161.3871 Td -(5114 }) 26.2111 Tj +(5114 ) 21.8426 Tj 0 -170.8805 Td -(5115 ) 21.8426 Tj +(5115 bad:) 43.6851 Tj 0 -180.3739 Td -(5116 ) 21.8426 Tj +(5116 if\(mem\)) 61.1592 Tj 0 -189.8672 Td -(5117 ) 21.8426 Tj +(5117 kfree\(mem, sz\);) 104.8443 Tj 0 -199.3606 Td -(5118 ) 21.8426 Tj +(5118 iunlockput\(ip\);) 96.1073 Tj 0 -208.8539 Td -(5119 ) 21.8426 Tj +(5119 return -1;) 74.2647 Tj 0 -218.3473 Td -(5120 ) 21.8426 Tj +(5120 }) 26.2111 Tj 0 -227.8407 Td (5121 ) 21.8426 Tj 0 -237.334 Td @@ -17629,7 +17762,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/pipe.c Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/pipe.c Page 1) 161.635 Tj 0 -28.4801 Td (5150 #include "types.h") 100.4758 Tj 0 -37.9735 Td @@ -17653,17 +17786,17 @@ q 0 -123.4137 Td (5160 struct pipe {) 78.6333 Tj 0 -132.9071 Td -(5161 int readopen; // read fd is still open) 205.3202 Tj +(5161 struct spinlock lock;) 122.3184 Tj 0 -142.4004 Td -(5162 int writeopen; // write fd is still open) 209.6887 Tj +(5162 char data[PIPESIZE];) 117.9499 Tj 0 -151.8938 Td -(5163 uint writep; // next index to write) 196.5831 Tj +(5163 uint nread; // number of bytes read) 200.9517 Tj 0 -161.3871 Td -(5164 uint readp; // next index to read) 192.2146 Tj +(5164 uint nwrite; // number of bytes written) 214.0572 Tj 0 -170.8805 Td -(5165 struct spinlock lock;) 122.3184 Tj +(5165 int readopen; // read fd is still open) 205.3202 Tj 0 -180.3739 Td -(5166 char data[PIPESIZE];) 117.9499 Tj +(5166 int writeopen; // write fd is still open) 209.6887 Tj 0 -189.8672 Td (5167 };) 30.5796 Tj 0 -199.3606 Td @@ -17696,9 +17829,9 @@ q 0 -322.7743 Td (5181 p->writeopen = 1;) 104.8443 Tj 0 -332.2676 Td -(5182 p->writep = 0;) 91.7388 Tj +(5182 p->nwrite = 0;) 91.7388 Tj 0 -341.761 Td -(5183 p->readp = 0;) 87.3703 Tj +(5183 p->nread = 0;) 87.3703 Tj 0 -351.2543 Td (5184 initlock\(&p->lock, "pipe"\);) 148.5295 Tj 0 -360.7477 Td @@ -17761,6 +17894,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -17778,7 +17913,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/pipe.c Page 2) 161.635 Tj +(Aug 8 01:04 2009 xv6/pipe.c Page 2) 161.635 Tj 0 -28.4801 Td (5200 bad:) 43.6851 Tj 0 -37.9735 Td @@ -17786,99 +17921,99 @@ q 0 -47.4668 Td (5202 kfree\(\(char*\)p, PAGE\);) 135.4239 Tj 0 -56.9602 Td -(5203 if\(*f0\){) 65.5277 Tj +(5203 if\(*f0\)) 61.1592 Tj 0 -66.4535 Td -(5204 \(*f0\)->type = FD_NONE;) 135.4239 Tj +(5204 fileclose\(*f0\);) 104.8443 Tj 0 -75.9469 Td -(5205 fileclose\(*f0\);) 104.8443 Tj +(5205 if\(*f1\)) 61.1592 Tj 0 -85.4403 Td -(5206 }) 34.9481 Tj +(5206 fileclose\(*f1\);) 104.8443 Tj 0 -94.9336 Td -(5207 if\(*f1\){) 65.5277 Tj +(5207 return -1;) 74.2647 Tj 0 -104.427 Td -(5208 \(*f1\)->type = FD_NONE;) 135.4239 Tj +(5208 }) 26.2111 Tj 0 -113.9203 Td -(5209 fileclose\(*f1\);) 104.8443 Tj +(5209 ) 21.8426 Tj 0 -123.4137 Td -(5210 }) 34.9481 Tj +(5210 void) 39.3166 Tj 0 -132.9071 Td -(5211 return -1;) 74.2647 Tj +(5211 pipeclose\(struct pipe *p, int writable\)) 192.2146 Tj 0 -142.4004 Td -(5212 }) 26.2111 Tj +(5212 {) 26.2111 Tj 0 -151.8938 Td -(5213 ) 21.8426 Tj +(5213 acquire\(&p->lock\);) 109.2129 Tj 0 -161.3871 Td -(5214 void) 39.3166 Tj +(5214 if\(writable\){) 87.3703 Tj 0 -170.8805 Td -(5215 pipeclose\(struct pipe *p, int writable\)) 192.2146 Tj +(5215 p->writeopen = 0;) 113.5814 Tj 0 -180.3739 Td -(5216 {) 26.2111 Tj +(5216 wakeup\(&p->nread\);) 117.9499 Tj 0 -189.8672 Td -(5217 acquire\(&p->lock\);) 109.2129 Tj +(5217 } else {) 65.5277 Tj 0 -199.3606 Td -(5218 if\(writable\){) 87.3703 Tj +(5218 p->readopen = 0;) 109.2129 Tj 0 -208.8539 Td -(5219 p->writeopen = 0;) 113.5814 Tj +(5219 wakeup\(&p->nwrite\);) 122.3184 Tj 0 -218.3473 Td -(5220 wakeup\(&p->readp\);) 117.9499 Tj +(5220 }) 34.9481 Tj 0 -227.8407 Td -(5221 } else {) 65.5277 Tj +(5221 if\(p->readopen == 0 && p->writeopen == 0\) {) 218.4257 Tj 0 -237.334 Td -(5222 p->readopen = 0;) 109.2129 Tj +(5222 release\(&p->lock\);) 117.9499 Tj 0 -246.8274 Td -(5223 wakeup\(&p->writep\);) 122.3184 Tj +(5223 kfree\(\(char*\)p, PAGE\);) 135.4239 Tj 0 -256.3207 Td -(5224 }) 34.9481 Tj +(5224 } else) 56.7907 Tj 0 -265.8141 Td -(5225 release\(&p->lock\);) 109.2129 Tj +(5225 release\(&p->lock\);) 117.9499 Tj 0 -275.3075 Td -(5226 ) 21.8426 Tj +(5226 }) 26.2111 Tj 0 -284.8008 Td -(5227 if\(p->readopen == 0 && p->writeopen == 0\)) 209.6887 Tj +(5227 ) 21.8426 Tj 0 -294.2942 Td -(5228 kfree\(\(char*\)p, PAGE\);) 135.4239 Tj +(5228 ) 21.8426 Tj 0 -303.7875 Td -(5229 }) 26.2111 Tj +(5229 int) 34.9481 Tj 0 -313.2809 Td -(5230 ) 21.8426 Tj +(5230 pipewrite\(struct pipe *p, char *addr, int n\)) 214.0572 Tj 0 -322.7743 Td -(5231 ) 21.8426 Tj +(5231 {) 26.2111 Tj 0 -332.2676 Td -(5232 ) 21.8426 Tj +(5232 int i;) 56.7907 Tj 0 -341.761 Td (5233 ) 21.8426 Tj 0 -351.2543 Td -(5234 ) 21.8426 Tj +(5234 acquire\(&p->lock\);) 109.2129 Tj 0 -360.7477 Td -(5235 ) 21.8426 Tj +(5235 for\(i = 0; i < n; i++\){) 131.0554 Tj 0 -370.2411 Td -(5236 ) 21.8426 Tj +(5236 while\(p->nwrite == p->nread + PIPESIZE\) { ) 227.1628 Tj 0 -379.7344 Td -(5237 ) 21.8426 Tj +(5237 if\(p->readopen == 0 || cp->killed\){) 200.9517 Tj 0 -389.2278 Td -(5238 ) 21.8426 Tj +(5238 release\(&p->lock\);) 135.4239 Tj 0 -398.7211 Td -(5239 ) 21.8426 Tj +(5239 return -1;) 100.4758 Tj 0 -408.2145 Td -(5240 ) 21.8426 Tj +(5240 }) 52.4222 Tj 0 -417.7079 Td -(5241 ) 21.8426 Tj +(5241 wakeup\(&p->nread\);) 126.6869 Tj 0 -427.2012 Td -(5242 ) 21.8426 Tj +(5242 sleep\(&p->nwrite, &p->lock\); ) 179.1091 Tj 0 -436.6946 Td -(5243 ) 21.8426 Tj +(5243 }) 43.6851 Tj 0 -446.1879 Td -(5244 ) 21.8426 Tj +(5244 p->data[p->nwrite++ % PIPESIZE] = addr[i];) 222.7942 Tj 0 -455.6813 Td -(5245 ) 21.8426 Tj +(5245 }) 34.9481 Tj 0 -465.1747 Td -(5246 ) 21.8426 Tj +(5246 wakeup\(&p->nread\); ) 117.9499 Tj 0 -474.668 Td -(5247 ) 21.8426 Tj +(5247 release\(&p->lock\);) 109.2129 Tj 0 -484.1614 Td -(5248 ) 21.8426 Tj +(5248 return n;) 69.8962 Tj 0 -493.6547 Td -(5249 ) 21.8426 Tj +(5249 }) 26.2111 Tj 0 -522.1348 Td (Sheet 52) 34.9481 Tj Q @@ -17897,11 +18032,11 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/pipe.c Page 3) 161.635 Tj +(Aug 8 01:04 2009 xv6/pipe.c Page 3) 161.635 Tj 0 -28.4801 Td (5250 int) 34.9481 Tj 0 -37.9735 Td -(5251 pipewrite\(struct pipe *p, char *addr, int n\)) 214.0572 Tj +(5251 piperead\(struct pipe *p, char *addr, int n\)) 209.6887 Tj 0 -47.4668 Td (5252 {) 26.2111 Tj 0 -56.9602 Td @@ -17911,81 +18046,81 @@ q 0 -75.9469 Td (5255 acquire\(&p->lock\);) 109.2129 Tj 0 -85.4403 Td -(5256 for\(i = 0; i < n; i++\){) 131.0554 Tj +(5256 while\(p->nread == p->nwrite && p->writeopen\){ ) 235.8998 Tj 0 -94.9336 Td -(5257 while\(p->writep == p->readp + PIPESIZE\) {) 218.4257 Tj +(5257 if\(cp->killed\){) 104.8443 Tj 0 -104.427 Td -(5258 if\(p->readopen == 0 || cp->killed\){) 200.9517 Tj +(5258 release\(&p->lock\);) 126.6869 Tj 0 -113.9203 Td -(5259 release\(&p->lock\);) 135.4239 Tj +(5259 return -1;) 91.7388 Tj 0 -123.4137 Td -(5260 return -1;) 100.4758 Tj +(5260 }) 43.6851 Tj 0 -132.9071 Td -(5261 }) 52.4222 Tj +(5261 sleep\(&p->nread, &p->lock\); ) 161.635 Tj 0 -142.4004 Td -(5262 wakeup\(&p->readp\);) 126.6869 Tj +(5262 }) 34.9481 Tj 0 -151.8938 Td -(5263 sleep\(&p->writep, &p->lock\);) 170.3721 Tj +(5263 for\(i = 0; i < n; i++\){ ) 139.7925 Tj 0 -161.3871 Td -(5264 }) 43.6851 Tj +(5264 if\(p->nread == p->nwrite\)) 148.5295 Tj 0 -170.8805 Td -(5265 p->data[p->writep++ % PIPESIZE] = addr[i];) 222.7942 Tj +(5265 break;) 74.2647 Tj 0 -180.3739 Td -(5266 }) 34.9481 Tj +(5266 addr[i] = p->data[p->nread++ % PIPESIZE];) 218.4257 Tj 0 -189.8672 Td -(5267 wakeup\(&p->readp\);) 109.2129 Tj +(5267 }) 34.9481 Tj 0 -199.3606 Td -(5268 release\(&p->lock\);) 109.2129 Tj +(5268 wakeup\(&p->nwrite\); ) 122.3184 Tj 0 -208.8539 Td -(5269 return i;) 69.8962 Tj +(5269 release\(&p->lock\);) 109.2129 Tj 0 -218.3473 Td -(5270 }) 26.2111 Tj +(5270 return i;) 69.8962 Tj 0 -227.8407 Td -(5271 ) 21.8426 Tj +(5271 }) 26.2111 Tj 0 -237.334 Td -(5272 int) 34.9481 Tj +(5272 ) 21.8426 Tj 0 -246.8274 Td -(5273 piperead\(struct pipe *p, char *addr, int n\)) 209.6887 Tj +(5273 ) 21.8426 Tj 0 -256.3207 Td -(5274 {) 26.2111 Tj +(5274 ) 21.8426 Tj 0 -265.8141 Td -(5275 int i;) 56.7907 Tj +(5275 ) 21.8426 Tj 0 -275.3075 Td (5276 ) 21.8426 Tj 0 -284.8008 Td -(5277 acquire\(&p->lock\);) 109.2129 Tj +(5277 ) 21.8426 Tj 0 -294.2942 Td -(5278 while\(p->readp == p->writep && p->writeopen\){) 227.1628 Tj +(5278 ) 21.8426 Tj 0 -303.7875 Td -(5279 if\(cp->killed\){) 104.8443 Tj +(5279 ) 21.8426 Tj 0 -313.2809 Td -(5280 release\(&p->lock\);) 126.6869 Tj +(5280 ) 21.8426 Tj 0 -322.7743 Td -(5281 return -1;) 91.7388 Tj +(5281 ) 21.8426 Tj 0 -332.2676 Td -(5282 }) 43.6851 Tj +(5282 ) 21.8426 Tj 0 -341.761 Td -(5283 sleep\(&p->readp, &p->lock\);) 157.2665 Tj +(5283 ) 21.8426 Tj 0 -351.2543 Td -(5284 }) 34.9481 Tj +(5284 ) 21.8426 Tj 0 -360.7477 Td -(5285 for\(i = 0; i < n; i++\){) 131.0554 Tj +(5285 ) 21.8426 Tj 0 -370.2411 Td -(5286 if\(p->readp == p->writep\)) 148.5295 Tj +(5286 ) 21.8426 Tj 0 -379.7344 Td -(5287 break;) 74.2647 Tj +(5287 ) 21.8426 Tj 0 -389.2278 Td -(5288 addr[i] = p->data[p->readp++ % PIPESIZE];) 218.4257 Tj +(5288 ) 21.8426 Tj 0 -398.7211 Td -(5289 }) 34.9481 Tj +(5289 ) 21.8426 Tj 0 -408.2145 Td -(5290 wakeup\(&p->writep\);) 113.5814 Tj +(5290 ) 21.8426 Tj 0 -417.7079 Td -(5291 release\(&p->lock\);) 109.2129 Tj +(5291 ) 21.8426 Tj 0 -427.2012 Td -(5292 return i;) 69.8962 Tj +(5292 ) 21.8426 Tj 0 -436.6946 Td -(5293 }) 26.2111 Tj +(5293 ) 21.8426 Tj 0 -446.1879 Td (5294 ) 21.8426 Tj 0 -455.6813 Td @@ -18028,6 +18163,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -18045,105 +18182,105 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/string.c Page 1) 170.3721 Tj +(Aug 8 01:04 2009 xv6/string.c Page 1) 170.3721 Tj 0 -28.4801 Td (5300 #include "types.h") 100.4758 Tj 0 -37.9735 Td -(5301 ) 21.8426 Tj +(5301 #include "x86.h") 91.7388 Tj 0 -47.4668 Td -(5302 void*) 43.6851 Tj +(5302 ) 21.8426 Tj 0 -56.9602 Td -(5303 memset\(void *dst, int c, uint n\)) 161.635 Tj +(5303 void*) 43.6851 Tj 0 -66.4535 Td -(5304 {) 26.2111 Tj +(5304 memset\(void *dst, int c, uint n\)) 161.635 Tj 0 -75.9469 Td -(5305 char *d;) 65.5277 Tj +(5305 {) 26.2111 Tj 0 -85.4403 Td -(5306 ) 21.8426 Tj +(5306 stosb\(dst, c, n\);) 104.8443 Tj 0 -94.9336 Td -(5307 d = \(char*\)dst;) 96.1073 Tj +(5307 return dst;) 78.6333 Tj 0 -104.427 Td -(5308 while\(n-- > 0\)) 91.7388 Tj +(5308 }) 26.2111 Tj 0 -113.9203 Td -(5309 *d++ = c;) 78.6333 Tj +(5309 ) 21.8426 Tj 0 -123.4137 Td -(5310 ) 21.8426 Tj +(5310 int) 34.9481 Tj 0 -132.9071 Td -(5311 return dst;) 78.6333 Tj +(5311 memcmp\(const void *v1, const void *v2, uint n\)) 222.7942 Tj 0 -142.4004 Td -(5312 }) 26.2111 Tj +(5312 {) 26.2111 Tj 0 -151.8938 Td -(5313 ) 21.8426 Tj +(5313 const uchar *s1, *s2;) 122.3184 Tj 0 -161.3871 Td -(5314 int) 34.9481 Tj +(5314 ) 21.8426 Tj 0 -170.8805 Td -(5315 memcmp\(const void *v1, const void *v2, uint n\)) 222.7942 Tj +(5315 s1 = v1;) 65.5277 Tj 0 -180.3739 Td -(5316 {) 26.2111 Tj +(5316 s2 = v2;) 65.5277 Tj 0 -189.8672 Td -(5317 const uchar *s1, *s2;) 122.3184 Tj +(5317 while\(n-- > 0\){) 96.1073 Tj 0 -199.3606 Td -(5318 ) 21.8426 Tj +(5318 if\(*s1 != *s2\)) 100.4758 Tj 0 -208.8539 Td -(5319 s1 = v1;) 65.5277 Tj +(5319 return *s1 - *s2;) 122.3184 Tj 0 -218.3473 Td -(5320 s2 = v2;) 65.5277 Tj +(5320 s1++, s2++;) 87.3703 Tj 0 -227.8407 Td -(5321 while\(n-- > 0\){) 96.1073 Tj +(5321 }) 34.9481 Tj 0 -237.334 Td -(5322 if\(*s1 != *s2\)) 100.4758 Tj +(5322 ) 21.8426 Tj 0 -246.8274 Td -(5323 return *s1 - *s2;) 122.3184 Tj +(5323 return 0;) 69.8962 Tj 0 -256.3207 Td -(5324 s1++, s2++;) 87.3703 Tj +(5324 }) 26.2111 Tj 0 -265.8141 Td -(5325 }) 34.9481 Tj +(5325 ) 21.8426 Tj 0 -275.3075 Td -(5326 ) 21.8426 Tj +(5326 void*) 43.6851 Tj 0 -284.8008 Td -(5327 return 0;) 69.8962 Tj +(5327 memmove\(void *dst, const void *src, uint n\)) 209.6887 Tj 0 -294.2942 Td -(5328 }) 26.2111 Tj +(5328 {) 26.2111 Tj 0 -303.7875 Td -(5329 ) 21.8426 Tj +(5329 const char *s;) 91.7388 Tj 0 -313.2809 Td -(5330 void*) 43.6851 Tj +(5330 char *d;) 65.5277 Tj 0 -322.7743 Td -(5331 memmove\(void *dst, const void *src, uint n\)) 209.6887 Tj +(5331 ) 21.8426 Tj 0 -332.2676 Td -(5332 {) 26.2111 Tj +(5332 s = src;) 65.5277 Tj 0 -341.761 Td -(5333 const char *s;) 91.7388 Tj +(5333 d = dst;) 65.5277 Tj 0 -351.2543 Td -(5334 char *d;) 65.5277 Tj +(5334 if\(s < d && s + n > d\){) 131.0554 Tj 0 -360.7477 Td -(5335 ) 21.8426 Tj +(5335 s += n;) 69.8962 Tj 0 -370.2411 Td -(5336 s = src;) 65.5277 Tj +(5336 d += n;) 69.8962 Tj 0 -379.7344 Td -(5337 d = dst;) 65.5277 Tj +(5337 while\(n-- > 0\)) 100.4758 Tj 0 -389.2278 Td -(5338 if\(s < d && s + n > d\){) 131.0554 Tj +(5338 *--d = *--s;) 100.4758 Tj 0 -398.7211 Td -(5339 s += n;) 69.8962 Tj +(5339 } else) 56.7907 Tj 0 -408.2145 Td -(5340 d += n;) 69.8962 Tj +(5340 while\(n-- > 0\)) 100.4758 Tj 0 -417.7079 Td -(5341 while\(n-- > 0\)) 100.4758 Tj +(5341 *d++ = *s++;) 100.4758 Tj 0 -427.2012 Td -(5342 *--d = *--s;) 100.4758 Tj +(5342 ) 21.8426 Tj 0 -436.6946 Td -(5343 } else) 56.7907 Tj +(5343 return dst;) 78.6333 Tj 0 -446.1879 Td -(5344 while\(n-- > 0\)) 100.4758 Tj +(5344 }) 26.2111 Tj 0 -455.6813 Td -(5345 *d++ = *s++;) 100.4758 Tj +(5345 ) 21.8426 Tj 0 -465.1747 Td (5346 ) 21.8426 Tj 0 -474.668 Td -(5347 return dst;) 78.6333 Tj +(5347 ) 21.8426 Tj 0 -484.1614 Td -(5348 }) 26.2111 Tj +(5348 ) 21.8426 Tj 0 -493.6547 Td (5349 ) 21.8426 Tj 0 -522.1348 Td @@ -18164,7 +18301,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/string.c Page 2) 170.3721 Tj +(Aug 8 01:04 2009 xv6/string.c Page 2) 170.3721 Tj 0 -28.4801 Td (5350 int) 34.9481 Tj 0 -37.9735 Td @@ -18295,6 +18432,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -18312,7 +18451,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/mp.h Page 1) 152.898 Tj +(Aug 8 01:04 2009 xv6/mp.h Page 1) 152.898 Tj 0 -28.4801 Td (5400 // See MultiProcessor Specification Version 1.[14]) 240.2683 Tj 0 -37.9735 Td @@ -18436,7 +18575,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/mp.h Page 2) 152.898 Tj +(Aug 8 01:04 2009 xv6/mp.h Page 2) 152.898 Tj 0 -28.4801 Td (5450 // Table entry types) 109.2129 Tj 0 -37.9735 Td @@ -18567,6 +18706,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -18584,7 +18725,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/mp.c Page 1) 152.898 Tj +(Aug 8 01:04 2009 xv6/mp.c Page 1) 152.898 Tj 0 -28.4801 Td (5500 // Multiprocessor bootstrap.) 144.161 Tj 0 -37.9735 Td @@ -18619,13 +18760,13 @@ q 0 -170.8805 Td (5515 int ncpu;) 61.1592 Tj 0 -180.3739 Td -(5516 uchar ioapic_id;) 91.7388 Tj +(5516 uchar ioapicid;) 87.3703 Tj 0 -189.8672 Td (5517 ) 21.8426 Tj 0 -199.3606 Td (5518 int) 34.9481 Tj 0 -208.8539 Td -(5519 mp_bcpu\(void\)) 78.6333 Tj +(5519 mpbcpu\(void\)) 74.2647 Tj 0 -218.3473 Td (5520 {) 26.2111 Tj 0 -227.8407 Td @@ -18661,7 +18802,7 @@ q 0 -370.2411 Td (5536 static struct mp*) 96.1073 Tj 0 -379.7344 Td -(5537 mp_search1\(uchar *addr, int len\)) 161.635 Tj +(5537 mpsearch1\(uchar *addr, int len\)) 157.2665 Tj 0 -389.2278 Td (5538 {) 26.2111 Tj 0 -398.7211 Td @@ -18705,7 +18846,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/mp.c Page 2) 152.898 Tj +(Aug 8 01:04 2009 xv6/mp.c Page 2) 152.898 Tj 0 -28.4801 Td (5550 // Search for the MP Floating Pointer Structure, which acc\ ording to the) 332.0071 Tj @@ -18720,7 +18861,7 @@ ording to the) 332.0071 Tj 0 -75.9469 Td (5555 static struct mp*) 96.1073 Tj 0 -85.4403 Td -(5556 mp_search\(void\)) 87.3703 Tj +(5556 mpsearch\(void\)) 83.0018 Tj 0 -94.9336 Td (5557 {) 26.2111 Tj 0 -104.427 Td @@ -18736,7 +18877,7 @@ ording to the) 332.0071 Tj 0 -151.8938 Td (5563 if\(\(p = \(\(bda[0x0F]<<8\)|bda[0x0E]\) << 4\)\){) 214.0572 Tj 0 -161.3871 Td -(5564 if\(\(mp = mp_search1\(\(uchar*\)p, 1024\)\)\)) 205.3202 Tj +(5564 if\(\(mp = mpsearch1\(\(uchar*\)p, 1024\)\)\)) 200.9517 Tj 0 -170.8805 Td (5565 return mp;) 91.7388 Tj 0 -180.3739 Td @@ -18744,13 +18885,13 @@ ording to the) 332.0071 Tj 0 -189.8672 Td (5567 p = \(\(bda[0x14]<<8\)|bda[0x13]\)*1024;) 196.5831 Tj 0 -199.3606 Td -(5568 if\(\(mp = mp_search1\(\(uchar*\)p-1024, 1024\)\)\)) 227.1628 Tj +(5568 if\(\(mp = mpsearch1\(\(uchar*\)p-1024, 1024\)\)\)) 222.7942 Tj 0 -208.8539 Td (5569 return mp;) 91.7388 Tj 0 -218.3473 Td (5570 }) 34.9481 Tj 0 -227.8407 Td -(5571 return mp_search1\(\(uchar*\)0xF0000, 0x10000\);) 222.7942 Tj +(5571 return mpsearch1\(\(uchar*\)0xF0000, 0x10000\);) 218.4257 Tj 0 -237.334 Td (5572 }) 26.2111 Tj 0 -246.8274 Td @@ -18770,7 +18911,7 @@ ording to the) 332.0071 Tj 0 -303.7875 Td (5579 static struct mpconf*) 113.5814 Tj 0 -313.2809 Td -(5580 mp_config\(struct mp **pmp\)) 135.4239 Tj +(5580 mpconfig\(struct mp **pmp\)) 131.0554 Tj 0 -322.7743 Td (5581 {) 26.2111 Tj 0 -332.2676 Td @@ -18780,7 +18921,7 @@ ording to the) 332.0071 Tj 0 -351.2543 Td (5584 ) 21.8426 Tj 0 -360.7477 Td -(5585 if\(\(mp = mp_search\(\)\) == 0 || mp->physaddr == 0\)) 240.2683 Tj +(5585 if\(\(mp = mpsearch\(\)\) == 0 || mp->physaddr == 0\)) 235.8998 Tj 0 -370.2411 Td (5586 return 0;) 78.6333 Tj 0 -379.7344 Td @@ -18839,6 +18980,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -18856,11 +18999,11 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/mp.c Page 3) 152.898 Tj +(Aug 8 01:04 2009 xv6/mp.c Page 3) 152.898 Tj 0 -28.4801 Td (5600 void) 39.3166 Tj 0 -37.9735 Td -(5601 mp_init\(void\)) 78.6333 Tj +(5601 mpinit\(void\)) 74.2647 Tj 0 -47.4668 Td (5602 {) 26.2111 Tj 0 -56.9602 Td @@ -18878,7 +19021,7 @@ q 0 -113.9203 Td (5609 bcpu = &cpus[ncpu];) 113.5814 Tj 0 -123.4137 Td -(5610 if\(\(conf = mp_config\(&mp\)\) == 0\)) 170.3721 Tj +(5610 if\(\(conf = mpconfig\(&mp\)\) == 0\)) 166.0035 Tj 0 -132.9071 Td (5611 return;) 69.8962 Tj 0 -142.4004 Td @@ -18915,7 +19058,7 @@ th; papicno;) 166.0035 Tj +(5628 ioapicid = ioapic->apicno;) 161.635 Tj 0 -303.7875 Td (5629 p += sizeof\(struct mpioapic\);) 174.7406 Tj 0 -313.2809 Td @@ -18933,9 +19076,9 @@ th; p> 16\) & 0xFF;) 231.5313 Tj +(5909 maxintr = \(ioapicread\(REG_VER\) >> 16\) & 0xFF;) 227.1628 Tj 0 -123.4137 Td -(5910 id = ioapic_read\(REG_ID\) >> 24;) 166.0035 Tj +(5910 id = ioapicread\(REG_ID\) >> 24;) 161.635 Tj 0 -132.9071 Td -(5911 if\(id != ioapic_id\)) 113.5814 Tj +(5911 if\(id != ioapicid\)) 109.2129 Tj 0 -142.4004 Td -(5912 cprintf\("ioapic_init: id isn't equal to ioapic_id; no\ -t a MP\\n"\);) 318.9016 Tj +(5912 cprintf\("ioapicinit: id isn't equal to ioapicid; not \ +a MP\\n"\);) 310.1645 Tj 0 -151.8938 Td (5913 ) 21.8426 Tj 0 -161.3871 Td @@ -19735,10 +19883,10 @@ bled,) 297.059 Tj 0 -180.3739 Td (5916 for\(i = 0; i <= maxintr; i++\){) 161.635 Tj 0 -189.8672 Td -(5917 ioapic_write\(REG_TABLE+2*i, INT_DISABLED | \(IRQ_OFFS\ -ET + i\)\);) 305.796 Tj +(5917 ioapicwrite\(REG_TABLE+2*i, INT_DISABLED | \(T_IRQ0 + \ +i\)\);) 283.9534 Tj 0 -199.3606 Td -(5918 ioapic_write\(REG_TABLE+2*i+1, 0\);) 183.4776 Tj +(5918 ioapicwrite\(REG_TABLE+2*i+1, 0\);) 179.1091 Tj 0 -208.8539 Td (5919 }) 34.9481 Tj 0 -218.3473 Td @@ -19748,7 +19896,7 @@ ET + i\)\);) 305.796 Tj 0 -237.334 Td (5922 void) 39.3166 Tj 0 -246.8274 Td -(5923 ioapic_enable\(int irq, int cpunum\)) 170.3721 Tj +(5923 ioapicenable\(int irq, int cpunum\)) 166.0035 Tj 0 -256.3207 Td (5924 {) 26.2111 Tj 0 -265.8141 Td @@ -19764,9 +19912,9 @@ ET + i\)\);) 305.796 Tj 0 -313.2809 Td (5930 // which happens to be that cpu's APIC ID.) 214.0572 Tj 0 -322.7743 Td -(5931 ioapic_write\(REG_TABLE+2*irq, IRQ_OFFSET + irq\);) 240.2683 Tj +(5931 ioapicwrite\(REG_TABLE+2*irq, T_IRQ0 + irq\);) 218.4257 Tj 0 -332.2676 Td -(5932 ioapic_write\(REG_TABLE+2*irq+1, cpunum << 24\);) 231.5313 Tj +(5932 ioapicwrite\(REG_TABLE+2*irq+1, cpunum << 24\);) 227.1628 Tj 0 -341.761 Td (5933 }) 26.2111 Tj 0 -351.2543 Td @@ -19819,7 +19967,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/picirq.c Page 1) 170.3721 Tj +(Aug 8 01:04 2009 xv6/picirq.c Page 1) 170.3721 Tj 0 -28.4801 Td (5950 // Intel 8259A programmable interrupt controllers.) 240.2683 Tj 0 -37.9735 Td @@ -19858,7 +20006,7 @@ ects to master) 336.3756 Tj 0 -180.3739 Td (5966 static void) 69.8962 Tj 0 -189.8672 Td -(5967 pic_setmask\(ushort mask\)) 126.6869 Tj +(5967 picsetmask\(ushort mask\)) 122.3184 Tj 0 -199.3606 Td (5968 {) 26.2111 Tj 0 -208.8539 Td @@ -19874,11 +20022,11 @@ ects to master) 336.3756 Tj 0 -256.3207 Td (5974 void) 39.3166 Tj 0 -265.8141 Td -(5975 pic_enable\(int irq\)) 104.8443 Tj +(5975 picenable\(int irq\)) 100.4758 Tj 0 -275.3075 Td (5976 {) 26.2111 Tj 0 -284.8008 Td -(5977 pic_setmask\(irqmask & ~\(1<', '?', NO, '*', // 0x30) 270.8479 Tj +(6130 // C\('A'\) == Control-A) 117.9499 Tj 0 -322.7743 Td -(6131 NO, ' ', NO, NO, NO, NO, NO, NO,) 227.1628 Tj +(6131 #define C\(x\) \(x - '@'\)) 117.9499 Tj 0 -332.2676 Td -(6132 NO, NO, NO, NO, NO, NO, NO, '7', // 0x40) 270.8479 Tj +(6132 ) 21.8426 Tj 0 -341.761 Td -(6133 '8', '9', '-', '4', '5', '6', '+', '1',) 231.5313 Tj +(6133 static uchar shiftcode[256] =) 148.5295 Tj 0 -351.2543 Td -(6134 '2', '3', '0', '.', NO, NO, NO, NO, // 0x50) 270.8479 Tj +(6134 {) 26.2111 Tj 0 -360.7477 Td -(6135 [0x9C] '\\n', // KP_Enter) 157.2665 Tj +(6135 [0x1D] CTL,) 78.6333 Tj 0 -370.2411 Td -(6136 [0xB5] '/', // KP_Div) 148.5295 Tj +(6136 [0x2A] SHIFT,) 87.3703 Tj 0 -379.7344 Td -(6137 [0xC8] KEY_UP, [0xD0] KEY_DN,) 170.3721 Tj +(6137 [0x36] SHIFT,) 87.3703 Tj 0 -389.2278 Td -(6138 [0xC9] KEY_PGUP, [0xD1] KEY_PGDN,) 179.1091 Tj +(6138 [0x38] ALT,) 78.6333 Tj 0 -398.7211 Td -(6139 [0xCB] KEY_LF, [0xCD] KEY_RT,) 170.3721 Tj +(6139 [0x9D] CTL,) 78.6333 Tj 0 -408.2145 Td -(6140 [0x97] KEY_HOME, [0xCF] KEY_END,) 174.7406 Tj +(6140 [0xB8] ALT) 74.2647 Tj 0 -417.7079 Td -(6141 [0xD2] KEY_INS, [0xD3] KEY_DEL) 170.3721 Tj +(6141 };) 30.5796 Tj 0 -427.2012 Td -(6142 };) 30.5796 Tj +(6142 ) 21.8426 Tj 0 -436.6946 Td -(6143 ) 21.8426 Tj +(6143 static uchar togglecode[256] =) 152.898 Tj 0 -446.1879 Td -(6144 ) 21.8426 Tj +(6144 {) 26.2111 Tj 0 -455.6813 Td -(6145 ) 21.8426 Tj +(6145 [0x3A] CAPSLOCK,) 100.4758 Tj 0 -465.1747 Td -(6146 ) 21.8426 Tj +(6146 [0x45] NUMLOCK,) 96.1073 Tj 0 -474.668 Td -(6147 ) 21.8426 Tj +(6147 [0x46] SCROLLLOCK) 104.8443 Tj 0 -484.1614 Td -(6148 ) 21.8426 Tj +(6148 };) 30.5796 Tj 0 -493.6547 Td (6149 ) 21.8426 Tj 0 -522.1348 Td @@ -20363,100 +20515,93 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/kbd.h Page 3) 157.2665 Tj +(Aug 8 01:04 2009 xv6/kbd.h Page 2) 157.2665 Tj 0 -28.4801 Td -(6150 static uchar ctlmap[256] =) 135.4239 Tj +(6150 static uchar normalmap[256] =) 148.5295 Tj 0 -37.9735 Td (6151 {) 26.2111 Tj 0 -47.4668 Td -(6152 NO, NO, NO, NO, NO, NO, NO\ -, NO,) 318.9016 Tj +(6152 NO, 0x1B, '1', '2', '3', '4', '5', '6', // 0x00) 270.8479 Tj 0 -56.9602 Td -(6153 NO, NO, NO, NO, NO, NO, NO\ -, NO,) 318.9016 Tj +(6153 '7', '8', '9', '0', '-', '=', '\\b', '\\t',) 235.8998 Tj 0 -66.4535 Td -(6154 C\('Q'\), C\('W'\), C\('E'\), C\('R'\), C\('T'\), C\ -\('Y'\), C\('U'\), C\('I'\),) 336.3756 Tj +(6154 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', // 0x10) 270.8479 Tj 0 -75.9469 Td -(6155 C\('O'\), C\('P'\), NO, NO, '\\r', NO, \ - C\('A'\), C\('S'\),) 336.3756 Tj +(6155 'o', 'p', '[', ']', '\\n', NO, 'a', 's',) 231.5313 Tj 0 -85.4403 Td -(6156 C\('D'\), C\('F'\), C\('G'\), C\('H'\), C\('J'\), C\ -\('K'\), C\('L'\), NO,) 318.9016 Tj +(6156 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', // 0x20) 270.8479 Tj 0 -94.9336 Td -(6157 NO, NO, NO, C\('\\\\'\), C\('Z'\), C\('X\ -'\), C\('C'\), C\('V'\),) 336.3756 Tj +(6157 '\\'', '`', NO, '\\\\', 'z', 'x', 'c', 'v',) 231.5313 Tj 0 -104.427 Td -(6158 C\('B'\), C\('N'\), C\('M'\), NO, NO, C\('/\ -'\), NO, NO,) 318.9016 Tj +(6158 'b', 'n', 'm', ',', '.', '/', NO, '*', // 0x30) 270.8479 Tj 0 -113.9203 Td -(6159 [0x9C] '\\r', // KP_Enter) 157.2665 Tj +(6159 NO, ' ', NO, NO, NO, NO, NO, NO,) 227.1628 Tj 0 -123.4137 Td -(6160 [0xB5] C\('/'\), // KP_Div) 148.5295 Tj +(6160 NO, NO, NO, NO, NO, NO, NO, '7', // 0x40) 270.8479 Tj 0 -132.9071 Td -(6161 [0xC8] KEY_UP, [0xD0] KEY_DN,) 170.3721 Tj +(6161 '8', '9', '-', '4', '5', '6', '+', '1',) 231.5313 Tj 0 -142.4004 Td -(6162 [0xC9] KEY_PGUP, [0xD1] KEY_PGDN,) 179.1091 Tj +(6162 '2', '3', '0', '.', NO, NO, NO, NO, // 0x50) 270.8479 Tj 0 -151.8938 Td -(6163 [0xCB] KEY_LF, [0xCD] KEY_RT,) 170.3721 Tj +(6163 [0x9C] '\\n', // KP_Enter) 157.2665 Tj 0 -161.3871 Td -(6164 [0x97] KEY_HOME, [0xCF] KEY_END,) 174.7406 Tj +(6164 [0xB5] '/', // KP_Div) 148.5295 Tj 0 -170.8805 Td -(6165 [0xD2] KEY_INS, [0xD3] KEY_DEL) 170.3721 Tj +(6165 [0xC8] KEY_UP, [0xD0] KEY_DN,) 170.3721 Tj 0 -180.3739 Td -(6166 };) 30.5796 Tj +(6166 [0xC9] KEY_PGUP, [0xD1] KEY_PGDN,) 179.1091 Tj 0 -189.8672 Td -(6167 ) 21.8426 Tj +(6167 [0xCB] KEY_LF, [0xCD] KEY_RT,) 170.3721 Tj 0 -199.3606 Td -(6168 ) 21.8426 Tj +(6168 [0x97] KEY_HOME, [0xCF] KEY_END,) 174.7406 Tj 0 -208.8539 Td -(6169 ) 21.8426 Tj +(6169 [0xD2] KEY_INS, [0xD3] KEY_DEL) 170.3721 Tj 0 -218.3473 Td -(6170 ) 21.8426 Tj +(6170 };) 30.5796 Tj 0 -227.8407 Td (6171 ) 21.8426 Tj 0 -237.334 Td -(6172 ) 21.8426 Tj +(6172 static uchar shiftmap[256] =) 144.161 Tj 0 -246.8274 Td -(6173 ) 21.8426 Tj +(6173 {) 26.2111 Tj 0 -256.3207 Td -(6174 ) 21.8426 Tj +(6174 NO, 033, '!', '@', '#', '$', '%', '^', // 0x00) 270.8479 Tj 0 -265.8141 Td -(6175 ) 21.8426 Tj +(6175 '&', '*', '\(', '\)', '_', '+', '\\b', '\\t',) 235.8998 Tj 0 -275.3075 Td -(6176 ) 21.8426 Tj +(6176 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', // 0x10) 270.8479 Tj 0 -284.8008 Td -(6177 ) 21.8426 Tj +(6177 'O', 'P', '{', '}', '\\n', NO, 'A', 'S',) 231.5313 Tj 0 -294.2942 Td -(6178 ) 21.8426 Tj +(6178 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', // 0x20) 270.8479 Tj 0 -303.7875 Td -(6179 ) 21.8426 Tj +(6179 '"', '~', NO, '|', 'Z', 'X', 'C', 'V',) 231.5313 Tj 0 -313.2809 Td -(6180 ) 21.8426 Tj +(6180 'B', 'N', 'M', '<', '>', '?', NO, '*', // 0x30) 270.8479 Tj 0 -322.7743 Td -(6181 ) 21.8426 Tj +(6181 NO, ' ', NO, NO, NO, NO, NO, NO,) 227.1628 Tj 0 -332.2676 Td -(6182 ) 21.8426 Tj +(6182 NO, NO, NO, NO, NO, NO, NO, '7', // 0x40) 270.8479 Tj 0 -341.761 Td -(6183 ) 21.8426 Tj +(6183 '8', '9', '-', '4', '5', '6', '+', '1',) 231.5313 Tj 0 -351.2543 Td -(6184 ) 21.8426 Tj +(6184 '2', '3', '0', '.', NO, NO, NO, NO, // 0x50) 270.8479 Tj 0 -360.7477 Td -(6185 ) 21.8426 Tj +(6185 [0x9C] '\\n', // KP_Enter) 157.2665 Tj 0 -370.2411 Td -(6186 ) 21.8426 Tj +(6186 [0xB5] '/', // KP_Div) 148.5295 Tj 0 -379.7344 Td -(6187 ) 21.8426 Tj +(6187 [0xC8] KEY_UP, [0xD0] KEY_DN,) 170.3721 Tj 0 -389.2278 Td -(6188 ) 21.8426 Tj +(6188 [0xC9] KEY_PGUP, [0xD1] KEY_PGDN,) 179.1091 Tj 0 -398.7211 Td -(6189 ) 21.8426 Tj +(6189 [0xCB] KEY_LF, [0xCD] KEY_RT,) 170.3721 Tj 0 -408.2145 Td -(6190 ) 21.8426 Tj +(6190 [0x97] KEY_HOME, [0xCF] KEY_END,) 174.7406 Tj 0 -417.7079 Td -(6191 ) 21.8426 Tj +(6191 [0xD2] KEY_INS, [0xD3] KEY_DEL) 170.3721 Tj 0 -427.2012 Td -(6192 ) 21.8426 Tj +(6192 };) 30.5796 Tj 0 -436.6946 Td (6193 ) 21.8426 Tj 0 -446.1879 Td @@ -20501,6 +20646,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -20518,107 +20665,114 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/kbd.c Page 1) 157.2665 Tj +(Aug 8 01:04 2009 xv6/kbd.h Page 3) 157.2665 Tj 0 -28.4801 Td -(6200 #include "types.h") 100.4758 Tj +(6200 static uchar ctlmap[256] =) 135.4239 Tj 0 -37.9735 Td -(6201 #include "x86.h") 91.7388 Tj +(6201 {) 26.2111 Tj 0 -47.4668 Td -(6202 #include "defs.h") 96.1073 Tj +(6202 NO, NO, NO, NO, NO, NO, NO\ +, NO,) 318.9016 Tj 0 -56.9602 Td -(6203 #include "kbd.h") 91.7388 Tj +(6203 NO, NO, NO, NO, NO, NO, NO\ +, NO,) 318.9016 Tj 0 -66.4535 Td -(6204 ) 21.8426 Tj +(6204 C\('Q'\), C\('W'\), C\('E'\), C\('R'\), C\('T'\), C\ +\('Y'\), C\('U'\), C\('I'\),) 336.3756 Tj 0 -75.9469 Td -(6205 int) 34.9481 Tj +(6205 C\('O'\), C\('P'\), NO, NO, '\\r', NO, \ + C\('A'\), C\('S'\),) 336.3756 Tj 0 -85.4403 Td -(6206 kbd_getc\(void\)) 83.0018 Tj +(6206 C\('D'\), C\('F'\), C\('G'\), C\('H'\), C\('J'\), C\ +\('K'\), C\('L'\), NO,) 318.9016 Tj 0 -94.9336 Td -(6207 {) 26.2111 Tj +(6207 NO, NO, NO, C\('\\\\'\), C\('Z'\), C\('X\ +'\), C\('C'\), C\('V'\),) 336.3756 Tj 0 -104.427 Td -(6208 static uint shift;) 109.2129 Tj +(6208 C\('B'\), C\('N'\), C\('M'\), NO, NO, C\('/\ +'\), NO, NO,) 318.9016 Tj 0 -113.9203 Td -(6209 static uchar *charcode[4] = {) 157.2665 Tj +(6209 [0x9C] '\\r', // KP_Enter) 157.2665 Tj 0 -123.4137 Td -(6210 normalmap, shiftmap, ctlmap, ctlmap) 192.2146 Tj +(6210 [0xB5] C\('/'\), // KP_Div) 148.5295 Tj 0 -132.9071 Td -(6211 };) 39.3166 Tj +(6211 [0xC8] KEY_UP, [0xD0] KEY_DN,) 170.3721 Tj 0 -142.4004 Td -(6212 uint st, data, c;) 104.8443 Tj +(6212 [0xC9] KEY_PGUP, [0xD1] KEY_PGDN,) 179.1091 Tj 0 -151.8938 Td -(6213 ) 21.8426 Tj +(6213 [0xCB] KEY_LF, [0xCD] KEY_RT,) 170.3721 Tj 0 -161.3871 Td -(6214 st = inb\(KBSTATP\);) 109.2129 Tj +(6214 [0x97] KEY_HOME, [0xCF] KEY_END,) 174.7406 Tj 0 -170.8805 Td -(6215 if\(\(st & KBS_DIB\) == 0\)) 131.0554 Tj +(6215 [0xD2] KEY_INS, [0xD3] KEY_DEL) 170.3721 Tj 0 -180.3739 Td -(6216 return -1;) 83.0018 Tj +(6216 };) 30.5796 Tj 0 -189.8672 Td -(6217 data = inb\(KBDATAP\);) 117.9499 Tj +(6217 ) 21.8426 Tj 0 -199.3606 Td (6218 ) 21.8426 Tj 0 -208.8539 Td -(6219 if\(data == 0xE0\){) 104.8443 Tj +(6219 ) 21.8426 Tj 0 -218.3473 Td -(6220 shift |= E0ESC;) 104.8443 Tj +(6220 ) 21.8426 Tj 0 -227.8407 Td -(6221 return 0;) 78.6333 Tj +(6221 ) 21.8426 Tj 0 -237.334 Td -(6222 } else if\(data & 0x80\){) 131.0554 Tj +(6222 ) 21.8426 Tj 0 -246.8274 Td -(6223 // Key released) 104.8443 Tj +(6223 ) 21.8426 Tj 0 -256.3207 Td -(6224 data = \(shift & E0ESC ? data : data & 0x7F\);) 231.5313 Tj +(6224 ) 21.8426 Tj 0 -265.8141 Td -(6225 shift &= ~\(shiftcode[data] | E0ESC\);) 196.5831 Tj +(6225 ) 21.8426 Tj 0 -275.3075 Td -(6226 return 0;) 78.6333 Tj +(6226 ) 21.8426 Tj 0 -284.8008 Td -(6227 } else if\(shift & E0ESC\){) 139.7925 Tj +(6227 ) 21.8426 Tj 0 -294.2942 Td -(6228 // Last character was an E0 escape; or with 0x80) 249.0053 Tj +(6228 ) 21.8426 Tj 0 -303.7875 Td -(6229 data |= 0x80;) 96.1073 Tj +(6229 ) 21.8426 Tj 0 -313.2809 Td -(6230 shift &= ~E0ESC;) 109.2129 Tj +(6230 ) 21.8426 Tj 0 -322.7743 Td -(6231 }) 34.9481 Tj +(6231 ) 21.8426 Tj 0 -332.2676 Td (6232 ) 21.8426 Tj 0 -341.761 Td -(6233 shift |= shiftcode[data];) 139.7925 Tj +(6233 ) 21.8426 Tj 0 -351.2543 Td -(6234 shift ^= togglecode[data];) 144.161 Tj +(6234 ) 21.8426 Tj 0 -360.7477 Td -(6235 c = charcode[shift & \(CTL | SHIFT\)][data];) 214.0572 Tj +(6235 ) 21.8426 Tj 0 -370.2411 Td -(6236 if\(shift & CAPSLOCK\){) 122.3184 Tj +(6236 ) 21.8426 Tj 0 -379.7344 Td -(6237 if\('a' <= c && c <= 'z'\)) 144.161 Tj +(6237 ) 21.8426 Tj 0 -389.2278 Td -(6238 c += 'A' - 'a';) 113.5814 Tj +(6238 ) 21.8426 Tj 0 -398.7211 Td -(6239 else if\('A' <= c && c <= 'Z'\)) 166.0035 Tj +(6239 ) 21.8426 Tj 0 -408.2145 Td -(6240 c += 'a' - 'A';) 113.5814 Tj +(6240 ) 21.8426 Tj 0 -417.7079 Td -(6241 }) 34.9481 Tj +(6241 ) 21.8426 Tj 0 -427.2012 Td -(6242 return c;) 69.8962 Tj +(6242 ) 21.8426 Tj 0 -436.6946 Td -(6243 }) 26.2111 Tj +(6243 ) 21.8426 Tj 0 -446.1879 Td (6244 ) 21.8426 Tj 0 -455.6813 Td -(6245 void) 39.3166 Tj +(6245 ) 21.8426 Tj 0 -465.1747 Td -(6246 kbd_intr\(void\)) 83.0018 Tj +(6246 ) 21.8426 Tj 0 -474.668 Td -(6247 {) 26.2111 Tj +(6247 ) 21.8426 Tj 0 -484.1614 Td -(6248 console_intr\(kbd_getc\);) 131.0554 Tj +(6248 ) 21.8426 Tj 0 -493.6547 Td -(6249 }) 26.2111 Tj +(6249 ) 21.8426 Tj 0 -522.1348 Td (Sheet 62) 34.9481 Tj Q @@ -20637,109 +20791,107 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/console.c Page 1) 174.7406 Tj +(Aug 8 01:04 2009 xv6/kbd.c Page 1) 157.2665 Tj 0 -28.4801 Td -(6250 // Console input and output.) 144.161 Tj +(6250 #include "types.h") 100.4758 Tj 0 -37.9735 Td -(6251 // Input is from the keyboard only.) 174.7406 Tj +(6251 #include "x86.h") 91.7388 Tj 0 -47.4668 Td -(6252 // Output is written to the screen and the printer port.) 266.4794 Tj +(6252 #include "defs.h") 96.1073 Tj 0 -56.9602 Td -(6253 ) 21.8426 Tj +(6253 #include "kbd.h") 91.7388 Tj 0 -66.4535 Td -(6254 #include "types.h") 100.4758 Tj +(6254 ) 21.8426 Tj 0 -75.9469 Td -(6255 #include "defs.h") 96.1073 Tj +(6255 int) 34.9481 Tj 0 -85.4403 Td -(6256 #include "param.h") 100.4758 Tj +(6256 kbdgetc\(void\)) 78.6333 Tj 0 -94.9336 Td -(6257 #include "traps.h") 100.4758 Tj +(6257 {) 26.2111 Tj 0 -104.427 Td -(6258 #include "spinlock.h") 113.5814 Tj +(6258 static uint shift;) 109.2129 Tj 0 -113.9203 Td -(6259 #include "dev.h") 91.7388 Tj +(6259 static uchar *charcode[4] = {) 157.2665 Tj 0 -123.4137 Td -(6260 #include "mmu.h") 91.7388 Tj +(6260 normalmap, shiftmap, ctlmap, ctlmap) 192.2146 Tj 0 -132.9071 Td -(6261 #include "proc.h") 96.1073 Tj +(6261 };) 39.3166 Tj 0 -142.4004 Td -(6262 #include "x86.h") 91.7388 Tj +(6262 uint st, data, c;) 104.8443 Tj 0 -151.8938 Td (6263 ) 21.8426 Tj 0 -161.3871 Td -(6264 #define CRTPORT 0x3d4) 113.5814 Tj +(6264 st = inb\(KBSTATP\);) 109.2129 Tj 0 -170.8805 Td -(6265 #define LPTPORT 0x378) 113.5814 Tj +(6265 if\(\(st & KBS_DIB\) == 0\)) 131.0554 Tj 0 -180.3739 Td -(6266 #define BACKSPACE 0x100) 122.3184 Tj +(6266 return -1;) 83.0018 Tj 0 -189.8672 Td -(6267 ) 21.8426 Tj +(6267 data = inb\(KBDATAP\);) 117.9499 Tj 0 -199.3606 Td -(6268 static ushort *crt = \(ushort*\)0xb8000; // CGA memory) 253.3738 Tj +(6268 ) 21.8426 Tj 0 -208.8539 Td -(6269 ) 21.8426 Tj +(6269 if\(data == 0xE0\){) 104.8443 Tj 0 -218.3473 Td -(6270 static struct spinlock console_lock;) 179.1091 Tj +(6270 shift |= E0ESC;) 104.8443 Tj 0 -227.8407 Td -(6271 int panicked = 0;) 96.1073 Tj +(6271 return 0;) 78.6333 Tj 0 -237.334 Td -(6272 int use_console_lock = 0;) 131.0554 Tj +(6272 } else if\(data & 0x80\){) 131.0554 Tj 0 -246.8274 Td -(6273 ) 21.8426 Tj +(6273 // Key released) 104.8443 Tj 0 -256.3207 Td -(6274 // Copy console output to parallel port, which you can tel\ -l) 279.5849 Tj +(6274 data = \(shift & E0ESC ? data : data & 0x7F\);) 231.5313 Tj 0 -265.8141 Td -(6275 // .bochsrc to copy to the stdout:) 170.3721 Tj +(6275 shift &= ~\(shiftcode[data] | E0ESC\);) 196.5831 Tj 0 -275.3075 Td -(6276 // parport1: enabled=1, file="/dev/stdout") 214.0572 Tj +(6276 return 0;) 78.6333 Tj 0 -284.8008 Td -(6277 static void) 69.8962 Tj +(6277 } else if\(shift & E0ESC\){) 139.7925 Tj 0 -294.2942 Td -(6278 lpt_putc\(int c\)) 87.3703 Tj +(6278 // Last character was an E0 escape; or with 0x80) 249.0053 Tj 0 -303.7875 Td -(6279 {) 26.2111 Tj +(6279 data |= 0x80;) 96.1073 Tj 0 -313.2809 Td -(6280 int i;) 56.7907 Tj +(6280 shift &= ~E0ESC;) 109.2129 Tj 0 -322.7743 Td -(6281 ) 21.8426 Tj +(6281 }) 34.9481 Tj 0 -332.2676 Td -(6282 for\(i = 0; !\(inb\(LPTPORT+1\) & 0x80\) && i < 12800; i\ -++\)) 266.4794 Tj +(6282 ) 21.8426 Tj 0 -341.761 Td -(6283 ;) 43.6851 Tj +(6283 shift |= shiftcode[data];) 139.7925 Tj 0 -351.2543 Td -(6284 if\(c == BACKSPACE\)) 109.2129 Tj +(6284 shift ^= togglecode[data];) 144.161 Tj 0 -360.7477 Td -(6285 c = '\\b';) 78.6333 Tj +(6285 c = charcode[shift & \(CTL | SHIFT\)][data];) 214.0572 Tj 0 -370.2411 Td -(6286 outb\(LPTPORT+0, c\);) 113.5814 Tj +(6286 if\(shift & CAPSLOCK\){) 122.3184 Tj 0 -379.7344 Td -(6287 outb\(LPTPORT+2, 0x08|0x04|0x01\);) 170.3721 Tj +(6287 if\('a' <= c && c <= 'z'\)) 144.161 Tj 0 -389.2278 Td -(6288 outb\(LPTPORT+2, 0x08\);) 126.6869 Tj +(6288 c += 'A' - 'a';) 113.5814 Tj 0 -398.7211 Td -(6289 }) 26.2111 Tj +(6289 else if\('A' <= c && c <= 'Z'\)) 166.0035 Tj 0 -408.2145 Td -(6290 ) 21.8426 Tj +(6290 c += 'a' - 'A';) 113.5814 Tj 0 -417.7079 Td -(6291 ) 21.8426 Tj +(6291 }) 34.9481 Tj 0 -427.2012 Td -(6292 ) 21.8426 Tj +(6292 return c;) 69.8962 Tj 0 -436.6946 Td -(6293 ) 21.8426 Tj +(6293 }) 26.2111 Tj 0 -446.1879 Td (6294 ) 21.8426 Tj 0 -455.6813 Td -(6295 ) 21.8426 Tj +(6295 void) 39.3166 Tj 0 -465.1747 Td -(6296 ) 21.8426 Tj +(6296 kbdintr\(void\)) 78.6333 Tj 0 -474.668 Td -(6297 ) 21.8426 Tj +(6297 {) 26.2111 Tj 0 -484.1614 Td -(6298 ) 21.8426 Tj +(6298 consoleintr\(kbdgetc\);) 122.3184 Tj 0 -493.6547 Td -(6299 ) 21.8426 Tj +(6299 }) 26.2111 Tj 0 -522.1348 Td (Sheet 62) 34.9481 Tj Q @@ -20770,6 +20922,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -20787,100 +20941,103 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/console.c Page 2) 174.7406 Tj +(Aug 8 01:04 2009 xv6/console.c Page 1) 174.7406 Tj 0 -28.4801 Td -(6300 static void) 69.8962 Tj +(6300 // Console input and output.) 144.161 Tj 0 -37.9735 Td -(6301 cga_putc\(int c\)) 87.3703 Tj +(6301 // Input is from the keyboard or serial port.) 218.4257 Tj 0 -47.4668 Td -(6302 {) 26.2111 Tj +(6302 // Output is written to the screen and serial port.) 244.6368 Tj 0 -56.9602 Td -(6303 int pos;) 65.5277 Tj +(6303 ) 21.8426 Tj 0 -66.4535 Td -(6304 ) 21.8426 Tj +(6304 #include "types.h") 100.4758 Tj 0 -75.9469 Td -(6305 // Cursor position: col + 80*row.) 174.7406 Tj +(6305 #include "defs.h") 96.1073 Tj 0 -85.4403 Td -(6306 outb\(CRTPORT, 14\);) 109.2129 Tj +(6306 #include "param.h") 100.4758 Tj 0 -94.9336 Td -(6307 pos = inb\(CRTPORT+1\) << 8;) 144.161 Tj +(6307 #include "traps.h") 100.4758 Tj 0 -104.427 Td -(6308 outb\(CRTPORT, 15\);) 109.2129 Tj +(6308 #include "spinlock.h") 113.5814 Tj 0 -113.9203 Td -(6309 pos |= inb\(CRTPORT+1\);) 126.6869 Tj +(6309 #include "file.h") 96.1073 Tj 0 -123.4137 Td -(6310 ) 21.8426 Tj +(6310 #include "mmu.h") 91.7388 Tj 0 -132.9071 Td -(6311 if\(c == '\\n'\)) 87.3703 Tj +(6311 #include "proc.h") 96.1073 Tj 0 -142.4004 Td -(6312 pos += 80 - pos%80;) 122.3184 Tj +(6312 #include "x86.h") 91.7388 Tj 0 -151.8938 Td -(6313 else if\(c == BACKSPACE\){) 135.4239 Tj +(6313 ) 21.8426 Tj 0 -161.3871 Td -(6314 if\(pos > 0\)) 87.3703 Tj +(6314 static void consputc\(int\);) 135.4239 Tj 0 -170.8805 Td -(6315 crt[--pos] = ' ' | 0x0700;) 161.635 Tj +(6315 ) 21.8426 Tj 0 -180.3739 Td -(6316 } else) 56.7907 Tj +(6316 static int panicked = 0;) 126.6869 Tj 0 -189.8672 Td -(6317 crt[pos++] = \(c&0xff\) | 0x0700; // black on white) 257.7424 Tj +(6317 ) 21.8426 Tj 0 -199.3606 Td -(6318 ) 21.8426 Tj +(6318 static struct {) 87.3703 Tj 0 -208.8539 Td -(6319 if\(\(pos/80\) >= 24\){ // Scroll up.) 179.1091 Tj +(6319 ) 21.8426 Tj +-1504.73 TJm +(struct spinlock lock;) 91.7388 Tj 0 -218.3473 Td -(6320 memmove\(crt, crt+80, sizeof\(crt[0]\)*23*80\);) 227.1628 Tj +(6320 ) 21.8426 Tj +-1504.73 TJm +(int locking;) 52.4222 Tj 0 -227.8407 Td -(6321 pos -= 80;) 83.0018 Tj +(6321 } cons;) 52.4222 Tj 0 -237.334 Td -(6322 memset\(crt+pos, 0, sizeof\(crt[0]\)*\(24*80 - pos\)\)\ -;) 253.3738 Tj +(6322 ) 21.8426 Tj 0 -246.8274 Td -(6323 }) 34.9481 Tj +(6323 static void) 69.8962 Tj 0 -256.3207 Td -(6324 ) 21.8426 Tj +(6324 printint\(int xx, int base, int sgn\)) 174.7406 Tj 0 -265.8141 Td -(6325 outb\(CRTPORT, 14\);) 109.2129 Tj +(6325 {) 26.2111 Tj 0 -275.3075 Td -(6326 outb\(CRTPORT+1, pos>>8\);) 135.4239 Tj +(6326 static char digits[] = "0123456789abcdef";) 214.0572 Tj 0 -284.8008 Td -(6327 outb\(CRTPORT, 15\);) 109.2129 Tj +(6327 char buf[16];) 87.3703 Tj 0 -294.2942 Td -(6328 outb\(CRTPORT+1, pos\);) 122.3184 Tj +(6328 int i = 0, neg = 0;) 113.5814 Tj 0 -303.7875 Td -(6329 crt[pos] = ' ' | 0x0700;) 135.4239 Tj +(6329 uint x;) 61.1592 Tj 0 -313.2809 Td -(6330 }) 26.2111 Tj +(6330 ) 21.8426 Tj 0 -322.7743 Td -(6331 ) 21.8426 Tj +(6331 if\(sgn && xx < 0\){) 109.2129 Tj 0 -332.2676 Td -(6332 void) 39.3166 Tj +(6332 neg = 1;) 74.2647 Tj 0 -341.761 Td -(6333 cons_putc\(int c\)) 91.7388 Tj +(6333 x = -xx;) 74.2647 Tj 0 -351.2543 Td -(6334 {) 26.2111 Tj +(6334 } else) 56.7907 Tj 0 -360.7477 Td -(6335 if\(panicked\){) 87.3703 Tj +(6335 x = xx;) 69.8962 Tj 0 -370.2411 Td -(6336 cli\(\);) 65.5277 Tj +(6336 ) 21.8426 Tj 0 -379.7344 Td -(6337 for\(;;\)) 69.8962 Tj +(6337 do{) 43.6851 Tj 0 -389.2278 Td -(6338 ;) 52.4222 Tj +(6338 buf[i++] = digits[x % base];) 161.635 Tj 0 -398.7211 Td -(6339 }) 34.9481 Tj +(6339 }while\(\(x /= base\) != 0\);) 139.7925 Tj 0 -408.2145 Td -(6340 ) 21.8426 Tj +(6340 if\(neg\)) 61.1592 Tj 0 -417.7079 Td -(6341 lpt_putc\(c\);) 83.0018 Tj +(6341 buf[i++] = '-';) 104.8443 Tj 0 -427.2012 Td -(6342 cga_putc\(c\);) 83.0018 Tj +(6342 ) 21.8426 Tj 0 -436.6946 Td -(6343 }) 26.2111 Tj +(6343 while\(--i >= 0\)) 96.1073 Tj 0 -446.1879 Td -(6344 ) 21.8426 Tj +(6344 consputc\(buf[i]\);) 113.5814 Tj 0 -455.6813 Td -(6345 ) 21.8426 Tj +(6345 }) 26.2111 Tj 0 -465.1747 Td (6346 ) 21.8426 Tj 0 -474.668 Td @@ -20907,107 +21064,107 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/console.c Page 3) 174.7406 Tj +(Aug 8 01:04 2009 xv6/console.c Page 2) 174.7406 Tj 0 -28.4801 Td -(6350 void) 39.3166 Tj +(6350 // Print to the console. only understands %d, %x, %p, %s.) 270.8479 Tj 0 -37.9735 Td -(6351 printint\(int xx, int base, int sgn\)) 174.7406 Tj +(6351 void) 39.3166 Tj 0 -47.4668 Td -(6352 {) 26.2111 Tj +(6352 cprintf\(char *fmt, ...\)) 122.3184 Tj 0 -56.9602 Td -(6353 static char digits[] = "0123456789ABCDEF";) 214.0572 Tj +(6353 {) 26.2111 Tj 0 -66.4535 Td -(6354 char buf[16];) 87.3703 Tj +(6354 int i, c, state, locking;) 139.7925 Tj 0 -75.9469 Td -(6355 int i = 0, neg = 0;) 113.5814 Tj +(6355 uint *argp;) 78.6333 Tj 0 -85.4403 Td -(6356 uint x;) 61.1592 Tj +(6356 char *s;) 65.5277 Tj 0 -94.9336 Td (6357 ) 21.8426 Tj 0 -104.427 Td -(6358 if\(sgn && xx < 0\){) 109.2129 Tj +(6358 locking = cons.locking;) 131.0554 Tj 0 -113.9203 Td -(6359 neg = 1;) 74.2647 Tj +(6359 if\(locking\)) 78.6333 Tj 0 -123.4137 Td -(6360 x = 0 - xx;) 87.3703 Tj +(6360 acquire\(&cons.lock\);) 126.6869 Tj 0 -132.9071 Td -(6361 } else {) 65.5277 Tj +(6361 ) 21.8426 Tj 0 -142.4004 Td -(6362 x = xx;) 69.8962 Tj +(6362 argp = \(uint*\)\(void*\)&fmt + 1;) 161.635 Tj 0 -151.8938 Td -(6363 }) 34.9481 Tj +(6363 state = 0;) 74.2647 Tj 0 -161.3871 Td -(6364 ) 21.8426 Tj +(6364 for\(i = 0; \(c = fmt[i] & 0xff\) != 0; i++\){) 214.0572 Tj 0 -170.8805 Td -(6365 do{) 43.6851 Tj +(6365 if\(c != '%'\){) 96.1073 Tj 0 -180.3739 Td -(6366 buf[i++] = digits[x % base];) 161.635 Tj +(6366 consputc\(c\);) 100.4758 Tj 0 -189.8672 Td -(6367 }while\(\(x /= base\) != 0\);) 139.7925 Tj +(6367 continue;) 87.3703 Tj 0 -199.3606 Td -(6368 if\(neg\)) 61.1592 Tj +(6368 }) 43.6851 Tj 0 -208.8539 Td -(6369 buf[i++] = '-';) 104.8443 Tj +(6369 c = fmt[++i] & 0xff;) 126.6869 Tj 0 -218.3473 Td -(6370 ) 21.8426 Tj +(6370 if\(c == 0\)) 83.0018 Tj 0 -227.8407 Td -(6371 while\(--i >= 0\)) 96.1073 Tj +(6371 break;) 74.2647 Tj 0 -237.334 Td -(6372 cons_putc\(buf[i]\);) 117.9499 Tj +(6372 switch\(c\){) 83.0018 Tj 0 -246.8274 Td -(6373 }) 26.2111 Tj +(6373 case 'd':) 78.6333 Tj 0 -256.3207 Td -(6374 ) 21.8426 Tj +(6374 printint\(*argp++, 10, 1\);) 157.2665 Tj 0 -265.8141 Td -(6375 // Print to the console. only understands %d, %x, %p, %s.) 270.8479 Tj +(6375 break;) 74.2647 Tj 0 -275.3075 Td -(6376 void) 39.3166 Tj +(6376 case 'x':) 78.6333 Tj 0 -284.8008 Td -(6377 cprintf\(char *fmt, ...\)) 122.3184 Tj +(6377 case 'p':) 78.6333 Tj 0 -294.2942 Td -(6378 {) 26.2111 Tj +(6378 printint\(*argp++, 16, 0\);) 157.2665 Tj 0 -303.7875 Td -(6379 int i, c, state, locking;) 139.7925 Tj +(6379 break;) 74.2647 Tj 0 -313.2809 Td -(6380 uint *argp;) 78.6333 Tj +(6380 case 's':) 78.6333 Tj 0 -322.7743 Td -(6381 char *s;) 65.5277 Tj +(6381 if\(\(s = \(char*\)*argp++\) == 0\)) 174.7406 Tj 0 -332.2676 Td -(6382 ) 21.8426 Tj +(6382 s = "\(null\)";) 113.5814 Tj 0 -341.761 Td -(6383 locking = use_console_lock;) 148.5295 Tj +(6383 for\(; *s; s++\)) 109.2129 Tj 0 -351.2543 Td -(6384 if\(locking\)) 78.6333 Tj +(6384 consputc\(*s\);) 113.5814 Tj 0 -360.7477 Td -(6385 acquire\(&console_lock\);) 139.7925 Tj +(6385 break;) 74.2647 Tj 0 -370.2411 Td -(6386 ) 21.8426 Tj +(6386 case '%':) 78.6333 Tj 0 -379.7344 Td -(6387 argp = \(uint*\)\(void*\)&fmt + 1;) 161.635 Tj +(6387 consputc\('%'\);) 109.2129 Tj 0 -389.2278 Td -(6388 state = 0;) 74.2647 Tj +(6388 break;) 74.2647 Tj 0 -398.7211 Td -(6389 for\(i = 0; fmt[i]; i++\){) 135.4239 Tj +(6389 default:) 74.2647 Tj 0 -408.2145 Td -(6390 c = fmt[i] & 0xff;) 117.9499 Tj +(6390 // Print unknown % sequence to draw attention.) 249.0053 Tj 0 -417.7079 Td -(6391 switch\(state\){) 100.4758 Tj +(6391 consputc\('%'\);) 109.2129 Tj 0 -427.2012 Td -(6392 case 0:) 69.8962 Tj +(6392 consputc\(c\);) 100.4758 Tj 0 -436.6946 Td -(6393 if\(c == '%'\)) 100.4758 Tj +(6393 break;) 74.2647 Tj 0 -446.1879 Td -(6394 state = '%';) 109.2129 Tj +(6394 }) 43.6851 Tj 0 -455.6813 Td -(6395 else) 65.5277 Tj +(6395 }) 34.9481 Tj 0 -465.1747 Td -(6396 cons_putc\(c\);) 113.5814 Tj +(6396 ) 21.8426 Tj 0 -474.668 Td -(6397 break;) 74.2647 Tj +(6397 if\(locking\)) 78.6333 Tj 0 -484.1614 Td -(6398 ) 21.8426 Tj +(6398 release\(&cons.lock\);) 126.6869 Tj 0 -493.6547 Td -(6399 ) 21.8426 Tj +(6399 }) 26.2111 Tj 0 -522.1348 Td (Sheet 63) 34.9481 Tj Q @@ -21038,6 +21195,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -21055,103 +21214,103 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/console.c Page 4) 174.7406 Tj +(Aug 8 01:04 2009 xv6/console.c Page 3) 174.7406 Tj 0 -28.4801 Td -(6400 case '%':) 78.6333 Tj +(6400 void) 39.3166 Tj 0 -37.9735 Td -(6401 switch\(c\){) 91.7388 Tj +(6401 panic\(char *s\)) 83.0018 Tj 0 -47.4668 Td -(6402 case 'd':) 87.3703 Tj +(6402 {) 26.2111 Tj 0 -56.9602 Td -(6403 printint\(*argp++, 10, 1\);) 166.0035 Tj +(6403 int i;) 56.7907 Tj 0 -66.4535 Td -(6404 break;) 83.0018 Tj +(6404 uint pcs[10];) 87.3703 Tj 0 -75.9469 Td -(6405 case 'x':) 87.3703 Tj +(6405 ) 21.8426 Tj 0 -85.4403 Td -(6406 case 'p':) 87.3703 Tj +(6406 cli\(\);) 56.7907 Tj 0 -94.9336 Td -(6407 printint\(*argp++, 16, 0\);) 166.0035 Tj +(6407 cons.locking = 0;) 104.8443 Tj 0 -104.427 Td -(6408 break;) 83.0018 Tj +(6408 cprintf\("cpu%d: panic: ", cpu\(\)\);) 174.7406 Tj 0 -113.9203 Td -(6409 case 's':) 87.3703 Tj +(6409 cprintf\(s\);) 78.6333 Tj 0 -123.4137 Td -(6410 s = \(char*\)*argp++;) 139.7925 Tj +(6410 cprintf\("\\n"\);) 91.7388 Tj 0 -132.9071 Td -(6411 if\(s == 0\)) 100.4758 Tj +(6411 getcallerpcs\(&s, pcs\);) 126.6869 Tj 0 -142.4004 Td -(6412 s = "\(null\)";) 122.3184 Tj +(6412 for\(i=0; i<10; i++\)) 113.5814 Tj 0 -151.8938 Td -(6413 for\(; *s; s++\)) 117.9499 Tj +(6413 cprintf\(" %p", pcs[i]\);) 139.7925 Tj 0 -161.3871 Td -(6414 cons_putc\(*s\);) 126.6869 Tj +(6414 panicked = 1; // freeze other CPU) 174.7406 Tj 0 -170.8805 Td -(6415 break;) 83.0018 Tj +(6415 for\(;;\)) 61.1592 Tj 0 -180.3739 Td -(6416 case '%':) 87.3703 Tj +(6416 ;) 43.6851 Tj 0 -189.8672 Td -(6417 cons_putc\('%'\);) 122.3184 Tj +(6417 }) 26.2111 Tj 0 -199.3606 Td -(6418 break;) 83.0018 Tj +(6418 ) 21.8426 Tj 0 -208.8539 Td -(6419 default:) 83.0018 Tj +(6419 ) 21.8426 Tj 0 -218.3473 Td -(6420 // Print unknown % sequence to draw attention.) 257.7424 Tj +(6420 ) 21.8426 Tj 0 -227.8407 Td -(6421 cons_putc\('%'\);) 122.3184 Tj +(6421 ) 21.8426 Tj 0 -237.334 Td -(6422 cons_putc\(c\);) 113.5814 Tj +(6422 ) 21.8426 Tj 0 -246.8274 Td -(6423 break;) 83.0018 Tj +(6423 ) 21.8426 Tj 0 -256.3207 Td -(6424 }) 52.4222 Tj +(6424 ) 21.8426 Tj 0 -265.8141 Td -(6425 state = 0;) 91.7388 Tj +(6425 ) 21.8426 Tj 0 -275.3075 Td -(6426 break;) 74.2647 Tj +(6426 ) 21.8426 Tj 0 -284.8008 Td -(6427 }) 43.6851 Tj +(6427 ) 21.8426 Tj 0 -294.2942 Td -(6428 }) 34.9481 Tj +(6428 ) 21.8426 Tj 0 -303.7875 Td (6429 ) 21.8426 Tj 0 -313.2809 Td -(6430 if\(locking\)) 78.6333 Tj +(6430 ) 21.8426 Tj 0 -322.7743 Td -(6431 release\(&console_lock\);) 139.7925 Tj +(6431 ) 21.8426 Tj 0 -332.2676 Td -(6432 }) 26.2111 Tj +(6432 ) 21.8426 Tj 0 -341.761 Td (6433 ) 21.8426 Tj 0 -351.2543 Td -(6434 int) 34.9481 Tj +(6434 ) 21.8426 Tj 0 -360.7477 Td -(6435 console_write\(struct inode *ip, char *buf, int n\)) 235.8998 Tj +(6435 ) 21.8426 Tj 0 -370.2411 Td -(6436 {) 26.2111 Tj +(6436 ) 21.8426 Tj 0 -379.7344 Td -(6437 int i;) 56.7907 Tj +(6437 ) 21.8426 Tj 0 -389.2278 Td (6438 ) 21.8426 Tj 0 -398.7211 Td -(6439 iunlock\(ip\);) 83.0018 Tj +(6439 ) 21.8426 Tj 0 -408.2145 Td -(6440 acquire\(&console_lock\);) 131.0554 Tj +(6440 ) 21.8426 Tj 0 -417.7079 Td -(6441 for\(i = 0; i < n; i++\)) 126.6869 Tj +(6441 ) 21.8426 Tj 0 -427.2012 Td -(6442 cons_putc\(buf[i] & 0xff\);) 148.5295 Tj +(6442 ) 21.8426 Tj 0 -436.6946 Td -(6443 release\(&console_lock\);) 131.0554 Tj +(6443 ) 21.8426 Tj 0 -446.1879 Td -(6444 ilock\(ip\);) 74.2647 Tj +(6444 ) 21.8426 Tj 0 -455.6813 Td (6445 ) 21.8426 Tj 0 -465.1747 Td -(6446 return n;) 69.8962 Tj +(6446 ) 21.8426 Tj 0 -474.668 Td -(6447 }) 26.2111 Tj +(6447 ) 21.8426 Tj 0 -484.1614 Td (6448 ) 21.8426 Tj 0 -493.6547 Td @@ -21174,107 +21333,106 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/console.c Page 5) 174.7406 Tj +(Aug 8 01:04 2009 xv6/console.c Page 4) 174.7406 Tj 0 -28.4801 Td -(6450 #define INPUT_BUF 128) 113.5814 Tj +(6450 #define BACKSPACE 0x100) 122.3184 Tj 0 -37.9735 Td -(6451 struct {) 56.7907 Tj +(6451 #define CRTPORT 0x3d4) 113.5814 Tj 0 -47.4668 Td -(6452 struct spinlock lock;) 122.3184 Tj +(6452 static ushort *crt = \(ushort*\)0xb8000; // CGA memory) 253.3738 Tj 0 -56.9602 Td -(6453 char buf[INPUT_BUF];) 117.9499 Tj +(6453 ) 21.8426 Tj 0 -66.4535 Td -(6454 uint r; // Read index) 126.6869 Tj +(6454 static void) 69.8962 Tj 0 -75.9469 Td -(6455 uint w; // Write index) 131.0554 Tj +(6455 cgaputc\(int c\)) 83.0018 Tj 0 -85.4403 Td -(6456 uint e; // Edit index) 126.6869 Tj +(6456 {) 26.2111 Tj 0 -94.9336 Td -(6457 } input;) 56.7907 Tj +(6457 int pos;) 65.5277 Tj 0 -104.427 Td (6458 ) 21.8426 Tj 0 -113.9203 Td -(6459 #define C\(x\) \(\(x\)-'@'\) // Control-x) 183.4776 Tj +(6459 // Cursor position: col + 80*row.) 174.7406 Tj 0 -123.4137 Td -(6460 ) 21.8426 Tj +(6460 outb\(CRTPORT, 14\);) 109.2129 Tj 0 -132.9071 Td -(6461 void) 39.3166 Tj +(6461 pos = inb\(CRTPORT+1\) << 8;) 144.161 Tj 0 -142.4004 Td -(6462 console_intr\(int \(*getc\)\(void\)\)) 157.2665 Tj +(6462 outb\(CRTPORT, 15\);) 109.2129 Tj 0 -151.8938 Td -(6463 {) 26.2111 Tj +(6463 pos |= inb\(CRTPORT+1\);) 126.6869 Tj 0 -161.3871 Td -(6464 int c;) 56.7907 Tj +(6464 ) 21.8426 Tj 0 -170.8805 Td -(6465 ) 21.8426 Tj +(6465 if\(c == '\\n'\)) 87.3703 Tj 0 -180.3739 Td -(6466 acquire\(&input.lock\);) 122.3184 Tj +(6466 pos += 80 - pos%80;) 122.3184 Tj 0 -189.8672 Td -(6467 while\(\(c = getc\(\)\) >= 0\){) 139.7925 Tj +(6467 else if\(c == BACKSPACE\){) 135.4239 Tj 0 -199.3606 Td -(6468 switch\(c\){) 83.0018 Tj +(6468 if\(pos > 0\)) 87.3703 Tj 0 -208.8539 Td -(6469 case C\('P'\): // Process listing.) 183.4776 Tj +(6469 crt[--pos] = ' ' | 0x0700;) 161.635 Tj 0 -218.3473 Td -(6470 procdump\(\);) 96.1073 Tj +(6470 } else) 56.7907 Tj 0 -227.8407 Td -(6471 break;) 74.2647 Tj +(6471 crt[pos++] = \(c&0xff\) | 0x0700; // black on white) 257.7424 Tj 0 -237.334 Td -(6472 case C\('U'\): // Kill line.) 157.2665 Tj +(6472 ) 21.8426 Tj 0 -246.8274 Td -(6473 while\(input.e != input.w &&) 166.0035 Tj +(6473 if\(\(pos/80\) >= 24\){ // Scroll up.) 179.1091 Tj 0 -256.3207 Td -(6474 input.buf[\(input.e-1\) % INPUT_BUF] != '\\n'\)\ -{) 266.4794 Tj +(6474 memmove\(crt, crt+80, sizeof\(crt[0]\)*23*80\);) 227.1628 Tj 0 -265.8141 Td -(6475 input.e--;) 100.4758 Tj +(6475 pos -= 80;) 83.0018 Tj 0 -275.3075 Td -(6476 cons_putc\(BACKSPACE\);) 148.5295 Tj +(6476 memset\(crt+pos, 0, sizeof\(crt[0]\)*\(24*80 - pos\)\)\ +;) 253.3738 Tj 0 -284.8008 Td -(6477 }) 52.4222 Tj +(6477 }) 34.9481 Tj 0 -294.2942 Td -(6478 break;) 74.2647 Tj +(6478 ) 21.8426 Tj 0 -303.7875 Td -(6479 case C\('H'\): // Backspace) 152.898 Tj +(6479 outb\(CRTPORT, 14\);) 109.2129 Tj 0 -313.2809 Td -(6480 if\(input.e != input.w\){) 148.5295 Tj +(6480 outb\(CRTPORT+1, pos>>8\);) 135.4239 Tj 0 -322.7743 Td -(6481 input.e--;) 100.4758 Tj +(6481 outb\(CRTPORT, 15\);) 109.2129 Tj 0 -332.2676 Td -(6482 cons_putc\(BACKSPACE\);) 148.5295 Tj +(6482 outb\(CRTPORT+1, pos\);) 122.3184 Tj 0 -341.761 Td -(6483 }) 52.4222 Tj +(6483 crt[pos] = ' ' | 0x0700;) 135.4239 Tj 0 -351.2543 Td -(6484 break;) 74.2647 Tj +(6484 }) 26.2111 Tj 0 -360.7477 Td -(6485 default:) 74.2647 Tj +(6485 ) 21.8426 Tj 0 -370.2411 Td -(6486 if\(c != 0 && input.e-input.r < INPUT_BUF\){) 231.5313 Tj +(6486 void) 39.3166 Tj 0 -379.7344 Td -(6487 input.buf[input.e++ % INPUT_BUF] = c;) 218.4257 Tj +(6487 consputc\(int c\)) 87.3703 Tj 0 -389.2278 Td -(6488 cons_putc\(c\);) 113.5814 Tj +(6488 {) 26.2111 Tj 0 -398.7211 Td -(6489 if\(c == '\\n' || c == C\('D'\) || input.e == inpu\ -t.r+INPUT_BUF\){) 323.2701 Tj +(6489 if\(panicked\){) 87.3703 Tj 0 -408.2145 Td -(6490 input.w = input.e;) 144.161 Tj +(6490 cli\(\);) 65.5277 Tj 0 -417.7079 Td -(6491 wakeup\(&input.r\);) 139.7925 Tj +(6491 for\(;;\)) 69.8962 Tj 0 -427.2012 Td -(6492 }) 61.1592 Tj +(6492 ;) 52.4222 Tj 0 -436.6946 Td -(6493 }) 52.4222 Tj +(6493 }) 34.9481 Tj 0 -446.1879 Td -(6494 break;) 74.2647 Tj +(6494 ) 21.8426 Tj 0 -455.6813 Td -(6495 }) 43.6851 Tj +(6495 uartputc\(c\);) 83.0018 Tj 0 -465.1747 Td -(6496 }) 34.9481 Tj +(6496 cgaputc\(c\);) 78.6333 Tj 0 -474.668 Td -(6497 release\(&input.lock\);) 122.3184 Tj +(6497 }) 26.2111 Tj 0 -484.1614 Td -(6498 }) 26.2111 Tj +(6498 ) 21.8426 Tj 0 -493.6547 Td (6499 ) 21.8426 Tj 0 -522.1348 Td @@ -21307,6 +21465,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -21324,105 +21484,107 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/console.c Page 6) 174.7406 Tj +(Aug 8 01:04 2009 xv6/console.c Page 5) 174.7406 Tj 0 -28.4801 Td -(6500 int) 34.9481 Tj +(6500 #define INPUT_BUF 128) 113.5814 Tj 0 -37.9735 Td -(6501 console_read\(struct inode *ip, char *dst, int n\)) 231.5313 Tj +(6501 struct {) 56.7907 Tj 0 -47.4668 Td -(6502 {) 26.2111 Tj +(6502 struct spinlock lock;) 122.3184 Tj 0 -56.9602 Td -(6503 uint target;) 83.0018 Tj +(6503 char buf[INPUT_BUF];) 117.9499 Tj 0 -66.4535 Td -(6504 int c;) 56.7907 Tj +(6504 uint r; // Read index) 126.6869 Tj 0 -75.9469 Td -(6505 ) 21.8426 Tj +(6505 uint w; // Write index) 131.0554 Tj 0 -85.4403 Td -(6506 iunlock\(ip\);) 83.0018 Tj +(6506 uint e; // Edit index) 126.6869 Tj 0 -94.9336 Td -(6507 target = n;) 78.6333 Tj +(6507 } input;) 56.7907 Tj 0 -104.427 Td -(6508 acquire\(&input.lock\);) 122.3184 Tj +(6508 ) 21.8426 Tj 0 -113.9203 Td -(6509 while\(n > 0\){) 87.3703 Tj +(6509 #define C\(x\) \(\(x\)-'@'\) // Control-x) 183.4776 Tj 0 -123.4137 Td -(6510 while\(input.r == input.w\){) 152.898 Tj +(6510 ) 21.8426 Tj 0 -132.9071 Td -(6511 if\(cp->killed\){) 113.5814 Tj +(6511 void) 39.3166 Tj 0 -142.4004 Td -(6512 release\(&input.lock\);) 148.5295 Tj +(6512 consoleintr\(int \(*getc\)\(void\)\)) 152.898 Tj 0 -151.8938 Td -(6513 ilock\(ip\);) 100.4758 Tj +(6513 {) 26.2111 Tj 0 -161.3871 Td -(6514 return -1;) 100.4758 Tj +(6514 int c;) 56.7907 Tj 0 -170.8805 Td -(6515 }) 52.4222 Tj +(6515 ) 21.8426 Tj 0 -180.3739 Td -(6516 sleep\(&input.r, &input.lock\);) 174.7406 Tj +(6516 acquire\(&input.lock\);) 122.3184 Tj 0 -189.8672 Td -(6517 }) 43.6851 Tj +(6517 while\(\(c = getc\(\)\) >= 0\){) 139.7925 Tj 0 -199.3606 Td -(6518 c = input.buf[input.r++ % INPUT_BUF];) 200.9517 Tj +(6518 switch\(c\){) 83.0018 Tj 0 -208.8539 Td -(6519 if\(c == C\('D'\)\){ // EOF) 144.161 Tj +(6519 case C\('P'\): // Process listing.) 183.4776 Tj 0 -218.3473 Td -(6520 if\(n < target\){) 113.5814 Tj +(6520 procdump\(\);) 96.1073 Tj 0 -227.8407 Td -(6521 // Save ^D for next time, to make sure) 222.7942 Tj +(6521 break;) 74.2647 Tj 0 -237.334 Td -(6522 // caller gets a 0-byte result.) 192.2146 Tj +(6522 case C\('U'\): // Kill line.) 157.2665 Tj 0 -246.8274 Td -(6523 input.r--;) 100.4758 Tj +(6523 while\(input.e != input.w &&) 166.0035 Tj 0 -256.3207 Td -(6524 }) 52.4222 Tj +(6524 input.buf[\(input.e-1\) % INPUT_BUF] != '\\n'\)\ +{) 266.4794 Tj 0 -265.8141 Td -(6525 break;) 74.2647 Tj +(6525 input.e--;) 100.4758 Tj 0 -275.3075 Td -(6526 }) 43.6851 Tj +(6526 consputc\(BACKSPACE\);) 144.161 Tj 0 -284.8008 Td -(6527 *dst++ = c;) 87.3703 Tj +(6527 }) 52.4222 Tj 0 -294.2942 Td -(6528 --n;) 56.7907 Tj +(6528 break;) 74.2647 Tj 0 -303.7875 Td -(6529 if\(c == '\\n'\)) 96.1073 Tj +(6529 case C\('H'\): // Backspace) 152.898 Tj 0 -313.2809 Td -(6530 break;) 74.2647 Tj +(6530 if\(input.e != input.w\){) 148.5295 Tj 0 -322.7743 Td -(6531 }) 34.9481 Tj +(6531 input.e--;) 100.4758 Tj 0 -332.2676 Td -(6532 release\(&input.lock\);) 122.3184 Tj +(6532 consputc\(BACKSPACE\);) 144.161 Tj 0 -341.761 Td -(6533 ilock\(ip\);) 74.2647 Tj +(6533 }) 52.4222 Tj 0 -351.2543 Td -(6534 ) 21.8426 Tj +(6534 break;) 74.2647 Tj 0 -360.7477 Td -(6535 return target - n;) 109.2129 Tj +(6535 default:) 74.2647 Tj 0 -370.2411 Td -(6536 }) 26.2111 Tj +(6536 if\(c != 0 && input.e-input.r < INPUT_BUF\){) 231.5313 Tj 0 -379.7344 Td -(6537 ) 21.8426 Tj +(6537 input.buf[input.e++ % INPUT_BUF] = c;) 218.4257 Tj 0 -389.2278 Td -(6538 ) 21.8426 Tj +(6538 consputc\(c\);) 109.2129 Tj 0 -398.7211 Td -(6539 ) 21.8426 Tj +(6539 if\(c == '\\n' || c == C\('D'\) || input.e == inpu\ +t.r+INPUT_BUF\){) 323.2701 Tj 0 -408.2145 Td -(6540 ) 21.8426 Tj +(6540 input.w = input.e;) 144.161 Tj 0 -417.7079 Td -(6541 ) 21.8426 Tj +(6541 wakeup\(&input.r\);) 139.7925 Tj 0 -427.2012 Td -(6542 ) 21.8426 Tj +(6542 }) 61.1592 Tj 0 -436.6946 Td -(6543 ) 21.8426 Tj +(6543 }) 52.4222 Tj 0 -446.1879 Td -(6544 ) 21.8426 Tj +(6544 break;) 74.2647 Tj 0 -455.6813 Td -(6545 ) 21.8426 Tj +(6545 }) 43.6851 Tj 0 -465.1747 Td -(6546 ) 21.8426 Tj +(6546 }) 34.9481 Tj 0 -474.668 Td -(6547 ) 21.8426 Tj +(6547 release\(&input.lock\);) 122.3184 Tj 0 -484.1614 Td -(6548 ) 21.8426 Tj +(6548 }) 26.2111 Tj 0 -493.6547 Td (6549 ) 21.8426 Tj 0 -522.1348 Td @@ -21443,81 +21605,81 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/console.c Page 7) 174.7406 Tj +(Aug 8 01:04 2009 xv6/console.c Page 6) 174.7406 Tj 0 -28.4801 Td -(6550 void) 39.3166 Tj +(6550 int) 34.9481 Tj 0 -37.9735 Td -(6551 console_init\(void\)) 100.4758 Tj +(6551 consoleread\(struct inode *ip, char *dst, int n\)) 227.1628 Tj 0 -47.4668 Td (6552 {) 26.2111 Tj 0 -56.9602 Td -(6553 initlock\(&console_lock, "console"\);) 183.4776 Tj +(6553 uint target;) 83.0018 Tj 0 -66.4535 Td -(6554 initlock\(&input.lock, "console input"\);) 200.9517 Tj +(6554 int c;) 56.7907 Tj 0 -75.9469 Td (6555 ) 21.8426 Tj 0 -85.4403 Td -(6556 devsw[CONSOLE].write = console_write;) 192.2146 Tj +(6556 iunlock\(ip\);) 83.0018 Tj 0 -94.9336 Td -(6557 devsw[CONSOLE].read = console_read;) 183.4776 Tj +(6557 target = n;) 78.6333 Tj 0 -104.427 Td -(6558 use_console_lock = 1;) 122.3184 Tj +(6558 acquire\(&input.lock\);) 122.3184 Tj 0 -113.9203 Td -(6559 ) 21.8426 Tj +(6559 while\(n > 0\){) 87.3703 Tj 0 -123.4137 Td -(6560 pic_enable\(IRQ_KBD\);) 117.9499 Tj +(6560 while\(input.r == input.w\){) 152.898 Tj 0 -132.9071 Td -(6561 ioapic_enable\(IRQ_KBD, 0\);) 144.161 Tj +(6561 if\(cp->killed\){) 113.5814 Tj 0 -142.4004 Td -(6562 }) 26.2111 Tj +(6562 release\(&input.lock\);) 148.5295 Tj 0 -151.8938 Td -(6563 ) 21.8426 Tj +(6563 ilock\(ip\);) 100.4758 Tj 0 -161.3871 Td -(6564 void) 39.3166 Tj +(6564 return -1;) 100.4758 Tj 0 -170.8805 Td -(6565 panic\(char *s\)) 83.0018 Tj +(6565 }) 52.4222 Tj 0 -180.3739 Td -(6566 {) 26.2111 Tj +(6566 sleep\(&input.r, &input.lock\);) 174.7406 Tj 0 -189.8672 Td -(6567 int i;) 56.7907 Tj +(6567 }) 43.6851 Tj 0 -199.3606 Td -(6568 uint pcs[10];) 87.3703 Tj +(6568 c = input.buf[input.r++ % INPUT_BUF];) 200.9517 Tj 0 -208.8539 Td -(6569 ) 21.8426 Tj +(6569 if\(c == C\('D'\)\){ // EOF) 144.161 Tj 0 -218.3473 Td -(6570 __asm __volatile\("cli"\);) 135.4239 Tj +(6570 if\(n < target\){) 113.5814 Tj 0 -227.8407 Td -(6571 use_console_lock = 0;) 122.3184 Tj +(6571 // Save ^D for next time, to make sure) 222.7942 Tj 0 -237.334 Td -(6572 cprintf\("cpu%d: panic: ", cpu\(\)\);) 174.7406 Tj +(6572 // caller gets a 0-byte result.) 192.2146 Tj 0 -246.8274 Td -(6573 cprintf\(s\);) 78.6333 Tj +(6573 input.r--;) 100.4758 Tj 0 -256.3207 Td -(6574 cprintf\("\\n"\);) 91.7388 Tj +(6574 }) 52.4222 Tj 0 -265.8141 Td -(6575 getcallerpcs\(&s, pcs\);) 126.6869 Tj +(6575 break;) 74.2647 Tj 0 -275.3075 Td -(6576 for\(i=0; i<10; i++\)) 113.5814 Tj +(6576 }) 43.6851 Tj 0 -284.8008 Td -(6577 cprintf\(" %p", pcs[i]\);) 139.7925 Tj +(6577 *dst++ = c;) 87.3703 Tj 0 -294.2942 Td -(6578 panicked = 1; // freeze other CPU) 174.7406 Tj +(6578 --n;) 56.7907 Tj 0 -303.7875 Td -(6579 for\(;;\)) 61.1592 Tj +(6579 if\(c == '\\n'\)) 96.1073 Tj 0 -313.2809 Td -(6580 ;) 43.6851 Tj +(6580 break;) 74.2647 Tj 0 -322.7743 Td -(6581 }) 26.2111 Tj +(6581 }) 34.9481 Tj 0 -332.2676 Td -(6582 ) 21.8426 Tj +(6582 release\(&input.lock\);) 122.3184 Tj 0 -341.761 Td -(6583 ) 21.8426 Tj +(6583 ilock\(ip\);) 74.2647 Tj 0 -351.2543 Td (6584 ) 21.8426 Tj 0 -360.7477 Td -(6585 ) 21.8426 Tj +(6585 return target - n;) 109.2129 Tj 0 -370.2411 Td -(6586 ) 21.8426 Tj +(6586 }) 26.2111 Tj 0 -379.7344 Td (6587 ) 21.8426 Tj 0 -389.2278 Td @@ -21574,6 +21736,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -21591,75 +21755,71 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/timer.c Page 1) 166.0035 Tj +(Aug 8 01:04 2009 xv6/console.c Page 7) 174.7406 Tj 0 -28.4801 Td -(6600 // Intel 8253/8254/82C54 Programmable Interval Timer \(PIT\ -\).) 279.5849 Tj +(6600 int) 34.9481 Tj 0 -37.9735 Td -(6601 // Only used on uniprocessors;) 152.898 Tj +(6601 consolewrite\(struct inode *ip, char *buf, int n\)) 231.5313 Tj 0 -47.4668 Td -(6602 // SMP machines use the local APIC timer.) 200.9517 Tj +(6602 {) 26.2111 Tj 0 -56.9602 Td -(6603 ) 21.8426 Tj +(6603 int i;) 56.7907 Tj 0 -66.4535 Td -(6604 #include "types.h") 100.4758 Tj +(6604 ) 21.8426 Tj 0 -75.9469 Td -(6605 #include "defs.h") 96.1073 Tj +(6605 iunlock\(ip\);) 83.0018 Tj 0 -85.4403 Td -(6606 #include "traps.h") 100.4758 Tj +(6606 acquire\(&cons.lock\);) 117.9499 Tj 0 -94.9336 Td -(6607 #include "x86.h") 91.7388 Tj +(6607 for\(i = 0; i < n; i++\)) 126.6869 Tj 0 -104.427 Td -(6608 ) 21.8426 Tj +(6608 consputc\(buf[i] & 0xff\);) 144.161 Tj 0 -113.9203 Td -(6609 #define IO_TIMER1 0x040 // 8253 Timer #1) 266.4794 Tj +(6609 release\(&cons.lock\);) 117.9499 Tj 0 -123.4137 Td -(6610 ) 21.8426 Tj +(6610 ilock\(ip\);) 74.2647 Tj 0 -132.9071 Td -(6611 // Frequency of all three count-down timers;) 214.0572 Tj +(6611 ) 21.8426 Tj 0 -142.4004 Td -(6612 // \(TIMER_FREQ/freq\) is the appropriate count) 218.4257 Tj +(6612 return n;) 69.8962 Tj 0 -151.8938 Td -(6613 // to generate a frequency of freq Hz.) 187.8461 Tj +(6613 }) 26.2111 Tj 0 -161.3871 Td (6614 ) 21.8426 Tj 0 -170.8805 Td -(6615 #define TIMER_FREQ 1193182) 157.2665 Tj +(6615 void) 39.3166 Tj 0 -180.3739 Td -(6616 #define TIMER_DIV\(x\) \(\(TIMER_FREQ+\(x\)/2\)/\(x\)\)) 231.5313 Tj +(6616 consoleinit\(void\)) 96.1073 Tj 0 -189.8672 Td -(6617 ) 21.8426 Tj +(6617 {) 26.2111 Tj 0 -199.3606 Td -(6618 #define TIMER_MODE \(IO_TIMER1 + 3\) // timer mode po\ -rt) 275.2164 Tj +(6618 initlock\(&cons.lock, "console"\);) 170.3721 Tj 0 -208.8539 Td -(6619 #define TIMER_SEL0 0x00 // select counter 0) 244.6368 Tj +(6619 initlock\(&input.lock, "input"\);) 166.0035 Tj 0 -218.3473 Td -(6620 #define TIMER_RATEGEN 0x04 // mode 2, rate generator) 270.8479 Tj +(6620 ) 21.8426 Tj 0 -227.8407 Td -(6621 #define TIMER_16BIT 0x30 // r/w counter 16 bits, LS\ -B first) 305.796 Tj +(6621 devsw[CONSOLE].write = consolewrite;) 187.8461 Tj 0 -237.334 Td -(6622 ) 21.8426 Tj +(6622 devsw[CONSOLE].read = consoleread;) 179.1091 Tj 0 -246.8274 Td -(6623 void) 39.3166 Tj +(6623 cons.locking = 1;) 104.8443 Tj 0 -256.3207 Td -(6624 timer_init\(void\)) 91.7388 Tj +(6624 ) 21.8426 Tj 0 -265.8141 Td -(6625 {) 26.2111 Tj +(6625 picenable\(IRQ_KBD\);) 113.5814 Tj 0 -275.3075 Td -(6626 // Interrupt 100 times/sec.) 148.5295 Tj +(6626 ioapicenable\(IRQ_KBD, 0\);) 139.7925 Tj 0 -284.8008 Td -(6627 outb\(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16B\ -IT\);) 288.322 Tj +(6627 }) 26.2111 Tj 0 -294.2942 Td -(6628 outb\(IO_TIMER1, TIMER_DIV\(100\) % 256\);) 196.5831 Tj +(6628 ) 21.8426 Tj 0 -303.7875 Td -(6629 outb\(IO_TIMER1, TIMER_DIV\(100\) / 256\);) 196.5831 Tj +(6629 ) 21.8426 Tj 0 -313.2809 Td -(6630 pic_enable\(IRQ_TIMER\);) 126.6869 Tj +(6630 ) 21.8426 Tj 0 -322.7743 Td -(6631 }) 26.2111 Tj +(6631 ) 21.8426 Tj 0 -332.2676 Td (6632 ) 21.8426 Tj 0 -341.761 Td @@ -21714,71 +21874,75 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/timer.c Page 2) 166.0035 Tj +(Aug 8 01:04 2009 xv6/timer.c Page 1) 166.0035 Tj 0 -28.4801 Td -(6650 // Blank page) 78.6333 Tj +(6650 // Intel 8253/8254/82C54 Programmable Interval Timer \(PIT\ +\).) 279.5849 Tj 0 -37.9735 Td -(6651 ) 21.8426 Tj +(6651 // Only used on uniprocessors;) 152.898 Tj 0 -47.4668 Td -(6652 ) 21.8426 Tj +(6652 // SMP machines use the local APIC timer.) 200.9517 Tj 0 -56.9602 Td (6653 ) 21.8426 Tj 0 -66.4535 Td -(6654 ) 21.8426 Tj +(6654 #include "types.h") 100.4758 Tj 0 -75.9469 Td -(6655 ) 21.8426 Tj +(6655 #include "defs.h") 96.1073 Tj 0 -85.4403 Td -(6656 ) 21.8426 Tj +(6656 #include "traps.h") 100.4758 Tj 0 -94.9336 Td -(6657 ) 21.8426 Tj +(6657 #include "x86.h") 91.7388 Tj 0 -104.427 Td (6658 ) 21.8426 Tj 0 -113.9203 Td -(6659 ) 21.8426 Tj +(6659 #define IO_TIMER1 0x040 // 8253 Timer #1) 266.4794 Tj 0 -123.4137 Td (6660 ) 21.8426 Tj 0 -132.9071 Td -(6661 ) 21.8426 Tj +(6661 // Frequency of all three count-down timers;) 214.0572 Tj 0 -142.4004 Td -(6662 ) 21.8426 Tj +(6662 // \(TIMER_FREQ/freq\) is the appropriate count) 218.4257 Tj 0 -151.8938 Td -(6663 ) 21.8426 Tj +(6663 // to generate a frequency of freq Hz.) 187.8461 Tj 0 -161.3871 Td (6664 ) 21.8426 Tj 0 -170.8805 Td -(6665 ) 21.8426 Tj +(6665 #define TIMER_FREQ 1193182) 157.2665 Tj 0 -180.3739 Td -(6666 ) 21.8426 Tj +(6666 #define TIMER_DIV\(x\) \(\(TIMER_FREQ+\(x\)/2\)/\(x\)\)) 231.5313 Tj 0 -189.8672 Td (6667 ) 21.8426 Tj 0 -199.3606 Td -(6668 ) 21.8426 Tj +(6668 #define TIMER_MODE \(IO_TIMER1 + 3\) // timer mode po\ +rt) 275.2164 Tj 0 -208.8539 Td -(6669 ) 21.8426 Tj +(6669 #define TIMER_SEL0 0x00 // select counter 0) 244.6368 Tj 0 -218.3473 Td -(6670 ) 21.8426 Tj +(6670 #define TIMER_RATEGEN 0x04 // mode 2, rate generator) 270.8479 Tj 0 -227.8407 Td -(6671 ) 21.8426 Tj +(6671 #define TIMER_16BIT 0x30 // r/w counter 16 bits, LS\ +B first) 305.796 Tj 0 -237.334 Td (6672 ) 21.8426 Tj 0 -246.8274 Td -(6673 ) 21.8426 Tj +(6673 void) 39.3166 Tj 0 -256.3207 Td -(6674 ) 21.8426 Tj +(6674 timerinit\(void\)) 87.3703 Tj 0 -265.8141 Td -(6675 ) 21.8426 Tj +(6675 {) 26.2111 Tj 0 -275.3075 Td -(6676 ) 21.8426 Tj +(6676 // Interrupt 100 times/sec.) 148.5295 Tj 0 -284.8008 Td -(6677 ) 21.8426 Tj +(6677 outb\(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16B\ +IT\);) 288.322 Tj 0 -294.2942 Td -(6678 ) 21.8426 Tj +(6678 outb\(IO_TIMER1, TIMER_DIV\(100\) % 256\);) 196.5831 Tj 0 -303.7875 Td -(6679 ) 21.8426 Tj +(6679 outb\(IO_TIMER1, TIMER_DIV\(100\) / 256\);) 196.5831 Tj 0 -313.2809 Td -(6680 ) 21.8426 Tj +(6680 picenable\(IRQ_TIMER\);) 122.3184 Tj 0 -322.7743 Td -(6681 ) 21.8426 Tj +(6681 }) 26.2111 Tj 0 -332.2676 Td (6682 ) 21.8426 Tj 0 -341.761 Td @@ -21845,6 +22009,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -21862,7 +22028,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/initcode.S Page 1) 179.1091 Tj +(Aug 8 01:04 2009 xv6/initcode.S Page 1) 179.1091 Tj 0 -28.4801 Td (6700 # Initial process execs /init.) 152.898 Tj 0 -37.9735 Td @@ -21884,7 +22050,7 @@ q 0 -113.9203 Td (6709 pushl $init) 78.6333 Tj 0 -123.4137 Td -(6710 pushl $0) 65.5277 Tj +(6710 pushl $0 // where caller pc would be) 192.2146 Tj 0 -132.9071 Td (6711 movl $SYS_exec, %eax) 117.9499 Tj 0 -142.4004 Td @@ -21981,81 +22147,81 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/init.c Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/usys.S Page 1) 161.635 Tj 0 -28.4801 Td -(6750 // init: The initial user-level program) 192.2146 Tj +(6750 #include "syscall.h") 109.2129 Tj 0 -37.9735 Td -(6751 ) 21.8426 Tj +(6751 #include "traps.h") 100.4758 Tj 0 -47.4668 Td -(6752 #include "types.h") 100.4758 Tj +(6752 ) 21.8426 Tj 0 -56.9602 Td -(6753 #include "stat.h") 96.1073 Tj +(6753 #define SYSCALL\(name\) \\) 122.3184 Tj 0 -66.4535 Td -(6754 #include "user.h") 96.1073 Tj +(6754 .globl name; \\) 91.7388 Tj 0 -75.9469 Td -(6755 #include "fcntl.h") 100.4758 Tj +(6755 name: \\) 61.1592 Tj 0 -85.4403 Td -(6756 ) 21.8426 Tj +(6756 movl $SYS_ ## name, %eax; \\) 157.2665 Tj 0 -94.9336 Td -(6757 char *sh_args[] = { "sh", 0 };) 152.898 Tj +(6757 int $T_SYSCALL; \\) 113.5814 Tj 0 -104.427 Td -(6758 ) 21.8426 Tj +(6758 ret) 52.4222 Tj 0 -113.9203 Td -(6759 int) 34.9481 Tj +(6759 ) 21.8426 Tj 0 -123.4137 Td -(6760 main\(void\)) 65.5277 Tj +(6760 SYSCALL\(fork\)) 78.6333 Tj 0 -132.9071 Td -(6761 {) 26.2111 Tj +(6761 SYSCALL\(exit\)) 78.6333 Tj 0 -142.4004 Td -(6762 int pid, wpid;) 91.7388 Tj +(6762 SYSCALL\(wait\)) 78.6333 Tj 0 -151.8938 Td -(6763 ) 21.8426 Tj +(6763 SYSCALL\(pipe\)) 78.6333 Tj 0 -161.3871 Td -(6764 if\(open\("console", O_RDWR\) < 0\){) 170.3721 Tj +(6764 SYSCALL\(read\)) 78.6333 Tj 0 -170.8805 Td -(6765 mknod\("console", 1, 1\);) 139.7925 Tj +(6765 SYSCALL\(write\)) 83.0018 Tj 0 -180.3739 Td -(6766 open\("console", O_RDWR\);) 144.161 Tj +(6766 SYSCALL\(close\)) 83.0018 Tj 0 -189.8672 Td -(6767 }) 34.9481 Tj +(6767 SYSCALL\(kill\)) 78.6333 Tj 0 -199.3606 Td -(6768 dup\(0\); // stdout) 109.2129 Tj +(6768 SYSCALL\(exec\)) 78.6333 Tj 0 -208.8539 Td -(6769 dup\(0\); // stderr) 109.2129 Tj +(6769 SYSCALL\(open\)) 78.6333 Tj 0 -218.3473 Td -(6770 ) 21.8426 Tj +(6770 SYSCALL\(mknod\)) 83.0018 Tj 0 -227.8407 Td -(6771 for\(;;\){) 65.5277 Tj +(6771 SYSCALL\(unlink\)) 87.3703 Tj 0 -237.334 Td -(6772 printf\(1, "init: starting sh\\n"\);) 183.4776 Tj +(6772 SYSCALL\(fstat\)) 83.0018 Tj 0 -246.8274 Td -(6773 pid = fork\(\);) 96.1073 Tj +(6773 SYSCALL\(link\)) 78.6333 Tj 0 -256.3207 Td -(6774 if\(pid < 0\){) 91.7388 Tj +(6774 SYSCALL\(mkdir\)) 83.0018 Tj 0 -265.8141 Td -(6775 printf\(1, "init: fork failed\\n"\);) 192.2146 Tj +(6775 SYSCALL\(chdir\)) 83.0018 Tj 0 -275.3075 Td -(6776 exit\(\);) 78.6333 Tj +(6776 SYSCALL\(dup\)) 74.2647 Tj 0 -284.8008 Td -(6777 }) 43.6851 Tj +(6777 SYSCALL\(getpid\)) 87.3703 Tj 0 -294.2942 Td -(6778 if\(pid == 0\){) 96.1073 Tj +(6778 SYSCALL\(sbrk\)) 78.6333 Tj 0 -303.7875 Td -(6779 exec\("sh", sh_args\);) 135.4239 Tj +(6779 SYSCALL\(sleep\)) 83.0018 Tj 0 -313.2809 Td -(6780 printf\(1, "init: exec sh failed\\n"\);) 205.3202 Tj +(6780 ) 21.8426 Tj 0 -322.7743 Td -(6781 exit\(\);) 78.6333 Tj +(6781 ) 21.8426 Tj 0 -332.2676 Td -(6782 }) 43.6851 Tj +(6782 ) 21.8426 Tj 0 -341.761 Td -(6783 while\(\(wpid=wait\(\)\) >= 0 && wpid != pid\)) 214.0572 Tj +(6783 ) 21.8426 Tj 0 -351.2543 Td -(6784 printf\(1, "zombie!\\n"\);) 148.5295 Tj +(6784 ) 21.8426 Tj 0 -360.7477 Td -(6785 }) 34.9481 Tj +(6785 ) 21.8426 Tj 0 -370.2411 Td -(6786 }) 26.2111 Tj +(6786 ) 21.8426 Tj 0 -379.7344 Td (6787 ) 21.8426 Tj 0 -389.2278 Td @@ -22112,6 +22278,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -22129,81 +22297,81 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/usys.S Page 1) 161.635 Tj +(Aug 8 01:04 2009 xv6/init.c Page 1) 161.635 Tj 0 -28.4801 Td -(6800 #include "syscall.h") 109.2129 Tj +(6800 // init: The initial user-level program) 192.2146 Tj 0 -37.9735 Td -(6801 #include "traps.h") 100.4758 Tj +(6801 ) 21.8426 Tj 0 -47.4668 Td -(6802 ) 21.8426 Tj +(6802 #include "types.h") 100.4758 Tj 0 -56.9602 Td -(6803 #define STUB\(name\) \\) 109.2129 Tj +(6803 #include "stat.h") 96.1073 Tj 0 -66.4535 Td -(6804 .globl name; \\) 91.7388 Tj +(6804 #include "user.h") 96.1073 Tj 0 -75.9469 Td -(6805 name: \\) 61.1592 Tj +(6805 #include "fcntl.h") 100.4758 Tj 0 -85.4403 Td -(6806 movl $SYS_ ## name, %eax; \\) 157.2665 Tj +(6806 ) 21.8426 Tj 0 -94.9336 Td -(6807 int $T_SYSCALL; \\) 113.5814 Tj +(6807 char *argv[] = { "sh", 0 };) 139.7925 Tj 0 -104.427 Td -(6808 ret) 52.4222 Tj +(6808 ) 21.8426 Tj 0 -113.9203 Td -(6809 ) 21.8426 Tj +(6809 int) 34.9481 Tj 0 -123.4137 Td -(6810 STUB\(fork\)) 65.5277 Tj +(6810 main\(void\)) 65.5277 Tj 0 -132.9071 Td -(6811 STUB\(exit\)) 65.5277 Tj +(6811 {) 26.2111 Tj 0 -142.4004 Td -(6812 STUB\(wait\)) 65.5277 Tj +(6812 int pid, wpid;) 91.7388 Tj 0 -151.8938 Td -(6813 STUB\(pipe\)) 65.5277 Tj +(6813 ) 21.8426 Tj 0 -161.3871 Td -(6814 STUB\(read\)) 65.5277 Tj +(6814 if\(open\("console", O_RDWR\) < 0\){) 170.3721 Tj 0 -170.8805 Td -(6815 STUB\(write\)) 69.8962 Tj +(6815 mknod\("console", 1, 1\);) 139.7925 Tj 0 -180.3739 Td -(6816 STUB\(close\)) 69.8962 Tj +(6816 open\("console", O_RDWR\);) 144.161 Tj 0 -189.8672 Td -(6817 STUB\(kill\)) 65.5277 Tj +(6817 }) 34.9481 Tj 0 -199.3606 Td -(6818 STUB\(exec\)) 65.5277 Tj +(6818 dup\(0\); // stdout) 109.2129 Tj 0 -208.8539 Td -(6819 STUB\(open\)) 65.5277 Tj +(6819 dup\(0\); // stderr) 109.2129 Tj 0 -218.3473 Td -(6820 STUB\(mknod\)) 69.8962 Tj +(6820 ) 21.8426 Tj 0 -227.8407 Td -(6821 STUB\(unlink\)) 74.2647 Tj +(6821 for\(;;\){) 65.5277 Tj 0 -237.334 Td -(6822 STUB\(fstat\)) 69.8962 Tj +(6822 printf\(1, "init: starting sh\\n"\);) 183.4776 Tj 0 -246.8274 Td -(6823 STUB\(link\)) 65.5277 Tj +(6823 pid = fork\(\);) 96.1073 Tj 0 -256.3207 Td -(6824 STUB\(mkdir\)) 69.8962 Tj +(6824 if\(pid < 0\){) 91.7388 Tj 0 -265.8141 Td -(6825 STUB\(chdir\)) 69.8962 Tj +(6825 printf\(1, "init: fork failed\\n"\);) 192.2146 Tj 0 -275.3075 Td -(6826 STUB\(dup\)) 61.1592 Tj +(6826 exit\(\);) 78.6333 Tj 0 -284.8008 Td -(6827 STUB\(getpid\)) 74.2647 Tj +(6827 }) 43.6851 Tj 0 -294.2942 Td -(6828 STUB\(sbrk\)) 65.5277 Tj +(6828 if\(pid == 0\){) 96.1073 Tj 0 -303.7875 Td -(6829 STUB\(sleep\)) 69.8962 Tj +(6829 exec\("sh", argv\);) 122.3184 Tj 0 -313.2809 Td -(6830 ) 21.8426 Tj +(6830 printf\(1, "init: exec sh failed\\n"\);) 205.3202 Tj 0 -322.7743 Td -(6831 ) 21.8426 Tj +(6831 exit\(\);) 78.6333 Tj 0 -332.2676 Td -(6832 ) 21.8426 Tj +(6832 }) 43.6851 Tj 0 -341.761 Td -(6833 ) 21.8426 Tj +(6833 while\(\(wpid=wait\(\)\) >= 0 && wpid != pid\)) 214.0572 Tj 0 -351.2543 Td -(6834 ) 21.8426 Tj +(6834 printf\(1, "zombie!\\n"\);) 148.5295 Tj 0 -360.7477 Td -(6835 ) 21.8426 Tj +(6835 }) 34.9481 Tj 0 -370.2411 Td -(6836 ) 21.8426 Tj +(6836 }) 26.2111 Tj 0 -379.7344 Td (6837 ) 21.8426 Tj 0 -389.2278 Td @@ -22248,7 +22416,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 1) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 1) 152.898 Tj 0 -28.4801 Td (6850 // Shell.) 61.1592 Tj 0 -37.9735 Td @@ -22379,6 +22547,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -22396,7 +22566,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 2) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 2) 152.898 Tj 0 -28.4801 Td (6900 int fork1\(void\); // Fork but panics on failure.) 231.5313 Tj 0 -37.9735 Td @@ -22515,7 +22685,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 3) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 3) 152.898 Tj 0 -28.4801 Td (6950 case PIPE:) 74.2647 Tj 0 -37.9735 Td @@ -22646,6 +22816,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -22663,7 +22835,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 4) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 4) 152.898 Tj 0 -28.4801 Td (7000 int) 34.9481 Tj 0 -37.9735 Td @@ -22783,7 +22955,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 5) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 5) 152.898 Tj 0 -28.4801 Td (7050 // Constructors) 87.3703 Tj 0 -37.9735 Td @@ -22915,6 +23087,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -22932,7 +23106,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 6) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 6) 152.898 Tj 0 -28.4801 Td (7100 struct cmd*) 69.8962 Tj 0 -37.9735 Td @@ -23051,7 +23225,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 7) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 7) 152.898 Tj 0 -28.4801 Td (7150 // Parsing) 65.5277 Tj 0 -37.9735 Td @@ -23183,6 +23357,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -23200,7 +23376,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 8) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 8) 152.898 Tj 0 -28.4801 Td (7200 int) 34.9481 Tj 0 -37.9735 Td @@ -23319,7 +23495,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 9) 152.898 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 9) 152.898 Tj 0 -28.4801 Td (7250 struct cmd*) 69.8962 Tj 0 -37.9735 Td @@ -23450,6 +23626,8 @@ pdfStartPage false op false OP {} settransfer +0 0 612 792 re +W q q [0.1 0 0 0.1 0 0] cm @@ -23467,7 +23645,7 @@ q [0 -0.9679 1 0 564.72 738.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 10) 157.2665 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 10) 157.2665 Tj 0 -28.4801 Td (7300 struct cmd*) 69.8962 Tj 0 -37.9735 Td @@ -23586,7 +23764,7 @@ q [0 -0.9679 1 0 564.72 392.865] Tm 0 0 Td /F8_0 8.7022 Tf -(Sep 3 10:05 2008 xv6/sh.c Page 11) 157.2665 Tj +(Aug 8 01:04 2009 xv6/sh.c Page 11) 157.2665 Tj 0 -28.4801 Td (7350 // NUL-terminate all the counted strings.) 200.9517 Tj 0 -37.9735 Td