diff --git a/Makefile b/Makefile index d5705db..2949508 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,8 @@ AS = $(TOOLPREFIX)gas LD = $(TOOLPREFIX)ld OBJCOPY = $(TOOLPREFIX)objcopy OBJDUMP = $(TOOLPREFIX)objdump -CFLAGS = -fno-pic -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb -m32 -Werror -fno-omit-frame-pointer +CFLAGS = -fno-pic -static -fno-builtin -fno-strict-aliasing -O0 -Wall -MD -ggdb -m32 -fno-omit-frame-pointer +#CFLAGS = -fno-pic -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb -m32 -Werror -fno-omit-frame-pointer #CFLAGS = -fno-pic -static -fno-builtin -fno-strict-aliasing -fvar-tracking -fvar-tracking-assignments -O0 -g -Wall -MD -gdwarf-2 -m32 -Werror -fno-omit-frame-pointer CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 && echo -fno-stack-protector) ASFLAGS = -m32 -gdwarf-2 -Wa,-divide @@ -179,6 +180,7 @@ UPROGS=\ _test_master\ _test_mlfq\ _test_stride\ + _threadtest\ fs.img: mkfs README $(UPROGS) ./mkfs fs.img README $(UPROGS) diff --git a/defs.h b/defs.h index e5f9c29..d43ee86 100644 --- a/defs.h +++ b/defs.h @@ -124,6 +124,10 @@ void push_queue(struct proc* p, int lev); void pop_queue(struct proc* p); void push_stride(struct proc* p); void pop_stride(struct proc* p); +int clone(thread_t *, void *(*)(void *), void *, void*); +void thread_exit(void *); +int thread_join(thread_t, void **); + // swtch.S void swtch(struct context**, struct context*); diff --git a/proc.c b/proc.c index 9074cb7..e1df7a7 100644 --- a/proc.c +++ b/proc.c @@ -31,9 +31,10 @@ ChangeContext(struct cpu* c, struct proc* p) { switchuvm(p); p->state = RUNNING; + // Do Context Switching swtch(&(c->scheduler), p->context); - switchkvm(); + switchkvm(); c->proc = 0; } @@ -176,6 +177,8 @@ allocproc(void) found: p->state = EMBRYO; p->pid = nextpid++; + p->tid = 0; + p->isThread = 0; release(&ptable.lock); @@ -210,8 +213,77 @@ allocproc(void) return p; } +int +clone(thread_t *thread, void *(*start_routine)(void *), void *arg, void* stack) +{ + int i; + struct proc *np; + struct proc *curproc = myproc(); + uint ustack[3]; + void* sp; + + // Allocate process. + if((np = allocproc()) == 0){ + return -1; + } + + *thread = nextpid; + curproc->tid++; + + np->isThread = 1; + np->sz = curproc->sz; + np->parent = curproc; + *np->tf = *curproc->tf; + + // Clear %eax so that fork returns 0 in the child. + np->tf->eax = 0; + + np->pgdir = curproc->pgdir; + + // Allocate two pages at the next page boundary. + // Make the first inaccessible. Use the second as the user stack. + + ustack[0] = 0xFFFFFFFF; + ustack[1] = (uint)arg; + + sp = stack + PGSIZE; + sp -= 8; + + if(copyout(np->pgdir, (uint)sp, ustack, 8) < 0) + goto bad; + + np->tf->esp = (uint)sp; + np->tf->eip = (uint)start_routine; + + for(i = 0; i < NOFILE; i++) + if(curproc->ofile[i]) + np->ofile[i] = filedup(curproc->ofile[i]); + np->cwd = idup(curproc->cwd); + safestrcpy(np->name, "thread", sizeof(curproc->name)); + + acquire(&ptable.lock); + np->state = RUNNABLE; + + release(&ptable.lock); + cprintf("sex\n"); + return 0; + +bad: + panic("bad state on thread_create"); + return -1; + +} + +// TODO : Implement +void +thread_exit(void* retval); + +// TODO : Implement +int +thread_join(thread_t thread, void **retval); + //PAGEBREAK: 32 -// Set up first user process. +// Set st user process. void userinit(void) { @@ -256,6 +328,7 @@ growproc(int n) uint sz; struct proc *curproc = myproc(); + //acquire(&(curproc->sz_lock)); sz = curproc->sz; if(n > 0){ if((sz = allocuvm(curproc->pgdir, sz, sz + n)) == 0) @@ -265,6 +338,8 @@ growproc(int n) return -1; } curproc->sz = sz; + //release(&(curproc->sz_lock)); + switchuvm(curproc); return 0; } @@ -291,6 +366,7 @@ fork(void) np->state = UNUSED; return -1; } + np->sz = curproc->sz; np->parent = curproc; *np->tf = *curproc->tf; diff --git a/proc.h b/proc.h index beb3fe5..e7b708c 100644 --- a/proc.h +++ b/proc.h @@ -1,3 +1,5 @@ +#include "spinlock.h" + // Per-CPU state struct cpu { uchar apicid; // Local APIC ID @@ -41,6 +43,8 @@ struct proc { char *kstack; // Bottom of kernel stack for this process enum procstate state; // Process state int pid; // Process ID + int tid; // Thread ID + int isThread; struct proc *parent; // Parent process struct trapframe *tf; // Trap frame for current syscall struct context *context; // swtch() here to run process @@ -56,6 +60,8 @@ struct proc { int isStride; // if 1, this proc is stride int time_allotment; // ticks for check whether we should drop the priority for mlfq int rtick_for_boost; // total tick proc run in one boosting cycle + + struct spinlock sz_lock; }; diff --git a/spinlock.h b/spinlock.h index 0a9d8e2..48e69fa 100644 --- a/spinlock.h +++ b/spinlock.h @@ -1,3 +1,6 @@ +#ifndef _SPINLOCK_H_ +#define _SPINLOCK_H_ + // Mutual exclusion lock. struct spinlock { uint locked; // Is the lock held? @@ -9,3 +12,4 @@ struct spinlock { // that locked the lock. }; +#endif diff --git a/sys_thread_create b/sys_thread_create new file mode 100644 index 0000000..e69de29 diff --git a/syscall.c b/syscall.c index 0931f19..0cc9026 100644 --- a/syscall.c +++ b/syscall.c @@ -109,6 +109,9 @@ extern int sys_set_cpu_share(void); extern int sys_alarm(void); extern int sys_yield(void); extern int sys_getlev(void); +extern int sys_clone(void); +extern int sys_thread_exit(void); +extern int sys_thread_join(void); static int (*syscalls[])(void) = { [SYS_fork] sys_fork, @@ -138,6 +141,9 @@ static int (*syscalls[])(void) = { [SYS_alarm] sys_alarm, [SYS_yield] sys_yield, [SYS_getlev] sys_getlev, +[SYS_clone] sys_clone, +[SYS_thread_exit] sys_thread_exit, +[SYS_thread_join] sys_thread_join, }; void diff --git a/syscall.h b/syscall.h index 0bd35af..e395469 100644 --- a/syscall.h +++ b/syscall.h @@ -26,3 +26,6 @@ #define SYS_alarm 25 #define SYS_yield 26 #define SYS_getlev 27 +#define SYS_clone 28 +#define SYS_thread_exit 29 +#define SYS_thread_join 30 diff --git a/sysproc.c b/sysproc.c index 33a2cea..a37bdee 100644 --- a/sysproc.c +++ b/sysproc.c @@ -13,6 +13,55 @@ sys_fork(void) return fork(); } +int +sys_clone(void) +{ + int n; + void *thread; + void *start_routine; + void *arg; + void *stack; + + if(argint(0, &n) < 0) { + cprintf("in sys_thread_create\n"); + return -1; + } + thread = (void*) n; + + if(argint(1, &n) < 0) { + cprintf("in sys_thread_create\n"); + return -1; + } + start_routine = (void*) n; + + + if(argint(2, &n) < 0) { + cprintf("in sys_thread_create\n"); + return -1; + } + arg = (void*) n; + + if(argint(3, &n) < 0) { + cprintf("in sys_thread_create\n"); + return -1; + } + stack = (void*) n; + + return clone(thread, start_routine, arg, stack); +} + +int +sys_thread_exit(void) +{ + return 0; +} + +int +sys_thread_join(void) +{ + return 0; +} + int sys_exit(void) { diff --git a/tags b/tags index aeaa92a..747e3ab 100644 --- a/tags +++ b/tags @@ -3,774 +3,397 @@ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.9~svn20110310 // -ALT kbd.h 11;" d +!_TAG_PROGRAM_VERSION 5.8 // +ALT kbd.h /^#define ALT /;" d AS Makefile /^AS = $(TOOLPREFIX)gas$/;" m ASFLAGS Makefile /^ASFLAGS = -m32 -gdwarf-2 -Wa,-divide$/;" m -ASSERT lapic.c 25;" d file: +ASSERT lapic.c /^ #define ASSERT /;" d file: Align umalloc.c /^typedef long Align;$/;" t file: -BACK sh.c 12;" d file: -BACKSPACE console.c 127;" d file: -BBLOCK fs.h 48;" d -BCAST lapic.c 28;" d file: -BIG usertests.asm /^#define BIG (100*1024*1024)$/;" d -BIG usertests.c 1452;" d file: -BPB fs.h 45;" d -BSIZE fs.h 6;" d -BUSY lapic.c 29;" d file: -B_DIRTY buf.h 13;" d -B_VALID buf.h 12;" d -C console.c 189;" d file: -C kbd.h 32;" d -C kernel.asm /^#define C(x) ((x)-'@') \/\/ Control-x$/;" d -CAPSLOCK kbd.h 13;" d +BACK sh.c /^#define BACK /;" d file: +BACKSPACE console.c /^#define BACKSPACE /;" d file: +BBLOCK fs.h /^#define BBLOCK(/;" d +BCAST lapic.c /^ #define BCAST /;" d file: +BIG usertests.c /^#define BIG /;" d file: +BPB fs.h /^#define BPB /;" d +BSIZE fs.h /^#define BSIZE /;" d +BUSY lapic.c /^ #define BUSY /;" d file: +B_DIRTY buf.h /^#define B_DIRTY /;" d +B_VALID buf.h /^#define B_VALID /;" d +C console.c /^#define C(/;" d file: +C kbd.h /^#define C(/;" d +CAPSLOCK kbd.h /^#define CAPSLOCK /;" d CC Makefile /^CC = $(TOOLPREFIX)gcc$/;" m CFLAGS Makefile /^CFLAGS = -fno-pic -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb -m32 -Werror -fno-omit-frame-pointer$/;" m -CMOS_PORT lapic.c 123;" d file: -CMOS_RETURN lapic.c 124;" d file: -CMOS_STATA lapic.c 163;" d file: -CMOS_STATB lapic.c 164;" d file: -CMOS_UIP lapic.c 165;" d file: -CNT_CHILD test_master.c 10;" d file: -CNT_CHILD test_sample.c 11;" d file: -CNT_EXCEED test_sample.c 12;" d file: -CNT_TEST test_sample.c 9;" d file: -COM1 uart.c 15;" d file: -CONSOLE file.h 37;" d -CONV kernel.asm /^#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))$/;" d -CONV lapic.c 214;" d file: -CONV lapic.c 221;" d file: -COUNT_PERIOD test_stride.asm /^#define COUNT_PERIOD 1000000 \/\/ (iteration)$/;" d -COUNT_PERIOD test_stride.c 12;" d file: +CMOS_PORT lapic.c /^#define CMOS_PORT /;" d file: +CMOS_RETURN lapic.c /^#define CMOS_RETURN /;" d file: +CMOS_STATA lapic.c /^#define CMOS_STATA /;" d file: +CMOS_STATB lapic.c /^#define CMOS_STATB /;" d file: +CMOS_UIP lapic.c /^#define CMOS_UIP /;" d file: +CNT_CHILD test_master.c /^#define CNT_CHILD /;" d file: +CNT_CHILD test_sample.c /^#define CNT_CHILD /;" d file: +CNT_EXCEED test_sample.c /^#define CNT_EXCEED /;" d file: +CNT_TEST test_sample.c /^#define CNT_TEST /;" d file: +COM1 uart.c /^#define COM1 /;" d file: +CONSOLE file.h /^#define CONSOLE /;" d +CONV lapic.c /^#define CONV(/;" d file: +CONV lapic.c /^#undef CONV$/;" d file: +COUNT_PERIOD test_stride.c /^#define COUNT_PERIOD /;" d file: CPUS Makefile /^CPUS := 2$/;" m -CR0_AM mmu.h 35;" d -CR0_CD mmu.h 37;" d -CR0_EM mmu.h 30;" d -CR0_ET mmu.h 32;" d -CR0_MP mmu.h 29;" d -CR0_NE mmu.h 33;" d -CR0_NW mmu.h 36;" d -CR0_PE mmu.h 28;" d -CR0_PG mmu.h 38;" d -CR0_TS mmu.h 31;" d -CR0_WP mmu.h 34;" d -CR4_PSE mmu.h 40;" d -CRTPORT console.c 128;" d file: -CTL kbd.h 10;" d +CR0_AM mmu.h /^#define CR0_AM /;" d +CR0_CD mmu.h /^#define CR0_CD /;" d +CR0_EM mmu.h /^#define CR0_EM /;" d +CR0_ET mmu.h /^#define CR0_ET /;" d +CR0_MP mmu.h /^#define CR0_MP /;" d +CR0_NE mmu.h /^#define CR0_NE /;" d +CR0_NW mmu.h /^#define CR0_NW /;" d +CR0_PE mmu.h /^#define CR0_PE /;" d +CR0_PG mmu.h /^#define CR0_PG /;" d +CR0_TS mmu.h /^#define CR0_TS /;" d +CR0_WP mmu.h /^#define CR0_WP /;" d +CR4_PSE mmu.h /^#define CR4_PSE /;" d +CRTPORT console.c /^#define CRTPORT /;" d file: +CTL kbd.h /^#define CTL /;" d ChangeContext proc.c /^ChangeContext(struct cpu* c, struct proc* p) {$/;" f -DAY lapic.c 170;" d file: -DEASSERT lapic.c 26;" d file: -DELIVS lapic.c 24;" d file: -DEVSPACE memlayout.h 5;" d -DIRSIZ fs.h 51;" d -DPL_USER mmu.h 81;" d -Disassembly bootblock.asm /^Disassembly of section .text:$/;" l +DAY lapic.c /^#define DAY /;" d file: +DEASSERT lapic.c /^ #define DEASSERT /;" d file: +DELIVS lapic.c /^ #define DELIVS /;" d file: +DEVSPACE memlayout.h /^#define DEVSPACE /;" d +DIRSIZ fs.h /^#define DIRSIZ /;" d +DPL_USER mmu.h /^#define DPL_USER /;" d Disassembly cat.asm /^Disassembly of section .text:$/;" l Disassembly echo.asm /^Disassembly of section .text:$/;" l -Disassembly entryother.asm /^Disassembly of section .text:$/;" l -Disassembly forktest.asm /^Disassembly of section .text:$/;" l -Disassembly grep.asm /^Disassembly of section .text:$/;" l -Disassembly init.asm /^Disassembly of section .text:$/;" l -Disassembly initcode.asm /^Disassembly of section .text:$/;" l -Disassembly kernel.asm /^Disassembly of section .text:$/;" l -Disassembly kill.asm /^Disassembly of section .text:$/;" l -Disassembly ln.asm /^Disassembly of section .text:$/;" l -Disassembly ls.asm /^Disassembly of section .text:$/;" l -Disassembly mkdir.asm /^Disassembly of section .text:$/;" l -Disassembly my_userapp.asm /^Disassembly of section .text:$/;" l -Disassembly rm.asm /^Disassembly of section .text:$/;" l -Disassembly sh.asm /^Disassembly of section .text:$/;" l -Disassembly stressfs.asm /^Disassembly of section .text:$/;" l -Disassembly test_master.asm /^Disassembly of section .text:$/;" l -Disassembly test_mlfq.asm /^Disassembly of section .text:$/;" l -Disassembly test_sample.asm /^Disassembly of section .text:$/;" l -Disassembly test_stride.asm /^Disassembly of section .text:$/;" l -Disassembly usertests.asm /^Disassembly of section .text:$/;" l -Disassembly wc.asm /^Disassembly of section .text:$/;" l -Disassembly zombie.asm /^Disassembly of section .text:$/;" l -E0ESC kbd.h 17;" d -ELF_MAGIC elf.h 3;" d -ELF_PROG_FLAG_EXEC elf.h 40;" d -ELF_PROG_FLAG_READ elf.h 42;" d -ELF_PROG_FLAG_WRITE elf.h 41;" d -ELF_PROG_LOAD elf.h 37;" d +E0ESC kbd.h /^#define E0ESC /;" d +ELF_MAGIC elf.h /^#define ELF_MAGIC /;" d +ELF_PROG_FLAG_EXEC elf.h /^#define ELF_PROG_FLAG_EXEC /;" d +ELF_PROG_FLAG_READ elf.h /^#define ELF_PROG_FLAG_READ /;" d +ELF_PROG_FLAG_WRITE elf.h /^#define ELF_PROG_FLAG_WRITE /;" d +ELF_PROG_LOAD elf.h /^#define ELF_PROG_LOAD /;" d EMBRYO proc.h /^enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };$/;" e enum:procstate -ENABLE lapic.c 19;" d file: -EOI lapic.c 17;" d file: -ERROR lapic.c 38;" d file: -ESR lapic.c 20;" d file: -EXEC sh.c 8;" d file: -EXTMEM memlayout.h 3;" d +ENABLE lapic.c /^ #define ENABLE /;" d file: +EOI lapic.c /^#define EOI /;" d file: +ERROR lapic.c /^#define ERROR /;" d file: +ESR lapic.c /^#define ESR /;" d file: +EXEC sh.c /^#define EXEC /;" d file: +EXTMEM memlayout.h /^#define EXTMEM /;" d EXTRA Makefile /^EXTRA=\\$/;" m -FD_INODE file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" e enum:file::__anon2 -FD_NONE file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" e enum:file::__anon2 -FD_PIPE file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" e enum:file::__anon2 +FD_INODE file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" e enum:file::__anon1 +FD_NONE file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" e enum:file::__anon1 +FD_PIPE file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" e enum:file::__anon1 FILES Makefile /^FILES = $(shell grep -v '^\\#' runoff.list)$/;" m -FIXED lapic.c 30;" d file: -FL_AC mmu.h 22;" d -FL_AF mmu.h 7;" d -FL_CF mmu.h 5;" d -FL_DF mmu.h 12;" d -FL_ID mmu.h 25;" d -FL_IF mmu.h 11;" d -FL_IOPL_0 mmu.h 15;" d -FL_IOPL_1 mmu.h 16;" d -FL_IOPL_2 mmu.h 17;" d -FL_IOPL_3 mmu.h 18;" d -FL_IOPL_MASK mmu.h 14;" d -FL_NT mmu.h 19;" d -FL_OF mmu.h 13;" d -FL_PF mmu.h 6;" d -FL_RF mmu.h 20;" d -FL_SF mmu.h 9;" d -FL_TF mmu.h 10;" d -FL_VIF mmu.h 23;" d -FL_VIP mmu.h 24;" d -FL_VM mmu.h 21;" d -FL_ZF mmu.h 8;" d -FSSIZE param.h 13;" d +FIXED lapic.c /^ #define FIXED /;" d file: +FL_AC mmu.h /^#define FL_AC /;" d +FL_AF mmu.h /^#define FL_AF /;" d +FL_CF mmu.h /^#define FL_CF /;" d +FL_DF mmu.h /^#define FL_DF /;" d +FL_ID mmu.h /^#define FL_ID /;" d +FL_IF mmu.h /^#define FL_IF /;" d +FL_IOPL_0 mmu.h /^#define FL_IOPL_0 /;" d +FL_IOPL_1 mmu.h /^#define FL_IOPL_1 /;" d +FL_IOPL_2 mmu.h /^#define FL_IOPL_2 /;" d +FL_IOPL_3 mmu.h /^#define FL_IOPL_3 /;" d +FL_IOPL_MASK mmu.h /^#define FL_IOPL_MASK /;" d +FL_NT mmu.h /^#define FL_NT /;" d +FL_OF mmu.h /^#define FL_OF /;" d +FL_PF mmu.h /^#define FL_PF /;" d +FL_RF mmu.h /^#define FL_RF /;" d +FL_SF mmu.h /^#define FL_SF /;" d +FL_TF mmu.h /^#define FL_TF /;" d +FL_VIF mmu.h /^#define FL_VIF /;" d +FL_VIP mmu.h /^#define FL_VIP /;" d +FL_VM mmu.h /^#define FL_VM /;" d +FL_ZF mmu.h /^#define FL_ZF /;" d +FSSIZE param.h /^#define FSSIZE /;" d GDBPORT Makefile /^GDBPORT = $(shell expr `id -u` % 5000 + 25000)$/;" m -HOURS lapic.c 169;" d file: +HOURS lapic.c /^#define HOURS /;" d file: Header umalloc.c /^typedef union header Header;$/;" t typeref:union:header file: -IBLOCK fs.h 42;" d -ICRHI lapic.c 31;" d file: -ICRLO lapic.c 21;" d file: -ID lapic.c 14;" d file: -IDE_BSY ide.c 17;" d file: -IDE_CMD_RDMUL ide.c 24;" d file: -IDE_CMD_READ ide.c 22;" d file: -IDE_CMD_WRITE ide.c 23;" d file: -IDE_CMD_WRMUL ide.c 25;" d file: -IDE_DF ide.c 19;" d file: -IDE_DRDY ide.c 18;" d file: -IDE_ERR ide.c 20;" d file: -INIT lapic.c 22;" d file: -INPUT_BUF console.c 181;" d file: -INT_ACTIVELOW ioapic.c 22;" d file: -INT_DISABLED ioapic.c 20;" d file: -INT_LEVEL ioapic.c 21;" d file: -INT_LOGICAL ioapic.c 23;" d file: -IOAPIC ioapic.c 9;" d file: -IO_PIC1 picirq.c 6;" d file: -IO_PIC2 kernel.asm /^#define IO_PIC2 0xA0 \/\/ Slave (IRQs 8-15)$/;" d -IO_PIC2 picirq.c 7;" d file: -IPB fs.h 39;" d -IRQ_COM1 traps.h 34;" d -IRQ_ERROR traps.h 36;" d -IRQ_IDE traps.h 35;" d -IRQ_KBD traps.h 33;" d -IRQ_SPURIOUS traps.h 37;" d -IRQ_TIMER traps.h 32;" d -KBDATAP kbd.h 5;" d -KBSTATP kbd.h 3;" d -KBS_DIB kbd.h 4;" d -KERNBASE memlayout.h 8;" d -KERNLINK memlayout.h 9;" d -KEY_DEL kbd.h 29;" d -KEY_DN kbd.h 23;" d -KEY_END kbd.h 21;" d -KEY_HOME kbd.h 20;" d -KEY_INS kbd.h 28;" d -KEY_LF kbd.h 24;" d -KEY_PGDN kbd.h 27;" d -KEY_PGUP kbd.h 26;" d -KEY_RT kbd.h 25;" d -KEY_UP kbd.h 22;" d -KSTACKSIZE param.h 2;" d +IBLOCK fs.h /^#define IBLOCK(/;" d +ICRHI lapic.c /^#define ICRHI /;" d file: +ICRLO lapic.c /^#define ICRLO /;" d file: +ID lapic.c /^#define ID /;" d file: +IDE_BSY ide.c /^#define IDE_BSY /;" d file: +IDE_CMD_RDMUL ide.c /^#define IDE_CMD_RDMUL /;" d file: +IDE_CMD_READ ide.c /^#define IDE_CMD_READ /;" d file: +IDE_CMD_WRITE ide.c /^#define IDE_CMD_WRITE /;" d file: +IDE_CMD_WRMUL ide.c /^#define IDE_CMD_WRMUL /;" d file: +IDE_DF ide.c /^#define IDE_DF /;" d file: +IDE_DRDY ide.c /^#define IDE_DRDY /;" d file: +IDE_ERR ide.c /^#define IDE_ERR /;" d file: +INIT lapic.c /^ #define INIT /;" d file: +INPUT_BUF console.c /^#define INPUT_BUF /;" d file: +INT_ACTIVELOW ioapic.c /^#define INT_ACTIVELOW /;" d file: +INT_DISABLED ioapic.c /^#define INT_DISABLED /;" d file: +INT_LEVEL ioapic.c /^#define INT_LEVEL /;" d file: +INT_LOGICAL ioapic.c /^#define INT_LOGICAL /;" d file: +IOAPIC ioapic.c /^#define IOAPIC /;" d file: +IO_PIC1 picirq.c /^#define IO_PIC1 /;" d file: +IO_PIC2 picirq.c /^#define IO_PIC2 /;" d file: +IPB fs.h /^#define IPB /;" d +IRQ_COM1 traps.h /^#define IRQ_COM1 /;" d +IRQ_ERROR traps.h /^#define IRQ_ERROR /;" d +IRQ_IDE traps.h /^#define IRQ_IDE /;" d +IRQ_KBD traps.h /^#define IRQ_KBD /;" d +IRQ_SPURIOUS traps.h /^#define IRQ_SPURIOUS /;" d +IRQ_TIMER traps.h /^#define IRQ_TIMER /;" d +KBDATAP kbd.h /^#define KBDATAP /;" d +KBSTATP kbd.h /^#define KBSTATP /;" d +KBS_DIB kbd.h /^#define KBS_DIB /;" d +KERNBASE memlayout.h /^#define KERNBASE /;" d +KERNLINK memlayout.h /^#define KERNLINK /;" d +KEY_DEL kbd.h /^#define KEY_DEL /;" d +KEY_DN kbd.h /^#define KEY_DN /;" d +KEY_END kbd.h /^#define KEY_END /;" d +KEY_HOME kbd.h /^#define KEY_HOME /;" d +KEY_INS kbd.h /^#define KEY_INS /;" d +KEY_LF kbd.h /^#define KEY_LF /;" d +KEY_PGDN kbd.h /^#define KEY_PGDN /;" d +KEY_PGUP kbd.h /^#define KEY_PGUP /;" d +KEY_RT kbd.h /^#define KEY_RT /;" d +KEY_UP kbd.h /^#define KEY_UP /;" d +KSTACKSIZE param.h /^#define KSTACKSIZE /;" d LD Makefile /^LD = $(TOOLPREFIX)ld$/;" m -LEVEL lapic.c 27;" d file: -LIFETIME test_mlfq.c 12;" d file: -LIFETIME test_stride.asm /^#define LIFETIME 5000 \/\/ (ticks)$/;" d -LIFETIME test_stride.c 11;" d file: -LINT0 lapic.c 36;" d file: -LINT1 lapic.c 37;" d file: -LIST sh.c 11;" d file: -LOGSIZE param.h 11;" d -MASKED lapic.c 39;" d file: -MAXARG param.h 9;" d -MAXARGS sh.c 14;" d file: -MAXFILE fs.h 26;" d -MAXOPBLOCKS param.h 10;" d +LEVEL lapic.c /^ #define LEVEL /;" d file: +LIFETIME test_mlfq.c /^#define LIFETIME /;" d file: +LIFETIME test_stride.c /^#define LIFETIME /;" d file: +LINT0 lapic.c /^#define LINT0 /;" d file: +LINT1 lapic.c /^#define LINT1 /;" d file: +LIST sh.c /^#define LIST /;" d file: +LOGSIZE param.h /^#define LOGSIZE /;" d +MASKED lapic.c /^ #define MASKED /;" d file: +MAXARG param.h /^#define MAXARG /;" d +MAXARGS sh.c /^#define MAXARGS /;" d file: +MAXFILE fs.h /^#define MAXFILE /;" d +MAXOPBLOCKS param.h /^#define MAXOPBLOCKS /;" d MEMFSOBJS Makefile /^MEMFSOBJS = $(filter-out ide.o,$(OBJS)) memide.o$/;" m -MINS lapic.c 168;" d file: -MLFQ_LEVEL test_mlfq.asm /^#define MLFQ_LEVEL 3$/;" d -MLFQ_LEVEL test_mlfq.c 16;" d file: -MONTH lapic.c 171;" d file: -MPBOOT mp.h 34;" d -MPBUS mp.h 50;" d -MPIOAPIC mp.h 51;" d -MPIOINTR mp.h 52;" d -MPLINTR mp.h 53;" d -MPPROC mp.h 49;" d -N forktest.asm /^#define N 1000$/;" d -N forktest.c 8;" d file: -NAME_CHILD_MLFQ test_master.c 15;" d file: -NAME_CHILD_MLFQ test_sample.c 17;" d file: -NAME_CHILD_STRIDE test_master.c 13;" d file: -NAME_CHILD_STRIDE test_sample.c 15;" d file: -NBUF param.h 12;" d -NCPU param.h 3;" d -NDEV param.h 7;" d -NDIRECT fs.h 24;" d -NELEM defs.h 200;" d -NFILE param.h 5;" d -NINDIRECT fs.h 25;" d -NINODE param.h 6;" d -NINODES mkfs.c 18;" d file: -NO kbd.h 7;" d -NOFILE param.h 4;" d -NOOP test_sample.c 18;" d file: -NPDENTRIES mmu.h 123;" d -NPROC param.h 1;" d -NPTENTRIES mmu.h 124;" d -NSEGS mmu.h 50;" d -NUMLOCK kbd.h 14;" d +MINS lapic.c /^#define MINS /;" d file: +MLFQ_LEVEL test_mlfq.c /^#define MLFQ_LEVEL /;" d file: +MONTH lapic.c /^#define MONTH /;" d file: +MPBOOT mp.h /^ #define MPBOOT /;" d +MPBUS mp.h /^#define MPBUS /;" d +MPIOAPIC mp.h /^#define MPIOAPIC /;" d +MPIOINTR mp.h /^#define MPIOINTR /;" d +MPLINTR mp.h /^#define MPLINTR /;" d +MPPROC mp.h /^#define MPPROC /;" d +N forktest.c /^#define N /;" d file: +NAME_CHILD_MLFQ test_master.c /^#define NAME_CHILD_MLFQ /;" d file: +NAME_CHILD_MLFQ test_sample.c /^#define NAME_CHILD_MLFQ /;" d file: +NAME_CHILD_STRIDE test_master.c /^#define NAME_CHILD_STRIDE /;" d file: +NAME_CHILD_STRIDE test_sample.c /^#define NAME_CHILD_STRIDE /;" d file: +NBUF param.h /^#define NBUF /;" d +NCPU param.h /^#define NCPU /;" d +NDEV param.h /^#define NDEV /;" d +NDIRECT fs.h /^#define NDIRECT /;" d +NELEM defs.h /^#define NELEM(/;" d +NFILE param.h /^#define NFILE /;" d +NINDIRECT fs.h /^#define NINDIRECT /;" d +NINODE param.h /^#define NINODE /;" d +NINODES mkfs.c /^#define NINODES /;" d file: +NO kbd.h /^#define NO /;" d +NOFILE param.h /^#define NOFILE /;" d +NOOP test_sample.c /^#define NOOP /;" d file: +NPDENTRIES mmu.h /^#define NPDENTRIES /;" d +NPROC param.h /^#define NPROC /;" d +NPTENTRIES mmu.h /^#define NPTENTRIES /;" d +NSEGS mmu.h /^#define NSEGS /;" d +NTEST threadtest.c /^#define NTEST /;" d file: +NUMLOCK kbd.h /^#define NUMLOCK /;" d +NUM_THREAD threadtest.c /^#define NUM_THREAD /;" d file: OBJCOPY Makefile /^OBJCOPY = $(TOOLPREFIX)objcopy$/;" m OBJDUMP Makefile /^OBJDUMP = $(TOOLPREFIX)objdump$/;" m OBJS Makefile /^OBJS = \\$/;" m -O_CREATE fcntl.h 4;" d -O_RDONLY fcntl.h 1;" d -O_RDWR fcntl.h 3;" d -O_WRONLY fcntl.h 2;" d -P2V memlayout.h 12;" d -P2V_WO memlayout.h 15;" d -PCINT lapic.c 35;" d file: -PDX mmu.h 114;" d -PDXSHIFT mmu.h 129;" d -PERIODIC lapic.c 34;" d file: -PGADDR mmu.h 120;" d -PGROUNDDOWN mmu.h 132;" d -PGROUNDUP mmu.h 131;" d -PGSHIFT mmu.h 127;" d -PGSIZE mmu.h 125;" d -PHYSTOP memlayout.h 4;" d -PIPE sh.c 10;" d file: -PIPESIZE pipe.c 11;" d file: +O_CREATE fcntl.h /^#define O_CREATE /;" d +O_RDONLY fcntl.h /^#define O_RDONLY /;" d +O_RDWR fcntl.h /^#define O_RDWR /;" d +O_WRONLY fcntl.h /^#define O_WRONLY /;" d +P2V memlayout.h /^#define P2V(/;" d +P2V_WO memlayout.h /^#define P2V_WO(/;" d +PCINT lapic.c /^#define PCINT /;" d file: +PDX mmu.h /^#define PDX(/;" d +PDXSHIFT mmu.h /^#define PDXSHIFT /;" d +PERIODIC lapic.c /^ #define PERIODIC /;" d file: +PGADDR mmu.h /^#define PGADDR(/;" d +PGROUNDDOWN mmu.h /^#define PGROUNDDOWN(/;" d +PGROUNDUP mmu.h /^#define PGROUNDUP(/;" d +PGSHIFT mmu.h /^#define PGSHIFT /;" d +PGSIZE mmu.h /^#define PGSIZE /;" d +PHYSTOP memlayout.h /^#define PHYSTOP /;" d +PIPE sh.c /^#define PIPE /;" d file: +PIPESIZE pipe.c /^#define PIPESIZE /;" d file: PRINT Makefile /^PRINT = runoff.list runoff.spec README toc.hdr toc.ftr $(FILES)$/;" m -PTE_A mmu.h 140;" d -PTE_ADDR mmu.h 146;" d -PTE_D mmu.h 141;" d -PTE_FLAGS mmu.h 147;" d -PTE_MBZ mmu.h 143;" d -PTE_P mmu.h 135;" d -PTE_PCD mmu.h 139;" d -PTE_PS mmu.h 142;" d -PTE_PWT mmu.h 138;" d -PTE_U mmu.h 137;" d -PTE_W mmu.h 136;" d -PTX mmu.h 117;" d -PTXSHIFT mmu.h 128;" d +PTE_A mmu.h /^#define PTE_A /;" d +PTE_ADDR mmu.h /^#define PTE_ADDR(/;" d +PTE_D mmu.h /^#define PTE_D /;" d +PTE_FLAGS mmu.h /^#define PTE_FLAGS(/;" d +PTE_MBZ mmu.h /^#define PTE_MBZ /;" d +PTE_P mmu.h /^#define PTE_P /;" d +PTE_PCD mmu.h /^#define PTE_PCD /;" d +PTE_PS mmu.h /^#define PTE_PS /;" d +PTE_PWT mmu.h /^#define PTE_PWT /;" d +PTE_U mmu.h /^#define PTE_U /;" d +PTE_W mmu.h /^#define PTE_W /;" d +PTX mmu.h /^#define PTX(/;" d +PTXSHIFT mmu.h /^#define PTXSHIFT /;" d QEMU Makefile /^QEMU = $(shell if which qemu > \/dev\/null; \\$/;" m QEMUGDB Makefile /^QEMUGDB = $(shell if $(QEMU) -help | grep -q '^-gdb'; \\$/;" m QEMUOPTS Makefile /^QEMUOPTS = -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp $(CPUS) -m 512 $(QEMUEXTRA)$/;" m -REDIR sh.c 9;" d file: -REG_ID ioapic.c 11;" d file: -REG_TABLE ioapic.c 13;" d file: -REG_VER ioapic.c 12;" d file: -ROOTDEV param.h 8;" d -ROOTINO fs.h 5;" d -RTC_ADDR usertests.c 1701;" d file: -RTC_DATA usertests.c 1702;" d file: +REDIR sh.c /^#define REDIR /;" d file: +REG_ID ioapic.c /^#define REG_ID /;" d file: +REG_TABLE ioapic.c /^#define REG_TABLE /;" d file: +REG_VER ioapic.c /^#define REG_VER /;" d file: +ROOTDEV param.h /^#define ROOTDEV /;" d +ROOTINO fs.h /^#define ROOTINO /;" d +RTC_ADDR usertests.c /^ #define RTC_ADDR /;" d file: +RTC_DATA usertests.c /^ #define RTC_DATA /;" d file: RUNNABLE proc.h /^enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };$/;" e enum:procstate RUNNING proc.h /^enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };$/;" e enum:procstate -SCROLLLOCK kbd.h 15;" d -SECS lapic.c 167;" d file: -SECTOR_SIZE ide.c 16;" d file: -SECTSIZE bootmain.c 13;" d file: -SEG mmu.h 71;" d -SEG16 mmu.h 75;" d -SEG_ASM asm.h 11;" d -SEG_KCODE mmu.h 43;" d -SEG_KDATA mmu.h 44;" d -SEG_NULLASM asm.h 5;" d -SEG_TSS mmu.h 47;" d -SEG_UCODE mmu.h 45;" d -SEG_UDATA mmu.h 46;" d -SETGATE mmu.h 215;" d -SHIFT kbd.h 9;" d +SCROLLLOCK kbd.h /^#define SCROLLLOCK /;" d +SECS lapic.c /^#define SECS /;" d file: +SECTOR_SIZE ide.c /^#define SECTOR_SIZE /;" d file: +SECTSIZE bootmain.c /^#define SECTSIZE /;" d file: +SEG mmu.h /^#define SEG(/;" d +SEG16 mmu.h /^#define SEG16(/;" d +SEG_ASM asm.h /^#define SEG_ASM(/;" d +SEG_KCODE mmu.h /^#define SEG_KCODE /;" d +SEG_KDATA mmu.h /^#define SEG_KDATA /;" d +SEG_NULLASM asm.h /^#define SEG_NULLASM /;" d +SEG_TSS mmu.h /^#define SEG_TSS /;" d +SEG_UCODE mmu.h /^#define SEG_UCODE /;" d +SEG_UDATA mmu.h /^#define SEG_UDATA /;" d +SETGATE mmu.h /^#define SETGATE(/;" d +SHIFT kbd.h /^#define SHIFT /;" d SLEEPING proc.h /^enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };$/;" e enum:procstate -STARTUP lapic.c 23;" d file: -STA_A asm.h 21;" d -STA_A mmu.h 89;" d -STA_C asm.h 18;" d -STA_C mmu.h 86;" d -STA_E asm.h 17;" d -STA_E mmu.h 85;" d -STA_R asm.h 20;" d -STA_R mmu.h 88;" d -STA_W asm.h 19;" d -STA_W mmu.h 87;" d -STA_X asm.h 16;" d -STA_X mmu.h 84;" d -STS_CG16 mmu.h 95;" d -STS_CG32 mmu.h 101;" d -STS_IG16 mmu.h 97;" d -STS_IG32 mmu.h 102;" d -STS_LDT mmu.h 93;" d -STS_T16A mmu.h 92;" d -STS_T16B mmu.h 94;" d -STS_T32A mmu.h 99;" d -STS_T32B mmu.h 100;" d -STS_TG mmu.h 96;" d -STS_TG16 mmu.h 98;" d -STS_TG32 mmu.h 103;" d -SVR lapic.c 18;" d file: +STARTUP lapic.c /^ #define STARTUP /;" d file: +STA_A asm.h /^#define STA_A /;" d +STA_A mmu.h /^#define STA_A /;" d +STA_C asm.h /^#define STA_C /;" d +STA_C mmu.h /^#define STA_C /;" d +STA_E asm.h /^#define STA_E /;" d +STA_E mmu.h /^#define STA_E /;" d +STA_R asm.h /^#define STA_R /;" d +STA_R mmu.h /^#define STA_R /;" d +STA_W asm.h /^#define STA_W /;" d +STA_W mmu.h /^#define STA_W /;" d +STA_X asm.h /^#define STA_X /;" d +STA_X mmu.h /^#define STA_X /;" d +STS_CG16 mmu.h /^#define STS_CG16 /;" d +STS_CG32 mmu.h /^#define STS_CG32 /;" d +STS_IG16 mmu.h /^#define STS_IG16 /;" d +STS_IG32 mmu.h /^#define STS_IG32 /;" d +STS_LDT mmu.h /^#define STS_LDT /;" d +STS_T16A mmu.h /^#define STS_T16A /;" d +STS_T16B mmu.h /^#define STS_T16B /;" d +STS_T32A mmu.h /^#define STS_T32A /;" d +STS_T32B mmu.h /^#define STS_T32B /;" d +STS_TG mmu.h /^#define STS_TG /;" d +STS_TG16 mmu.h /^#define STS_TG16 /;" d +STS_TG32 mmu.h /^#define STS_TG32 /;" d +SVR lapic.c /^#define SVR /;" d file: SYSCALL usys.S /^#define SYSCALL(name) \\$/;" d -SYS_alarm syscall.h 26;" d -SYS_chdir syscall.h 10;" d -SYS_close syscall.h 22;" d -SYS_dup syscall.h 11;" d -SYS_exec syscall.h 8;" d -SYS_exit syscall.h 3;" d -SYS_fork syscall.h 2;" d -SYS_fstat syscall.h 9;" d -SYS_getlev syscall.h 28;" d -SYS_getpid syscall.h 12;" d -SYS_getppid syscall.h 24;" d -SYS_kill syscall.h 7;" d -SYS_link syscall.h 20;" d -SYS_mkdir syscall.h 21;" d -SYS_mknod syscall.h 18;" d -SYS_myfunction syscall.h 23;" d -SYS_open syscall.h 16;" d -SYS_pipe syscall.h 5;" d -SYS_read syscall.h 6;" d -SYS_sbrk syscall.h 13;" d -SYS_set_cpu_share syscall.h 25;" d -SYS_sleep syscall.h 14;" d -SYS_unlink syscall.h 19;" d -SYS_uptime syscall.h 15;" d -SYS_wait syscall.h 4;" d -SYS_write syscall.h 17;" d -SYS_yield syscall.h 27;" d -TCCR lapic.c 41;" d file: -TDCR lapic.c 42;" d file: -TICR lapic.c 40;" d file: -TIMER lapic.c 32;" d file: +SYS_alarm syscall.h /^#define SYS_alarm /;" d +SYS_chdir syscall.h /^#define SYS_chdir /;" d +SYS_clone syscall.h /^#define SYS_clone /;" d +SYS_close syscall.h /^#define SYS_close /;" d +SYS_dup syscall.h /^#define SYS_dup /;" d +SYS_exec syscall.h /^#define SYS_exec /;" d +SYS_exit syscall.h /^#define SYS_exit /;" d +SYS_fork syscall.h /^#define SYS_fork /;" d +SYS_fstat syscall.h /^#define SYS_fstat /;" d +SYS_getlev syscall.h /^#define SYS_getlev /;" d +SYS_getpid syscall.h /^#define SYS_getpid /;" d +SYS_getppid syscall.h /^#define SYS_getppid /;" d +SYS_kill syscall.h /^#define SYS_kill /;" d +SYS_link syscall.h /^#define SYS_link /;" d +SYS_mkdir syscall.h /^#define SYS_mkdir /;" d +SYS_mknod syscall.h /^#define SYS_mknod /;" d +SYS_myfunction syscall.h /^#define SYS_myfunction /;" d +SYS_open syscall.h /^#define SYS_open /;" d +SYS_pipe syscall.h /^#define SYS_pipe /;" d +SYS_read syscall.h /^#define SYS_read /;" d +SYS_sbrk syscall.h /^#define SYS_sbrk /;" d +SYS_set_cpu_share syscall.h /^#define SYS_set_cpu_share /;" d +SYS_sleep syscall.h /^#define SYS_sleep /;" d +SYS_thread_create syscall.h /^#define SYS_thread_create /;" d +SYS_thread_exit syscall.h /^#define SYS_thread_exit /;" d +SYS_thread_join syscall.h /^#define SYS_thread_join /;" d +SYS_unlink syscall.h /^#define SYS_unlink /;" d +SYS_uptime syscall.h /^#define SYS_uptime /;" d +SYS_wait syscall.h /^#define SYS_wait /;" d +SYS_write syscall.h /^#define SYS_write /;" d +SYS_yield syscall.h /^#define SYS_yield /;" d +TCCR lapic.c /^#define TCCR /;" d file: +TDCR lapic.c /^#define TDCR /;" d file: +TICR lapic.c /^#define TICR /;" d file: +TIMER lapic.c /^#define TIMER /;" d file: TOOLPREFIX Makefile /^TOOLPREFIX := $(shell if i386-jos-elf-objdump -i 2>&1 | grep '^elf32-i386$$' >\/dev\/null 2>&1; \\$/;" m -TPR lapic.c 16;" d file: -T_ALIGN traps.h 21;" d -T_BOUND traps.h 9;" d -T_BRKPT traps.h 7;" d -T_DBLFLT traps.h 12;" d -T_DEBUG traps.h 5;" d -T_DEFAULT traps.h 28;" d -T_DEV stat.h 3;" d -T_DEVICE traps.h 11;" d -T_DIR stat.h 1;" d -T_DIVIDE traps.h 4;" d -T_FILE stat.h 2;" d -T_FPERR traps.h 20;" d -T_GPFLT traps.h 17;" d -T_ILLOP traps.h 10;" d -T_IRQ0 traps.h 30;" d -T_MCHK traps.h 22;" d -T_NMI traps.h 6;" d -T_OFLOW traps.h 8;" d -T_PGFLT traps.h 18;" d -T_SEGNP traps.h 15;" d -T_SIMDERR traps.h 23;" d -T_STACK traps.h 16;" d -T_SYSCALL traps.h 27;" d -T_TSS traps.h 14;" d +TPR lapic.c /^#define TPR /;" d file: +T_ALIGN traps.h /^#define T_ALIGN /;" d +T_BOUND traps.h /^#define T_BOUND /;" d +T_BRKPT traps.h /^#define T_BRKPT /;" d +T_DBLFLT traps.h /^#define T_DBLFLT /;" d +T_DEBUG traps.h /^#define T_DEBUG /;" d +T_DEFAULT traps.h /^#define T_DEFAULT /;" d +T_DEV stat.h /^#define T_DEV /;" d +T_DEVICE traps.h /^#define T_DEVICE /;" d +T_DIR stat.h /^#define T_DIR /;" d +T_DIVIDE traps.h /^#define T_DIVIDE /;" d +T_FILE stat.h /^#define T_FILE /;" d +T_FPERR traps.h /^#define T_FPERR /;" d +T_GPFLT traps.h /^#define T_GPFLT /;" d +T_ILLOP traps.h /^#define T_ILLOP /;" d +T_IRQ0 traps.h /^#define T_IRQ0 /;" d +T_MCHK traps.h /^#define T_MCHK /;" d +T_NMI traps.h /^#define T_NMI /;" d +T_OFLOW traps.h /^#define T_OFLOW /;" d +T_PGFLT traps.h /^#define T_PGFLT /;" d +T_SEGNP traps.h /^#define T_SEGNP /;" d +T_SIMDERR traps.h /^#define T_SIMDERR /;" d +T_STACK traps.h /^#define T_STACK /;" d +T_SYSCALL traps.h /^#define T_SYSCALL /;" d +T_TSS traps.h /^#define T_TSS /;" d ULIB Makefile /^ULIB = ulib.o usys.o printf.o umalloc.o$/;" m UNUSED proc.h /^enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };$/;" e enum:procstate UPROGS Makefile /^UPROGS=\\$/;" m -V2P memlayout.h 11;" d -V2P_WO memlayout.h 14;" d -VER lapic.c 15;" d file: -X1 lapic.c 33;" d file: -YEAR lapic.c 172;" d file: -YIELD_PERIOD test_mlfq.c 13;" d file: +V2P memlayout.h /^#define V2P(/;" d +V2P_WO memlayout.h /^#define V2P_WO(/;" d +VER lapic.c /^#define VER /;" d file: +X1 lapic.c /^ #define X1 /;" d file: +YEAR lapic.c /^#define YEAR /;" d file: +YIELD_PERIOD test_mlfq.c /^#define YIELD_PERIOD /;" d file: ZOMBIE proc.h /^enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };$/;" e enum:procstate +_SPINLOCK_H_ spinlock.h /^#define _SPINLOCK_H_$/;" d _cat cat.asm /^_cat: file format elf32-i386$/;" l _echo echo.asm /^_echo: file format elf32-i386$/;" l -_forktest forktest.asm /^_forktest: file format elf32-i386$/;" l -_grep grep.asm /^_grep: file format elf32-i386$/;" l -_init init.asm /^_init: file format elf32-i386$/;" l -_kill kill.asm /^_kill: file format elf32-i386$/;" l -_ln ln.asm /^_ln: file format elf32-i386$/;" l -_ls ls.asm /^_ls: file format elf32-i386$/;" l -_mkdir mkdir.asm /^_mkdir: file format elf32-i386$/;" l -_my_userapp my_userapp.asm /^_my_userapp: file format elf32-i386$/;" l -_rm rm.asm /^_rm: file format elf32-i386$/;" l -_sh sh.asm /^_sh: file format elf32-i386$/;" l _start entry.S /^_start = V2P_WO(entry)$/;" d -_stressfs stressfs.asm /^_stressfs: file format elf32-i386$/;" l -_test_master test_master.asm /^_test_master: file format elf32-i386$/;" l -_test_mlfq test_mlfq.asm /^_test_mlfq: file format elf32-i386$/;" l -_test_sample test_sample.asm /^_test_sample: file format elf32-i386$/;" l -_test_stride test_stride.asm /^_test_stride: file format elf32-i386$/;" l -_usertests usertests.asm /^_usertests: file format elf32-i386$/;" l -_wc wc.asm /^_wc: file format elf32-i386$/;" l -_zombie zombie.asm /^_zombie: file format elf32-i386$/;" l a cat.asm /^ a: 55 push %ebp$/;" l a echo.asm /^ a: 55 push %ebp$/;" l -a forktest.asm /^ a: 55 push %ebp$/;" l -a grep.asm /^ a: 55 push %ebp$/;" l -a init.asm /^ a: 55 push %ebp$/;" l -a initcode.asm /^ a: 6a 00 push $0x0$/;" l -a kernel.asm /^ a = PGADDR(PDX(a) + 1, 0, 0) - PGSIZE;$/;" d -a kernel.asm /^ a = (uint*)bp->data;$/;" d -a kernel.asm /^ a = (char*)PGROUNDDOWN((uint)va);$/;" d -a kernel.asm /^ a = PGROUNDUP(newsz);$/;" d -a kernel.asm /^ a = PGROUNDUP(oldsz);$/;" d -a kill.asm /^ a: 55 push %ebp$/;" l -a ln.asm /^ a: ff 71 fc pushl -0x4(%ecx)$/;" l -a ls.asm /^ a: 55 push %ebp$/;" l -a mkdir.asm /^ a: 55 push %ebp$/;" l -a my_userapp.asm /^ a: 55 push %ebp$/;" l -a rm.asm /^ a: 55 push %ebp$/;" l -a sh.asm /^ a: 55 push %ebp$/;" l -a test_master.asm /^ a: 55 push %ebp$/;" l -a test_mlfq.asm /^ a: 55 push %ebp$/;" l -a test_sample.asm /^ a: 55 push %ebp$/;" l -a test_stride.asm /^ a: 55 push %ebp$/;" l -a usertests.asm /^ a: 55 push %ebp$/;" l -a usertests.asm /^ a = b + 1;$/;" d -a usertests.asm /^ a = sbrk(0);$/;" d -a wc.asm /^ a: 55 push %ebp$/;" l -a zombie.asm /^ a: 55 push %ebp$/;" l a0 cat.asm /^ a0: 83 ec 04 sub $0x4,%esp$/;" l a0 echo.asm /^ a0: 55 push %ebp$/;" l -a0 forktest.asm /^ a0: e8 f5 02 00 00 call 39a $/;" l -a0 grep.asm /^ a0: e8 3b 06 00 00 call 6e0 $/;" l -a0 ls.asm /^ a0: 83 ec 0c sub $0xc,%esp$/;" l -a0 my_userapp.asm /^ a0: 31 c0 xor %eax,%eax$/;" l -a0 test_mlfq.asm /^ a0: 85 f6 test %esi,%esi$/;" l -a0 usertests.asm /^ a0: e8 db 03 00 00 call 480 $/;" l -a0 wc.asm /^ a0: 55 push %ebp$/;" l -a0 zombie.asm /^ a0: 31 c0 xor %eax,%eax$/;" l -a00 ls.asm /^ a00: c7 05 94 0d 00 00 94 movl $0xd94,0xd94$/;" l -a00 sh.asm /^ a00: 8b 4b 04 mov 0x4(%ebx),%ecx$/;" l -a02 usertests.asm /^ a02: e8 9b 2e 00 00 call 38a2 $/;" l -a03 sh.asm /^ a03: 8d 43 2c lea 0x2c(%ebx),%eax$/;" l -a06 sh.asm /^ a06: 85 c9 test %ecx,%ecx$/;" l -a07 ls.asm /^ a07: 0d 00 00 $/;" l -a07 usertests.asm /^ a07: 89 f6 mov %esi,%esi$/;" l -a08 sh.asm /^ a08: 74 15 je a1f $/;" l -a09 usertests.asm /^ a09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -a0a ls.asm /^ a0a: b8 94 0d 00 00 mov $0xd94,%eax$/;" l -a0a sh.asm /^ a0a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -a0f ls.asm /^ a0f: c7 05 98 0d 00 00 00 movl $0x0,0xd98$/;" l a1 echo.asm /^ a1: 89 e5 mov %esp,%ebp$/;" l -a1 kill.asm /^ a1: 84 c0 test %al,%al$/;" l -a1 ln.asm /^ a1: 84 c0 test %al,%al$/;" l -a1 mkdir.asm /^ a1: 5b pop %ebx$/;" l -a1 rm.asm /^ a1: 5b pop %ebx$/;" l -a1 sh.asm /^ a1: e8 ba 00 00 00 call 160 $/;" l -a1 test_master.asm /^ a1: 5b pop %ebx$/;" l -a1 wc.asm /^ a1: 89 e5 mov %esp,%ebp$/;" l -a10 sh.asm /^ a10: 8b 10 mov (%eax),%edx$/;" l -a10 usertests.asm /^ a10: 55 push %ebp$/;" l -a11 usertests.asm /^ a11: 89 e5 mov %esp,%ebp$/;" l -a12 sh.asm /^ a12: 83 c0 04 add $0x4,%eax$/;" l -a13 usertests.asm /^ a13: 57 push %edi$/;" l -a14 usertests.asm /^ a14: 56 push %esi$/;" l -a15 sh.asm /^ a15: c6 02 00 movb $0x0,(%edx)$/;" l -a15 usertests.asm /^ a15: 53 push %ebx$/;" l -a16 ls.asm /^ a16: 00 00 00 $/;" l -a16 usertests.asm /^ a16: 8d 45 e0 lea -0x20(%ebp),%eax$/;" l -a18 sh.asm /^ a18: 8b 50 d8 mov -0x28(%eax),%edx$/;" l -a19 ls.asm /^ a19: e9 3e ff ff ff jmp 95c $/;" l -a19 usertests.asm /^ a19: 83 ec 38 sub $0x38,%esp$/;" l -a1b sh.asm /^ a1b: 85 d2 test %edx,%edx$/;" l -a1c usertests.asm /^ a1c: 50 push %eax$/;" l -a1d sh.asm /^ a1d: 75 f1 jne a10 $/;" l -a1d usertests.asm /^ a1d: e8 90 2e 00 00 call 38b2 $/;" l -a1f sh.asm /^ a1f: 89 d8 mov %ebx,%eax$/;" l -a2 mkdir.asm /^ a2: 5d pop %ebp$/;" l -a2 my_userapp.asm /^ a2: 29 d8 sub %ebx,%eax$/;" l -a2 rm.asm /^ a2: 5d pop %ebp$/;" l -a2 stressfs.asm /^ a2: 50 push %eax$/;" l -a2 test_master.asm /^ a2: 5d pop %ebp$/;" l -a2 test_mlfq.asm /^ a2: ba d8 07 00 00 mov $0x7d8,%edx$/;" l -a2 test_sample.asm /^ a2: 50 push %eax$/;" l -a2 zombie.asm /^ a2: 29 d8 sub %ebx,%eax$/;" l -a21 sh.asm /^ a21: 8b 5d fc mov -0x4(%ebp),%ebx$/;" l -a22 usertests.asm /^ a22: 83 c4 10 add $0x10,%esp$/;" l -a24 sh.asm /^ a24: c9 leave $/;" l -a25 sh.asm /^ a25: c3 ret $/;" l -a25 usertests.asm /^ a25: 85 c0 test %eax,%eax$/;" l -a26 sh.asm /^ a26: 8d 76 00 lea 0x0(%esi),%esi$/;" l -a27 usertests.asm /^ a27: 0f 85 35 01 00 00 jne b62 $/;" l -a29 sh.asm /^ a29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -a2d usertests.asm /^ a2d: e8 68 2e 00 00 call 389a $/;" l a3 cat.asm /^ a3: 53 push %ebx$/;" l -a3 echo.asm /^ a3: 56 push %esi$/;" l -a3 kill.asm /^ a3: 75 1e jne c3 $/;" l -a3 ln.asm /^ a3: 75 1e jne c3 $/;" l -a3 ls.asm /^ a3: 53 push %ebx$/;" l -a3 mkdir.asm /^ a3: c3 ret $/;" l -a3 rm.asm /^ a3: c3 ret $/;" l -a3 stressfs.asm /^ a3: e8 1a 03 00 00 call 3c2 $/;" l -a3 test_master.asm /^ a3: c3 ret $/;" l -a3 test_sample.asm /^ a3: ff b3 e0 0a 00 00 pushl 0xae0(%ebx)$/;" l -a3 wc.asm /^ a3: 57 push %edi$/;" l -a30 sh.asm /^ a30: 83 ec 0c sub $0xc,%esp$/;" l -a32 usertests.asm /^ a32: 83 f8 00 cmp $0x0,%eax$/;" l -a33 sh.asm /^ a33: ff 73 04 pushl 0x4(%ebx)$/;" l -a35 usertests.asm /^ a35: 0f 84 86 00 00 00 je ac1 $/;" l -a36 sh.asm /^ a36: e8 85 ff ff ff call 9c0 $/;" l -a3b sh.asm /^ a3b: 89 d8 mov %ebx,%eax$/;" l -a3b usertests.asm /^ a3b: 0f 8e 35 01 00 00 jle b76 $/;" l -a3d sh.asm /^ a3d: 83 c4 10 add $0x10,%esp$/;" l -a4 cat.asm /^ a4: 68 20 0b 00 00 push $0xb20$/;" l -a4 echo.asm /^ a4: 53 push %ebx$/;" l -a4 init.asm /^ a4: 50 push %eax$/;" l -a4 ls.asm /^ a4: e8 17 03 00 00 call 3c0 $/;" l -a4 mkdir.asm /^ a4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -a4 my_userapp.asm /^ a4: 5b pop %ebx$/;" l -a4 rm.asm /^ a4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -a4 test_master.asm /^ a4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -a4 test_stride.asm /^ a4: 66 90 xchg %ax,%ax$/;" l -a4 wc.asm /^ a4: 56 push %esi$/;" l -a4 zombie.asm /^ a4: 5b pop %ebx$/;" l -a40 sh.asm /^ a40: 8b 5d fc mov -0x4(%ebp),%ebx$/;" l -a41 usertests.asm /^ a41: 83 ec 0c sub $0xc,%esp$/;" l -a43 sh.asm /^ a43: c9 leave $/;" l -a44 sh.asm /^ a44: c3 ret $/;" l -a44 usertests.asm /^ a44: ff 75 e4 pushl -0x1c(%ebp)$/;" l -a45 sh.asm /^ a45: 8d 76 00 lea 0x0(%esi),%esi$/;" l -a47 usertests.asm /^ a47: bf 01 00 00 00 mov $0x1,%edi$/;" l -a48 sh.asm /^ a48: 83 ec 0c sub $0xc,%esp$/;" l -a4b sh.asm /^ a4b: ff 73 04 pushl 0x4(%ebx)$/;" l -a4c usertests.asm /^ a4c: 31 db xor %ebx,%ebx$/;" l -a4e sh.asm /^ a4e: e8 6d ff ff ff call 9c0 $/;" l -a4e usertests.asm /^ a4e: e8 77 2e 00 00 call 38ca $/;" l -a5 echo.asm /^ a5: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -a5 forktest.asm /^ a5: 85 c0 test %eax,%eax$/;" l -a5 grep.asm /^ a5: e8 b8 04 00 00 call 562 $/;" l -a5 init.asm /^ a5: 50 push %eax$/;" l -a5 kill.asm /^ a5: eb 29 jmp d0 $/;" l -a5 ln.asm /^ a5: eb 29 jmp d0 $/;" l -a5 my_userapp.asm /^ a5: 5e pop %esi$/;" l -a5 usertests.asm /^ a5: e8 b6 05 00 00 call 660 $/;" l -a5 wc.asm /^ a5: 53 push %ebx$/;" l -a5 zombie.asm /^ a5: 5e pop %esi$/;" l -a53 sh.asm /^ a53: 8b 43 0c mov 0xc(%ebx),%eax$/;" l -a53 usertests.asm /^ a53: 83 c4 10 add $0x10,%esp$/;" l -a56 sh.asm /^ a56: 83 c4 10 add $0x10,%esp$/;" l -a56 usertests.asm /^ a56: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)$/;" l -a59 sh.asm /^ a59: c6 00 00 movb $0x0,(%eax)$/;" l -a5c sh.asm /^ a5c: 89 d8 mov %ebx,%eax$/;" l -a5d usertests.asm /^ a5d: 83 ec 04 sub $0x4,%esp$/;" l -a5e sh.asm /^ a5e: 8b 5d fc mov -0x4(%ebp),%ebx$/;" l -a6 init.asm /^ a6: 68 c4 0a 00 00 push $0xac4$/;" l -a6 my_userapp.asm /^ a6: 5d pop %ebp$/;" l -a6 sh.asm /^ a6: 83 ec 0c sub $0xc,%esp$/;" l -a6 test_stride.asm /^ a6: 66 90 xchg %ax,%ax$/;" l -a6 wc.asm /^ a6: 31 f6 xor %esi,%esi$/;" l -a6 zombie.asm /^ a6: 5d pop %ebp$/;" l -a60 usertests.asm /^ a60: 57 push %edi$/;" l -a61 sh.asm /^ a61: c9 leave $/;" l -a61 usertests.asm /^ a61: 68 c0 85 00 00 push $0x85c0$/;" l -a62 sh.asm /^ a62: c3 ret $/;" l -a63 sh.asm /^ a63: 90 nop$/;" l -a64 sh.asm /^ a64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -a66 usertests.asm /^ a66: ff 75 e0 pushl -0x20(%ebp)$/;" l -a68 sh.asm /^ a68: 31 c0 xor %eax,%eax$/;" l -a69 usertests.asm /^ a69: e8 4c 2e 00 00 call 38ba $/;" l -a6a sh.asm /^ a6a: eb 8d jmp 9f9 $/;" l -a6c sh.asm /^ a6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -a6e usertests.asm /^ a6e: 83 c4 10 add $0x10,%esp$/;" l -a7 forktest.asm /^ a7: 78 5e js 107 $/;" l -a7 kill.asm /^ a7: 89 f6 mov %esi,%esi$/;" l -a7 ln.asm /^ a7: 89 f6 mov %esi,%esi$/;" l -a7 my_userapp.asm /^ a7: c3 ret $/;" l -a7 test_mlfq.asm /^ a7: b8 d0 07 00 00 mov $0x7d0,%eax$/;" l -a7 zombie.asm /^ a7: c3 ret $/;" l -a70 sh.asm /^ a70: 55 push %ebp$/;" l -a71 sh.asm /^ a71: 89 e5 mov %esp,%ebp$/;" l -a71 usertests.asm /^ a71: 85 c0 test %eax,%eax$/;" l -a73 sh.asm /^ a73: 56 push %esi$/;" l -a73 usertests.asm /^ a73: 0f 8e a3 00 00 00 jle b1c $/;" l -a74 sh.asm /^ a74: 53 push %ebx$/;" l -a75 sh.asm /^ a75: 8b 5d 08 mov 0x8(%ebp),%ebx$/;" l -a78 sh.asm /^ a78: 83 ec 0c sub $0xc,%esp$/;" l -a79 usertests.asm /^ a79: 89 d9 mov %ebx,%ecx$/;" l -a7b sh.asm /^ a7b: 53 push %ebx$/;" l -a7b usertests.asm /^ a7b: 8d 34 18 lea (%eax,%ebx,1),%esi$/;" l -a7c sh.asm /^ a7c: e8 df 00 00 00 call b60 $/;" l -a7e usertests.asm /^ a7e: f7 d9 neg %ecx$/;" l -a8 echo.asm /^ a8: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -a8 my_userapp.asm /^ a8: 90 nop$/;" l -a8 stressfs.asm /^ a8: 83 c4 10 add $0x10,%esp$/;" l -a8 test_stride.asm /^ a8: 66 90 xchg %ax,%ax$/;" l -a8 wc.asm /^ a8: 31 db xor %ebx,%ebx$/;" l -a8 zombie.asm /^ a8: 90 nop$/;" l -a80 usertests.asm /^ a80: 38 9c 0b c0 85 00 00 cmp %bl,0x85c0(%ebx,%ecx,1)$/;" l -a81 sh.asm /^ a81: 59 pop %ecx$/;" l -a82 sh.asm /^ a82: 01 c3 add %eax,%ebx$/;" l -a84 sh.asm /^ a84: 8d 45 08 lea 0x8(%ebp),%eax$/;" l -a87 sh.asm /^ a87: 5e pop %esi$/;" l -a87 usertests.asm /^ a87: 8d 53 01 lea 0x1(%ebx),%edx$/;" l -a88 sh.asm /^ a88: 53 push %ebx$/;" l -a89 sh.asm /^ a89: 50 push %eax$/;" l -a8a sh.asm /^ a8a: e8 01 fe ff ff call 890 $/;" l -a8a usertests.asm /^ a8a: 75 1b jne aa7 $/;" l -a8c usertests.asm /^ a8c: 39 f2 cmp %esi,%edx$/;" l -a8e usertests.asm /^ a8e: 89 d3 mov %edx,%ebx$/;" l -a8f sh.asm /^ a8f: 89 c6 mov %eax,%esi$/;" l +a3 echo.asm /^ a3: 53 push %ebx$/;" l +a4 cat.asm /^ a4: 68 80 0b 00 00 push $0xb80$/;" l +a4 echo.asm /^ a4: 8b 45 08 mov 0x8(%ebp),%eax$/;" l +a7 echo.asm /^ a7: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l a9 cat.asm /^ a9: 6a 01 push $0x1$/;" l -a9 forktest.asm /^ a9: 83 eb 01 sub $0x1,%ebx$/;" l -a9 kill.asm /^ a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -a9 ln.asm /^ a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -a9 ls.asm /^ a9: 83 c4 0c add $0xc,%esp$/;" l -a9 my_userapp.asm /^ a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -a9 sh.asm /^ a9: 68 80 18 00 00 push $0x1880$/;" l -a9 test_sample.asm /^ a9: e8 ac 02 00 00 call 35a $/;" l -a9 zombie.asm /^ a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -a90 usertests.asm /^ a90: 75 ee jne a80 $/;" l -a91 sh.asm /^ a91: 8d 45 08 lea 0x8(%ebp),%eax$/;" l -a92 usertests.asm /^ a92: 01 ff add %edi,%edi$/;" l -a94 sh.asm /^ a94: 83 c4 0c add $0xc,%esp$/;" l -a94 usertests.asm /^ a94: 01 45 d4 add %eax,-0x2c(%ebp)$/;" l -a97 sh.asm /^ a97: 68 d9 11 00 00 push $0x11d9$/;" l -a97 usertests.asm /^ a97: b8 00 20 00 00 mov $0x2000,%eax$/;" l -a9c sh.asm /^ a9c: 53 push %ebx$/;" l -a9c usertests.asm /^ a9c: 81 ff 00 20 00 00 cmp $0x2000,%edi$/;" l -a9d sh.asm /^ a9d: 50 push %eax$/;" l -a9e sh.asm /^ a9e: e8 4d fb ff ff call 5f0 $/;" l -aa grep.asm /^ aa: 66 90 xchg %ax,%ax$/;" l -aa mkdir.asm /^ aa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi$/;" l -aa rm.asm /^ aa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi$/;" l -aa test_master.asm /^ aa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi$/;" l -aa test_stride.asm /^ aa: 66 90 xchg %ax,%ax$/;" l -aa usertests.asm /^ aa: e8 81 07 00 00 call 830 $/;" l -aa wc.asm /^ aa: 83 ec 1c sub $0x1c,%esp$/;" l -aa2 usertests.asm /^ aa2: 0f 4f f8 cmovg %eax,%edi$/;" l -aa3 sh.asm /^ aa3: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -aa5 usertests.asm /^ aa5: eb b6 jmp a5d $/;" l -aa6 sh.asm /^ aa6: 83 c4 10 add $0x10,%esp$/;" l -aa7 usertests.asm /^ aa7: 83 ec 08 sub $0x8,%esp$/;" l -aa9 sh.asm /^ aa9: 39 c3 cmp %eax,%ebx$/;" l -aaa usertests.asm /^ aaa: 68 96 40 00 00 push $0x4096$/;" l -aab sh.asm /^ aab: 75 12 jne abf $/;" l -aad sh.asm /^ aad: 83 ec 0c sub $0xc,%esp$/;" l -aaf usertests.asm /^ aaf: 6a 01 push $0x1$/;" l -ab cat.asm /^ ab: e8 c2 02 00 00 call 372 $/;" l -ab echo.asm /^ ab: 0f b6 02 movzbl (%edx),%eax$/;" l -ab init.asm /^ ab: 68 fe 07 00 00 push $0x7fe$/;" l -ab stressfs.asm /^ ab: 89 c7 mov %eax,%edi$/;" l -ab0 sh.asm /^ ab0: 56 push %esi$/;" l -ab1 sh.asm /^ ab1: e8 0a ff ff ff call 9c0 $/;" l -ab1 usertests.asm /^ ab1: e8 6a 2f 00 00 call 3a20 $/;" l -ab6 sh.asm /^ ab6: 8d 65 f8 lea -0x8(%ebp),%esp$/;" l -ab6 usertests.asm /^ ab6: 83 c4 10 add $0x10,%esp$/;" l -ab9 sh.asm /^ ab9: 89 f0 mov %esi,%eax$/;" l -ab9 usertests.asm /^ ab9: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -abb sh.asm /^ abb: 5b pop %ebx$/;" l -abc sh.asm /^ abc: 5e pop %esi$/;" l -abc usertests.asm /^ abc: 5b pop %ebx$/;" l -abd sh.asm /^ abd: 5d pop %ebp$/;" l -abd usertests.asm /^ abd: 5e pop %esi$/;" l -abe sh.asm /^ abe: c3 ret $/;" l -abe usertests.asm /^ abe: 5f pop %edi$/;" l -abf sh.asm /^ abf: 52 push %edx$/;" l -abf usertests.asm /^ abf: 5d pop %ebp$/;" l -ac forktest.asm /^ ac: 75 f2 jne a0 $/;" l -ac grep.asm /^ ac: 66 90 xchg %ax,%ax$/;" l -ac ls.asm /^ ac: 50 push %eax$/;" l -ac test_mlfq.asm /^ ac: 0f 45 c2 cmovne %edx,%eax$/;" l -ac test_stride.asm /^ ac: 66 90 xchg %ax,%ax$/;" l -ac0 sh.asm /^ ac0: 50 push %eax$/;" l -ac0 usertests.asm /^ ac0: c3 ret $/;" l -ac1 sh.asm /^ ac1: 68 52 12 00 00 push $0x1252$/;" l -ac1 usertests.asm /^ ac1: 83 ec 0c sub $0xc,%esp$/;" l -ac4 usertests.asm /^ ac4: ff 75 e0 pushl -0x20(%ebp)$/;" l -ac6 sh.asm /^ ac6: 6a 02 push $0x2$/;" l -ac7 usertests.asm /^ ac7: 31 f6 xor %esi,%esi$/;" l -ac8 sh.asm /^ ac8: e8 d3 03 00 00 call ea0 $/;" l -ac9 usertests.asm /^ ac9: e8 fc 2d 00 00 call 38ca $/;" l -acd sh.asm /^ acd: c7 04 24 16 12 00 00 movl $0x1216,(%esp)$/;" l -ace usertests.asm /^ ace: 83 c4 10 add $0x10,%esp$/;" l +aa echo.asm /^ aa: 89 c2 mov %eax,%edx$/;" l +ab cat.asm /^ ab: e8 f2 02 00 00 call 3a2 $/;" l +ac echo.asm /^ ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l acquire spinlock.c /^acquire(struct spinlock *lk)$/;" f acquiresleep sleeplock.c /^acquiresleep(struct sleeplock *lk)$/;" f -ad ls.asm /^ ad: 53 push %ebx$/;" l -ad stressfs.asm /^ ad: 8d 76 00 lea 0x0(%esi),%esi$/;" l -ad wc.asm /^ ad: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp)$/;" l -ad1 usertests.asm /^ ad1: 89 f0 mov %esi,%eax$/;" l -ad3 usertests.asm /^ ad3: 8d 96 09 04 00 00 lea 0x409(%esi),%edx$/;" l -ad4 sh.asm /^ ad4: e8 87 f6 ff ff call 160 $/;" l -ad9 sh.asm /^ ad9: 66 90 xchg %ax,%ax$/;" l -ad9 usertests.asm /^ ad9: 89 f3 mov %esi,%ebx$/;" l -adb sh.asm /^ adb: 66 90 xchg %ax,%ax$/;" l -adb usertests.asm /^ adb: f7 d8 neg %eax$/;" l -add sh.asm /^ add: 66 90 xchg %ax,%ax$/;" l -add usertests.asm /^ add: 8d 76 00 lea 0x0(%esi),%esi$/;" l -addr kernel.asm /^ addr = P2V(a);$/;" d -addr kernel.asm /^ addr = myproc()->sz;$/;" d addr mp.h /^ uint *addr; \/\/ I\/O APIC address$/;" m struct:mpioapic addrs file.h /^ uint addrs[NDIRECT+1];$/;" m struct:inode addrs fs.h /^ uint addrs[NDIRECT+1]; \/\/ Data block addresses$/;" m struct:dinode -adf sh.asm /^ adf: 90 nop$/;" l -ae echo.asm /^ ae: 0f b6 19 movzbl (%ecx),%ebx$/;" l -ae forktest.asm /^ ae: e8 e7 02 00 00 call 39a $/;" l -ae grep.asm /^ ae: 66 90 xchg %ax,%ax$/;" l -ae ls.asm /^ ae: 68 80 0d 00 00 push $0xd80$/;" l -ae sh.asm /^ ae: e8 ad 0a 00 00 call b60 $/;" l -ae test_sample.asm /^ ae: 59 pop %ecx$/;" l -ae test_stride.asm /^ ae: 66 90 xchg %ax,%ax$/;" l -ae0 sh.asm /^ ae0: 55 push %ebp$/;" l -ae0 usertests.asm /^ ae0: 88 9c 18 c0 85 00 00 mov %bl,0x85c0(%eax,%ebx,1)$/;" l -ae1 sh.asm /^ ae1: 89 e5 mov %esp,%ebp$/;" l -ae3 sh.asm /^ ae3: 53 push %ebx$/;" l -ae4 sh.asm /^ ae4: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -ae7 sh.asm /^ ae7: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -ae7 usertests.asm /^ ae7: 83 c3 01 add $0x1,%ebx$/;" l -aea sh.asm /^ aea: 89 c2 mov %eax,%edx$/;" l -aea usertests.asm /^ aea: 39 d3 cmp %edx,%ebx$/;" l -aec sh.asm /^ aec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -aec usertests.asm /^ aec: 75 f2 jne ae0 $/;" l -aee usertests.asm /^ aee: 83 ec 04 sub $0x4,%esp$/;" l -af test_mlfq.asm /^ af: 83 ec 08 sub $0x8,%esp$/;" l -af test_sample.asm /^ af: 5b pop %ebx$/;" l -af usertests.asm /^ af: e8 3c 02 00 00 call 2f0 $/;" l -af0 sh.asm /^ af0: 83 c1 01 add $0x1,%ecx$/;" l -af1 usertests.asm /^ af1: 89 de mov %ebx,%esi$/;" l -af3 sh.asm /^ af3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx$/;" l -af3 usertests.asm /^ af3: 68 09 04 00 00 push $0x409$/;" l -af7 sh.asm /^ af7: 83 c2 01 add $0x1,%edx$/;" l -af8 usertests.asm /^ af8: 68 c0 85 00 00 push $0x85c0$/;" l -afa sh.asm /^ afa: 84 db test %bl,%bl$/;" l -afc sh.asm /^ afc: 88 5a ff mov %bl,-0x1(%edx)$/;" l -afd usertests.asm /^ afd: ff 75 e4 pushl -0x1c(%ebp)$/;" l -aff sh.asm /^ aff: 75 ef jne af0 $/;" l alarm proc.c /^alarm(char *proc_name) { \/\/ it is the syscall used when i test my scheduler working$/;" f align elf.h /^ uint align;$/;" m struct:proghdr allocproc proc.c /^allocproc(void)$/;" f file: allocuvm vm.c /^allocuvm(pde_t *pgdir, uint oldsz, uint newsz)$/;" f -alltraps kernel.asm /^alltraps:$/;" l alltraps trapasm.S /^alltraps:$/;" l -amt usertests.asm /^ amt = (BIG) - (uint)a;$/;" d ap cat.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d ap echo.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap grep.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap init.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap kill.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap ln.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap ls.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap mkdir.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap my_userapp.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap rm.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap sh.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap stressfs.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap test_master.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap test_mlfq.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap test_sample.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap test_stride.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap usertests.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap wc.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -ap zombie.asm /^ ap = (uint*)(void*)&fmt + 1;$/;" d -apicid kernel.asm /^ apicid = lapicid();$/;" d apicid mp.h /^ uchar apicid; \/\/ local APIC id$/;" m struct:mpproc apicid proc.h /^ uchar apicid; \/\/ Local APIC ID$/;" m struct:cpu apicno mp.h /^ uchar apicno; \/\/ I\/O APIC id$/;" m struct:mpioapic -argc sh.asm /^ argc = 0;$/;" d argfd sysfile.c /^argfd(int n, int *pfd, struct file **pf)$/;" f file: argint syscall.c /^argint(int n, int *ip)$/;" f -argp kernel.asm /^ argp = (uint*)(void*)(&fmt + 1);$/;" d argptest usertests.c /^void argptest()$/;" f argptr syscall.c /^argptr(int n, char **pp, int size)$/;" f args mmu.h /^ uint args : 5; \/\/ # args, 0 for interrupt\/trap gates$/;" m struct:gatedesc @@ -782,352 +405,30 @@ atoi ulib.c /^atoi(const char *s)$/;" f avl mmu.h /^ uint avl : 1; \/\/ Unused (available for software use)$/;" m struct:segdesc b cat.asm /^ b: 89 e5 mov %esp,%ebp$/;" l b echo.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b forktest.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b grep.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b init.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b kernel.asm /^ b = bget(dev, blockno);$/;" d -b kill.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b ls.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b mkdir.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b my_userapp.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b rm.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b sh.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b test_master.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b test_mlfq.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b test_sample.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b test_stride.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b usertests.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b usertests.asm /^ b = sbrk(1);$/;" d -b wc.asm /^ b: 89 e5 mov %esp,%ebp$/;" l -b zombie.asm /^ b: 89 e5 mov %esp,%ebp$/;" l b0 cat.asm /^ b0: 83 c4 10 add $0x10,%esp$/;" l -b0 grep.asm /^ b0: 55 push %ebp$/;" l -b0 init.asm /^ b0: e8 b5 02 00 00 call 36a $/;" l -b0 kill.asm /^ b0: 83 c2 01 add $0x1,%edx$/;" l -b0 ln.asm /^ b0: 83 c2 01 add $0x1,%edx$/;" l -b0 mkdir.asm /^ b0: 55 push %ebp$/;" l -b0 my_userapp.asm /^ b0: 55 push %ebp$/;" l -b0 rm.asm /^ b0: 55 push %ebp$/;" l -b0 stressfs.asm /^ b0: 83 ec 04 sub $0x4,%esp$/;" l -b0 test_master.asm /^ b0: 55 push %ebp$/;" l -b0 test_sample.asm /^ b0: 68 d5 07 00 00 push $0x7d5$/;" l -b0 test_stride.asm /^ b0: 55 push %ebp$/;" l -b0 zombie.asm /^ b0: 55 push %ebp$/;" l -b00 usertests.asm /^ b00: e8 bd 2d 00 00 call 38c2 $/;" l -b01 sh.asm /^ b01: 5b pop %ebx$/;" l -b02 sh.asm /^ b02: 5d pop %ebp$/;" l -b03 sh.asm /^ b03: c3 ret $/;" l -b04 sh.asm /^ b04: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -b05 usertests.asm /^ b05: 83 c4 10 add $0x10,%esp$/;" l -b08 usertests.asm /^ b08: 3d 09 04 00 00 cmp $0x409,%eax$/;" l -b0a sh.asm /^ b0a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi$/;" l -b0d usertests.asm /^ b0d: 75 7b jne b8a $/;" l -b0f usertests.asm /^ b0f: 81 fb 2d 14 00 00 cmp $0x142d,%ebx$/;" l -b1 echo.asm /^ b1: 84 c0 test %al,%al$/;" l -b1 grep.asm /^ b1: 89 e5 mov %esp,%ebp$/;" l -b1 mkdir.asm /^ b1: 89 e5 mov %esp,%ebp$/;" l -b1 my_userapp.asm /^ b1: 89 e5 mov %esp,%ebp$/;" l -b1 rm.asm /^ b1: 89 e5 mov %esp,%ebp$/;" l -b1 test_master.asm /^ b1: 89 e5 mov %esp,%ebp$/;" l -b1 test_stride.asm /^ b1: 89 e5 mov %esp,%ebp$/;" l -b1 zombie.asm /^ b1: 89 e5 mov %esp,%ebp$/;" l -b10 sh.asm /^ b10: 55 push %ebp$/;" l -b11 sh.asm /^ b11: 89 e5 mov %esp,%ebp$/;" l -b13 sh.asm /^ b13: 56 push %esi$/;" l -b14 sh.asm /^ b14: 53 push %ebx$/;" l -b15 sh.asm /^ b15: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -b15 usertests.asm /^ b15: 75 ba jne ad1 $/;" l -b17 usertests.asm /^ b17: e8 86 2d 00 00 call 38a2 $/;" l -b18 sh.asm /^ b18: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -b1b sh.asm /^ b1b: 0f b6 02 movzbl (%edx),%eax$/;" l -b1c usertests.asm /^ b1c: 81 7d d4 2d 14 00 00 cmpl $0x142d,-0x2c(%ebp)$/;" l -b1e sh.asm /^ b1e: 0f b6 19 movzbl (%ecx),%ebx$/;" l -b2 test_mlfq.asm /^ b2: ff 75 e4 pushl -0x1c(%ebp)$/;" l -b21 sh.asm /^ b21: 84 c0 test %al,%al$/;" l -b23 sh.asm /^ b23: 75 1e jne b43 $/;" l -b23 usertests.asm /^ b23: 75 26 jne b4b $/;" l -b25 sh.asm /^ b25: eb 29 jmp b50 $/;" l -b25 usertests.asm /^ b25: 83 ec 0c sub $0xc,%esp$/;" l -b27 sh.asm /^ b27: 89 f6 mov %esi,%esi$/;" l -b28 usertests.asm /^ b28: ff 75 e0 pushl -0x20(%ebp)$/;" l -b29 sh.asm /^ b29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -b2b usertests.asm /^ b2b: e8 9a 2d 00 00 call 38ca $/;" l +b0 echo.asm /^ b0: 83 c1 01 add $0x1,%ecx$/;" l b3 cat.asm /^ b3: 39 c3 cmp %eax,%ebx$/;" l -b3 echo.asm /^ b3: 75 1e jne d3 $/;" l -b3 forktest.asm /^ b3: 83 f8 ff cmp $0xffffffff,%eax$/;" l -b3 grep.asm /^ b3: 57 push %edi$/;" l -b3 kill.asm /^ b3: 0f b6 02 movzbl (%edx),%eax$/;" l -b3 ln.asm /^ b3: 0f b6 02 movzbl (%edx),%eax$/;" l -b3 ls.asm /^ b3: e8 98 04 00 00 call 550 $/;" l -b3 mkdir.asm /^ b3: 56 push %esi$/;" l -b3 my_userapp.asm /^ b3: 8b 4d 08 mov 0x8(%ebp),%ecx$/;" l -b3 rm.asm /^ b3: 56 push %esi$/;" l -b3 sh.asm /^ b3: c7 04 24 83 18 00 00 movl $0x1883,(%esp)$/;" l -b3 stressfs.asm /^ b3: 68 00 02 00 00 push $0x200$/;" l -b3 test_master.asm /^ b3: 56 push %esi$/;" l -b3 test_stride.asm /^ b3: 53 push %ebx$/;" l -b3 zombie.asm /^ b3: 8b 4d 08 mov 0x8(%ebp),%ecx$/;" l -b30 sh.asm /^ b30: 83 c2 01 add $0x1,%edx$/;" l -b30 usertests.asm /^ b30: e8 75 2d 00 00 call 38aa $/;" l -b33 sh.asm /^ b33: 0f b6 02 movzbl (%edx),%eax$/;" l -b35 usertests.asm /^ b35: 58 pop %eax$/;" l -b36 sh.asm /^ b36: 8d 71 01 lea 0x1(%ecx),%esi$/;" l -b36 usertests.asm /^ b36: 5a pop %edx$/;" l -b37 usertests.asm /^ b37: 68 bb 40 00 00 push $0x40bb$/;" l -b39 sh.asm /^ b39: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l -b3c usertests.asm /^ b3c: 6a 01 push $0x1$/;" l -b3d sh.asm /^ b3d: 84 c0 test %al,%al$/;" l -b3e usertests.asm /^ b3e: e8 dd 2e 00 00 call 3a20 $/;" l -b3f sh.asm /^ b3f: 74 0f je b50 $/;" l -b4 grep.asm /^ b4: 56 push %esi$/;" l -b4 mkdir.asm /^ b4: 53 push %ebx$/;" l -b4 rm.asm /^ b4: 53 push %ebx$/;" l -b4 test_master.asm /^ b4: 53 push %ebx$/;" l -b4 test_stride.asm /^ b4: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -b4 usertests.asm /^ b4: e8 47 01 00 00 call 200 $/;" l -b4 wc.asm /^ b4: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp)$/;" l -b41 sh.asm /^ b41: 89 f1 mov %esi,%ecx$/;" l -b43 sh.asm /^ b43: 38 d8 cmp %bl,%al$/;" l -b43 usertests.asm /^ b43: 83 c4 10 add $0x10,%esp$/;" l -b45 sh.asm /^ b45: 74 e9 je b30 $/;" l -b46 usertests.asm /^ b46: e9 6e ff ff ff jmp ab9 $/;" l -b47 sh.asm /^ b47: 29 d8 sub %ebx,%eax$/;" l -b49 sh.asm /^ b49: 5b pop %ebx$/;" l -b4a sh.asm /^ b4a: 5e pop %esi$/;" l -b4b sh.asm /^ b4b: 5d pop %ebp$/;" l -b4b usertests.asm /^ b4b: 83 ec 04 sub $0x4,%esp$/;" l -b4c sh.asm /^ b4c: c3 ret $/;" l -b4d sh.asm /^ b4d: 8d 76 00 lea 0x0(%esi),%esi$/;" l -b4e usertests.asm /^ b4e: ff 75 d4 pushl -0x2c(%ebp)$/;" l +b3 echo.asm /^ b3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx$/;" l b5 cat.asm /^ b5: 75 26 jne dd $/;" l -b5 echo.asm /^ b5: eb 29 jmp e0 $/;" l -b5 grep.asm /^ b5: 53 push %ebx$/;" l -b5 init.asm /^ b5: 5a pop %edx$/;" l -b5 mkdir.asm /^ b5: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -b5 rm.asm /^ b5: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -b5 test_master.asm /^ b5: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -b5 test_mlfq.asm /^ b5: ff 75 e0 pushl -0x20(%ebp)$/;" l -b5 test_sample.asm /^ b5: 6a 01 push $0x1$/;" l -b50 sh.asm /^ b50: 31 c0 xor %eax,%eax$/;" l -b51 usertests.asm /^ b51: 68 a4 40 00 00 push $0x40a4$/;" l -b52 sh.asm /^ b52: 29 d8 sub %ebx,%eax$/;" l -b54 sh.asm /^ b54: 5b pop %ebx$/;" l -b55 sh.asm /^ b55: 5e pop %esi$/;" l -b56 sh.asm /^ b56: 5d pop %ebp$/;" l -b56 usertests.asm /^ b56: 6a 01 push $0x1$/;" l -b57 sh.asm /^ b57: c3 ret $/;" l -b58 sh.asm /^ b58: 90 nop$/;" l -b58 usertests.asm /^ b58: e8 c3 2e 00 00 call 3a20 $/;" l -b59 sh.asm /^ b59: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -b5d usertests.asm /^ b5d: e8 40 2d 00 00 call 38a2 $/;" l -b6 forktest.asm /^ b6: 75 71 jne 129 $/;" l -b6 grep.asm /^ b6: 83 ec 0c sub $0xc,%esp$/;" l -b6 init.asm /^ b6: 59 pop %ecx$/;" l -b6 kill.asm /^ b6: 8d 71 01 lea 0x1(%ecx),%esi$/;" l -b6 ln.asm /^ b6: 8d 71 01 lea 0x1(%ecx),%esi$/;" l -b6 my_userapp.asm /^ b6: 80 39 00 cmpb $0x0,(%ecx)$/;" l -b6 zombie.asm /^ b6: 80 39 00 cmpb $0x0,(%ecx)$/;" l -b60 sh.asm /^ b60: 55 push %ebp$/;" l -b61 sh.asm /^ b61: 89 e5 mov %esp,%ebp$/;" l -b62 usertests.asm /^ b62: 83 ec 08 sub $0x8,%esp$/;" l -b63 sh.asm /^ b63: 8b 4d 08 mov 0x8(%ebp),%ecx$/;" l -b65 usertests.asm /^ b65: 68 79 40 00 00 push $0x4079$/;" l -b66 sh.asm /^ b66: 80 39 00 cmpb $0x0,(%ecx)$/;" l -b69 sh.asm /^ b69: 74 12 je b7d $/;" l -b6a usertests.asm /^ b6a: 6a 01 push $0x1$/;" l -b6b sh.asm /^ b6b: 31 d2 xor %edx,%edx$/;" l -b6c usertests.asm /^ b6c: e8 af 2e 00 00 call 3a20 $/;" l -b6d sh.asm /^ b6d: 8d 76 00 lea 0x0(%esi),%esi$/;" l b7 cat.asm /^ b7: 83 ec 04 sub $0x4,%esp$/;" l -b7 echo.asm /^ b7: 89 f6 mov %esi,%esi$/;" l -b7 init.asm /^ b7: 68 01 08 00 00 push $0x801$/;" l -b7 test_sample.asm /^ b7: e8 e4 03 00 00 call 4a0 $/;" l -b7 test_stride.asm /^ b7: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -b70 sh.asm /^ b70: 83 c2 01 add $0x1,%edx$/;" l -b71 usertests.asm /^ b71: e8 2c 2d 00 00 call 38a2 $/;" l -b73 sh.asm /^ b73: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)$/;" l -b76 usertests.asm /^ b76: 83 ec 08 sub $0x8,%esp$/;" l -b77 sh.asm /^ b77: 89 d0 mov %edx,%eax$/;" l -b79 sh.asm /^ b79: 75 f5 jne b70 $/;" l -b79 usertests.asm /^ b79: 68 c5 40 00 00 push $0x40c5$/;" l -b7b sh.asm /^ b7b: 5d pop %ebp$/;" l -b7c sh.asm /^ b7c: c3 ret $/;" l -b7d sh.asm /^ b7d: 31 c0 xor %eax,%eax$/;" l -b7e usertests.asm /^ b7e: 6a 01 push $0x1$/;" l -b7f sh.asm /^ b7f: 5d pop %ebp$/;" l -b8 forktest.asm /^ b8: 83 ec 0c sub $0xc,%esp$/;" l -b8 ls.asm /^ b8: 89 1c 24 mov %ebx,(%esp)$/;" l -b8 mkdir.asm /^ b8: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -b8 rm.asm /^ b8: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -b8 stressfs.asm /^ b8: 56 push %esi$/;" l -b8 test_master.asm /^ b8: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -b8 test_mlfq.asm /^ b8: ff 75 dc pushl -0x24(%ebp)$/;" l -b80 sh.asm /^ b80: c3 ret $/;" l -b80 usertests.asm /^ b80: e8 9b 2e 00 00 call 3a20 $/;" l -b81 sh.asm /^ b81: eb 0d jmp b90 $/;" l -b83 sh.asm /^ b83: 90 nop$/;" l -b84 sh.asm /^ b84: 90 nop$/;" l -b85 sh.asm /^ b85: 90 nop$/;" l -b85 usertests.asm /^ b85: e8 18 2d 00 00 call 38a2 $/;" l -b86 sh.asm /^ b86: 90 nop$/;" l -b87 sh.asm /^ b87: 90 nop$/;" l -b88 sh.asm /^ b88: 90 nop$/;" l -b89 sh.asm /^ b89: 90 nop$/;" l -b8a sh.asm /^ b8a: 90 nop$/;" l -b8a usertests.asm /^ b8a: 83 ec 08 sub $0x8,%esp$/;" l -b8b sh.asm /^ b8b: 90 nop$/;" l -b8c sh.asm /^ b8c: 90 nop$/;" l -b8d sh.asm /^ b8d: 90 nop$/;" l -b8d usertests.asm /^ b8d: 68 88 40 00 00 push $0x4088$/;" l -b8e sh.asm /^ b8e: 90 nop$/;" l -b8f sh.asm /^ b8f: 90 nop$/;" l -b9 echo.asm /^ b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -b9 grep.asm /^ b9: 8b 75 08 mov 0x8(%ebp),%esi$/;" l -b9 kill.asm /^ b9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l -b9 ln.asm /^ b9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l -b9 my_userapp.asm /^ b9: 74 12 je cd $/;" l -b9 stressfs.asm /^ b9: 57 push %edi$/;" l -b9 usertests.asm /^ b9: e8 62 00 00 00 call 120 $/;" l -b9 zombie.asm /^ b9: 74 12 je cd $/;" l -b90 sh.asm /^ b90: 55 push %ebp$/;" l -b91 sh.asm /^ b91: 89 e5 mov %esp,%ebp$/;" l -b92 usertests.asm /^ b92: 6a 01 push $0x1$/;" l -b93 sh.asm /^ b93: 57 push %edi$/;" l -b94 sh.asm /^ b94: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -b94 usertests.asm /^ b94: e8 87 2e 00 00 call 3a20 $/;" l -b97 sh.asm /^ b97: 8b 4d 10 mov 0x10(%ebp),%ecx$/;" l -b99 usertests.asm /^ b99: e8 04 2d 00 00 call 38a2 $/;" l -b9a sh.asm /^ b9a: 8b 45 0c mov 0xc(%ebp),%eax$/;" l -b9d sh.asm /^ b9d: 89 d7 mov %edx,%edi$/;" l -b9e usertests.asm /^ b9e: 66 90 xchg %ax,%ax$/;" l -b9f sh.asm /^ b9f: fc cld $/;" l +b7 echo.asm /^ b7: 83 c2 01 add $0x1,%edx$/;" l ba cat.asm /^ ba: 68 00 02 00 00 push $0x200$/;" l -ba sh.asm /^ ba: c6 80 7f 18 00 00 00 movb $0x0,0x187f(%eax)$/;" l -ba stressfs.asm /^ ba: e8 e3 02 00 00 call 3a2 $/;" l -ba test_stride.asm /^ ba: 89 c2 mov %eax,%edx$/;" l -ba0 sh.asm /^ ba0: f3 aa rep stos %al,%es:(%edi)$/;" l -ba0 usertests.asm /^ ba0: 55 push %ebp$/;" l -ba1 usertests.asm /^ ba1: 89 e5 mov %esp,%ebp$/;" l -ba2 sh.asm /^ ba2: 89 d0 mov %edx,%eax$/;" l -ba3 usertests.asm /^ ba3: 57 push %edi$/;" l -ba4 sh.asm /^ ba4: 5f pop %edi$/;" l -ba4 usertests.asm /^ ba4: 56 push %esi$/;" l -ba5 sh.asm /^ ba5: 5d pop %ebp$/;" l -ba5 usertests.asm /^ ba5: 53 push %ebx$/;" l -ba6 sh.asm /^ ba6: c3 ret $/;" l -ba6 usertests.asm /^ ba6: 83 ec 24 sub $0x24,%esp$/;" l -ba7 sh.asm /^ ba7: 89 f6 mov %esi,%esi$/;" l -ba9 sh.asm /^ ba9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -ba9 usertests.asm /^ ba9: 68 d4 40 00 00 push $0x40d4$/;" l +ba echo.asm /^ ba: 84 db test %bl,%bl$/;" l backcmd sh.c /^backcmd(struct cmd *subcmd)$/;" f backcmd sh.c /^struct backcmd {$/;" s file: -bad kernel.asm /^ bad:$/;" l -bad kernel.asm /^bad:$/;" l -bae usertests.asm /^ bae: 6a 01 push $0x1$/;" l balloc fs.c /^balloc(uint dev)$/;" f file: balloc mkfs.c /^balloc(int used)$/;" f base umalloc.c /^static Header base;$/;" v file: base_15_0 mmu.h /^ uint base_15_0 : 16; \/\/ Low bits of segment base address$/;" m struct:segdesc base_23_16 mmu.h /^ uint base_23_16 : 8; \/\/ Middle bits of segment base address$/;" m struct:segdesc base_31_24 mmu.h /^ uint base_31_24 : 8; \/\/ High bits of segment base address$/;" m struct:segdesc -bb forktest.asm /^ bb: 68 96 04 00 00 push $0x496$/;" l -bb ls.asm /^ bb: e8 00 03 00 00 call 3c0 $/;" l -bb mkdir.asm /^ bb: 0f b6 02 movzbl (%edx),%eax$/;" l -bb my_userapp.asm /^ bb: 31 d2 xor %edx,%edx$/;" l -bb rm.asm /^ bb: 0f b6 02 movzbl (%edx),%eax$/;" l -bb test_master.asm /^ bb: 0f b6 02 movzbl (%edx),%eax$/;" l -bb test_mlfq.asm /^ bb: 50 push %eax$/;" l -bb wc.asm /^ bb: 90 nop$/;" l -bb zombie.asm /^ bb: 31 d2 xor %edx,%edx$/;" l -bb0 sh.asm /^ bb0: 55 push %ebp$/;" l -bb0 usertests.asm /^ bb0: e8 6b 2e 00 00 call 3a20 $/;" l -bb1 sh.asm /^ bb1: 89 e5 mov %esp,%ebp$/;" l -bb3 sh.asm /^ bb3: 53 push %ebx$/;" l -bb4 sh.asm /^ bb4: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -bb5 usertests.asm /^ bb5: e8 e0 2c 00 00 call 389a $/;" l -bb7 sh.asm /^ bb7: 8b 5d 0c mov 0xc(%ebp),%ebx$/;" l -bba sh.asm /^ bba: 0f b6 10 movzbl (%eax),%edx$/;" l -bba usertests.asm /^ bba: 83 c4 10 add $0x10,%esp$/;" l -bbd sh.asm /^ bbd: 84 d2 test %dl,%dl$/;" l -bbd usertests.asm /^ bbd: 85 c0 test %eax,%eax$/;" l -bbf sh.asm /^ bbf: 74 1d je bde $/;" l -bbf usertests.asm /^ bbf: 75 02 jne bc3 $/;" l -bc grep.asm /^ bc: 8b 7d 0c mov 0xc(%ebp),%edi$/;" l -bc init.asm /^ bc: 6a 01 push $0x1$/;" l -bc test_mlfq.asm /^ bc: 68 10 08 00 00 push $0x810$/;" l -bc test_sample.asm /^ bc: e8 61 02 00 00 call 322 $/;" l -bc test_stride.asm /^ bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -bc wc.asm /^ bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -bc1 sh.asm /^ bc1: 38 d3 cmp %dl,%bl$/;" l -bc1 usertests.asm /^ bc1: eb fe jmp bc1 $/;" l -bc3 sh.asm /^ bc3: 89 d9 mov %ebx,%ecx$/;" l -bc3 usertests.asm /^ bc3: 89 c7 mov %eax,%edi$/;" l -bc5 sh.asm /^ bc5: 75 0d jne bd4 $/;" l -bc5 usertests.asm /^ bc5: e8 d0 2c 00 00 call 389a $/;" l -bc7 sh.asm /^ bc7: eb 17 jmp be0 $/;" l -bc9 sh.asm /^ bc9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -bca usertests.asm /^ bca: 85 c0 test %eax,%eax$/;" l -bcache bio.c /^} bcache;$/;" v typeref:struct:__anon1 -bcc usertests.asm /^ bcc: 89 c6 mov %eax,%esi$/;" l -bcd kernel.asm /^ bcd = (sb & (1 << 2)) == 0;$/;" d -bce usertests.asm /^ bce: 75 02 jne bd2 $/;" l -bcmd sh.asm /^ bcmd = (struct backcmd*)cmd;$/;" d -bd kill.asm /^ bd: 84 c0 test %al,%al$/;" l -bd ln.asm /^ bd: 84 c0 test %al,%al$/;" l -bd my_userapp.asm /^ bd: 8d 76 00 lea 0x0(%esi),%esi$/;" l -bd zombie.asm /^ bd: 8d 76 00 lea 0x0(%esi),%esi$/;" l -bd0 sh.asm /^ bd0: 38 ca cmp %cl,%dl$/;" l -bd0 usertests.asm /^ bd0: eb fe jmp bd0 $/;" l -bd2 sh.asm /^ bd2: 74 0c je be0 $/;" l -bd2 usertests.asm /^ bd2: 8d 45 e0 lea -0x20(%ebp),%eax$/;" l -bd4 sh.asm /^ bd4: 83 c0 01 add $0x1,%eax$/;" l -bd5 usertests.asm /^ bd5: 83 ec 0c sub $0xc,%esp$/;" l -bd7 sh.asm /^ bd7: 0f b6 10 movzbl (%eax),%edx$/;" l -bd8 usertests.asm /^ bd8: 50 push %eax$/;" l -bd9 usertests.asm /^ bd9: e8 d4 2c 00 00 call 38b2 $/;" l -bda kernel.asm /^ bda = (uchar *) P2V(0x400);$/;" d -bda sh.asm /^ bda: 84 d2 test %dl,%dl$/;" l -bdc sh.asm /^ bdc: 75 f2 jne bd0 $/;" l -bde sh.asm /^ bde: 31 c0 xor %eax,%eax$/;" l -bde usertests.asm /^ bde: e8 b7 2c 00 00 call 389a $/;" l -be init.asm /^ be: e8 ed 03 00 00 call 4b0 $/;" l -be mkdir.asm /^ be: 0f b6 19 movzbl (%ecx),%ebx$/;" l -be rm.asm /^ be: 0f b6 19 movzbl (%ecx),%ebx$/;" l -be test_master.asm /^ be: 0f b6 19 movzbl (%ecx),%ebx$/;" l -be usertests.asm /^ be: e8 ad 0c 00 00 call d70 $/;" l -be0 sh.asm /^ be0: 5b pop %ebx$/;" l -be1 sh.asm /^ be1: 5d pop %ebp$/;" l -be2 sh.asm /^ be2: c3 ret $/;" l -be3 sh.asm /^ be3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -be3 usertests.asm /^ be3: 83 c4 10 add $0x10,%esp$/;" l -be6 usertests.asm /^ be6: 85 c0 test %eax,%eax$/;" l -be8 usertests.asm /^ be8: 89 c3 mov %eax,%ebx$/;" l -be9 sh.asm /^ be9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -bea usertests.asm /^ bea: 75 47 jne c33 $/;" l -bec usertests.asm /^ bec: 83 ec 0c sub $0xc,%esp$/;" l -bef usertests.asm /^ bef: ff 75 e0 pushl -0x20(%ebp)$/;" l +bc echo.asm /^ bc: 88 5a ff mov %bl,-0x1(%edx)$/;" l +bcache bio.c /^} bcache;$/;" v typeref:struct:__anon7 begin_op log.c /^begin_op(void)$/;" f -bf cat.asm /^ bf: 68 20 0b 00 00 push $0xb20$/;" l -bf grep.asm /^ bf: 8b 5d 10 mov 0x10(%ebp),%ebx$/;" l -bf kill.asm /^ bf: 74 0f je d0 $/;" l -bf ln.asm /^ bf: 74 0f je d0 $/;" l -bf stressfs.asm /^ bf: 83 c4 10 add $0x10,%esp$/;" l -bf0 sh.asm /^ bf0: 55 push %ebp$/;" l -bf1 sh.asm /^ bf1: 89 e5 mov %esp,%ebp$/;" l -bf2 usertests.asm /^ bf2: e8 d3 2c 00 00 call 38ca $/;" l -bf3 sh.asm /^ bf3: 57 push %edi$/;" l -bf4 sh.asm /^ bf4: 56 push %esi$/;" l -bf5 sh.asm /^ bf5: 53 push %ebx$/;" l -bf6 sh.asm /^ bf6: 31 f6 xor %esi,%esi$/;" l -bf7 usertests.asm /^ bf7: 83 c4 0c add $0xc,%esp$/;" l -bf8 sh.asm /^ bf8: 8d 7d e7 lea -0x19(%ebp),%edi$/;" l -bfa usertests.asm /^ bfa: 6a 01 push $0x1$/;" l -bfb sh.asm /^ bfb: 83 ec 1c sub $0x1c,%esp$/;" l -bfc usertests.asm /^ bfc: 68 99 46 00 00 push $0x4699$/;" l -bfe sh.asm /^ bfe: eb 29 jmp c29 $/;" l +bf cat.asm /^ bf: 68 80 0b 00 00 push $0xb80$/;" l +bf echo.asm /^ bf: 75 ef jne b0 $/;" l bfree fs.c /^bfree(int dev, uint b)$/;" f file: bget bio.c /^bget(uint dev, uint blockno)$/;" f file: -bi kernel.asm /^ bi = b % BPB;$/;" d bigargtest usertests.c /^bigargtest(void)$/;" f bigdir usertests.c /^bigdir(void)$/;" f bigfile usertests.c /^bigfile(void)$/;" f @@ -1141,449 +442,51 @@ boost trap.c /^boost(void)$/;" f bootmain bootmain.c /^bootmain(void)$/;" f bp cat.asm /^ bp = (Header*)ap - 1;$/;" d bp echo.asm /^ bp = (Header*)ap - 1;$/;" d -bp grep.asm /^ bp = (Header*)ap - 1;$/;" d -bp init.asm /^ bp = (Header*)ap - 1;$/;" d -bp kernel.asm /^ bp = bread(dev, BBLOCK(b, sb));$/;" d -bp kernel.asm /^ bp = bread(dev, IBLOCK(inum, sb));$/;" d -bp kernel.asm /^ bp = bread(ip->dev, IBLOCK(ip->inum, sb));$/;" d -bp kernel.asm /^ bp = bread(ip->dev, addr);$/;" d -bp kernel.asm /^ bp = bread(ip->dev, bmap(ip, off\/BSIZE));$/;" d -bp kernel.asm /^ bp = bread(ip->dev, ip->addrs[NDIRECT]);$/;" d -bp kernel.asm /^ bp = 0;$/;" d -bp kernel.asm /^ bp = bread(dev, 1);$/;" d -bp kernel.asm /^ bp = bread(dev, BBLOCK(b, sb));$/;" d -bp kernel.asm /^ bp = bread(dev, bno);$/;" d -bp kernel.asm /^ bp = bread(ip->dev, IBLOCK(ip->inum, sb));$/;" d -bp kill.asm /^ bp = (Header*)ap - 1;$/;" d -bp ln.asm /^ bp = (Header*)ap - 1;$/;" d -bp ls.asm /^ bp = (Header*)ap - 1;$/;" d -bp mkdir.asm /^ bp = (Header*)ap - 1;$/;" d -bp my_userapp.asm /^ bp = (Header*)ap - 1;$/;" d -bp rm.asm /^ bp = (Header*)ap - 1;$/;" d -bp sh.asm /^ bp = (Header*)ap - 1;$/;" d -bp stressfs.asm /^ bp = (Header*)ap - 1;$/;" d -bp test_master.asm /^ bp = (Header*)ap - 1;$/;" d -bp test_mlfq.asm /^ bp = (Header*)ap - 1;$/;" d -bp test_sample.asm /^ bp = (Header*)ap - 1;$/;" d -bp test_stride.asm /^ bp = (Header*)ap - 1;$/;" d -bp usertests.asm /^ bp = (Header*)ap - 1;$/;" d -bp wc.asm /^ bp = (Header*)ap - 1;$/;" d -bp zombie.asm /^ bp = (Header*)ap - 1;$/;" d bread bio.c /^bread(uint dev, uint blockno)$/;" f brelse bio.c /^brelse(struct buf *b)$/;" f bsstest usertests.c /^bsstest(void)$/;" f -buf bio.c /^ struct buf buf[NBUF];$/;" m struct:__anon1 typeref:struct:__anon1::buf file: +buf bio.c /^ struct buf buf[NBUF];$/;" m struct:__anon7 typeref:struct:__anon7::buf file: buf buf.h /^struct buf {$/;" s buf cat.c /^char buf[512];$/;" v -buf console.c /^ char buf[INPUT_BUF];$/;" m struct:__anon8 file: +buf console.c /^ char buf[INPUT_BUF];$/;" m struct:__anon6 file: buf grep.c /^char buf[1024];$/;" v -buf kernel.asm /^ buf = (char*)p;$/;" d buf usertests.c /^char buf[8192];$/;" v buf wc.c /^char buf[512];$/;" v bwrite bio.c /^bwrite(struct buf *b)$/;" f bzero fs.c /^bzero(int dev, int bno)$/;" f file: c cat.asm /^ c = fmt[i] & 0xff;$/;" d c echo.asm /^ c = fmt[i] & 0xff;$/;" d -c grep.asm /^ c = fmt[i] & 0xff;$/;" d -c init.asm /^ c = fmt[i] & 0xff;$/;" d -c initcode.asm /^ c: b8 07 00 00 00 mov $0x7,%eax$/;" l -c kernel.asm /^ c = (c == '\\r') ? '\\n' : c;$/;" d -c kernel.asm /^ c = fmt[++i] & 0xff;$/;" d -c kernel.asm /^ c = input.buf[input.r++ % INPUT_BUF];$/;" d -c kernel.asm /^ c = &cpus[cpuid()];$/;" d -c kernel.asm /^ c = charcode[shift & (CTL | SHIFT)][data];$/;" d -c kernel.asm /^ c = mycpu();$/;" d -c kill.asm /^ c = fmt[i] & 0xff;$/;" d -c ln.asm /^ c = fmt[i] & 0xff;$/;" d -c ls.asm /^ c = fmt[i] & 0xff;$/;" d -c mkdir.asm /^ c = fmt[i] & 0xff;$/;" d -c my_userapp.asm /^ c = fmt[i] & 0xff;$/;" d -c rm.asm /^ c = fmt[i] & 0xff;$/;" d -c sh.asm /^ c = fmt[i] & 0xff;$/;" d -c stressfs.asm /^ c = fmt[i] & 0xff;$/;" d -c stressfs.asm /^ c: ff 71 fc pushl -0x4(%ecx)$/;" l -c test_master.asm /^ c = fmt[i] & 0xff;$/;" d -c test_mlfq.asm /^ c = fmt[i] & 0xff;$/;" d -c test_sample.asm /^ c = fmt[i] & 0xff;$/;" d -c test_stride.asm /^ c = fmt[i] & 0xff;$/;" d -c usertests.asm /^ c = fmt[i] & 0xff;$/;" d -c usertests.asm /^ c = sbrk(-(sbrk(0) - oldbrk));$/;" d -c usertests.asm /^ c = sbrk(-4096);$/;" d -c usertests.asm /^ c = sbrk(0);$/;" d -c usertests.asm /^ c = sbrk(1);$/;" d -c usertests.asm /^ c = sbrk(4096);$/;" d -c wc.asm /^ c = fmt[i] & 0xff;$/;" d -c zombie.asm /^ c = fmt[i] & 0xff;$/;" d -c0 echo.asm /^ c0: 83 c2 01 add $0x1,%edx$/;" l -c0 forktest.asm /^ c0: e8 0b 01 00 00 call 1d0 $/;" l -c0 ls.asm /^ c0: 89 1c 24 mov %ebx,(%esp)$/;" l -c0 my_userapp.asm /^ c0: 83 c2 01 add $0x1,%edx$/;" l -c0 test_stride.asm /^ c0: 83 c1 01 add $0x1,%ecx$/;" l -c0 wc.asm /^ c0: 83 ec 04 sub $0x4,%esp$/;" l -c0 zombie.asm /^ c0: 83 c2 01 add $0x1,%edx$/;" l -c00 sh.asm /^ c00: 83 ec 04 sub $0x4,%esp$/;" l -c01 usertests.asm /^ c01: ff 75 e4 pushl -0x1c(%ebp)$/;" l -c03 sh.asm /^ c03: 6a 01 push $0x1$/;" l -c04 usertests.asm /^ c04: e8 b9 2c 00 00 call 38c2 $/;" l -c05 sh.asm /^ c05: 57 push %edi$/;" l -c06 sh.asm /^ c06: 6a 00 push $0x0$/;" l -c08 sh.asm /^ c08: e8 2d 01 00 00 call d3a $/;" l -c09 usertests.asm /^ c09: 83 c4 10 add $0x10,%esp$/;" l -c0c usertests.asm /^ c0c: 83 f8 01 cmp $0x1,%eax$/;" l -c0d sh.asm /^ c0d: 83 c4 10 add $0x10,%esp$/;" l -c0f usertests.asm /^ c0f: 74 12 je c23 $/;" l -c1 kill.asm /^ c1: 89 f1 mov %esi,%ecx$/;" l -c1 ln.asm /^ c1: 89 f1 mov %esi,%ecx$/;" l -c1 mkdir.asm /^ c1: 84 c0 test %al,%al$/;" l -c1 rm.asm /^ c1: 84 c0 test %al,%al$/;" l -c1 sh.asm /^ c1: e8 cc 0c 00 00 call d92 $/;" l -c1 test_master.asm /^ c1: 84 c0 test %al,%al$/;" l -c1 test_mlfq.asm /^ c1: 6a 01 push $0x1$/;" l -c1 test_sample.asm /^ c1: 50 push %eax$/;" l -c10 sh.asm /^ c10: 85 c0 test %eax,%eax$/;" l -c11 usertests.asm /^ c11: 83 ec 08 sub $0x8,%esp$/;" l -c12 sh.asm /^ c12: 7e 1d jle c31 $/;" l -c14 sh.asm /^ c14: 0f b6 45 e7 movzbl -0x19(%ebp),%eax$/;" l -c14 usertests.asm /^ c14: 68 de 40 00 00 push $0x40de$/;" l -c18 sh.asm /^ c18: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -c19 usertests.asm /^ c19: 6a 01 push $0x1$/;" l -c1b sh.asm /^ c1b: 89 de mov %ebx,%esi$/;" l -c1b usertests.asm /^ c1b: e8 00 2e 00 00 call 3a20 $/;" l -c1d sh.asm /^ c1d: 3c 0a cmp $0xa,%al$/;" l -c1f sh.asm /^ c1f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)$/;" l -c2 grep.asm /^ c2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -c2 stressfs.asm /^ c2: 83 eb 01 sub $0x1,%ebx$/;" l -c2 test_sample.asm /^ c2: 50 push %eax$/;" l -c20 usertests.asm /^ c20: 83 c4 10 add $0x10,%esp$/;" l -c23 sh.asm /^ c23: 74 1b je c40 $/;" l -c23 usertests.asm /^ c23: 83 ec 0c sub $0xc,%esp$/;" l -c25 sh.asm /^ c25: 3c 0d cmp $0xd,%al$/;" l -c26 usertests.asm /^ c26: ff 75 e4 pushl -0x1c(%ebp)$/;" l -c27 sh.asm /^ c27: 74 17 je c40 $/;" l -c29 sh.asm /^ c29: 8d 5e 01 lea 0x1(%esi),%ebx$/;" l -c29 usertests.asm /^ c29: e8 9c 2c 00 00 call 38ca $/;" l -c2c sh.asm /^ c2c: 3b 5d 0c cmp 0xc(%ebp),%ebx$/;" l -c2e usertests.asm /^ c2e: 83 c4 10 add $0x10,%esp$/;" l -c2f sh.asm /^ c2f: 7c cf jl c00 $/;" l -c3 echo.asm /^ c3: 0f b6 02 movzbl (%edx),%eax$/;" l -c3 init.asm /^ c3: e8 6a 02 00 00 call 332 $/;" l -c3 kill.asm /^ c3: 38 d8 cmp %bl,%al$/;" l -c3 ln.asm /^ c3: 38 d8 cmp %bl,%al$/;" l -c3 ls.asm /^ c3: 89 c6 mov %eax,%esi$/;" l -c3 mkdir.asm /^ c3: 75 1e jne e3 $/;" l -c3 my_userapp.asm /^ c3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)$/;" l -c3 rm.asm /^ c3: 75 1e jne e3 $/;" l -c3 test_master.asm /^ c3: 75 1e jne e3 $/;" l -c3 test_mlfq.asm /^ c3: e8 e8 03 00 00 call 4b0 $/;" l -c3 test_sample.asm /^ c3: 68 e4 07 00 00 push $0x7e4$/;" l -c3 test_stride.asm /^ c3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx$/;" l -c3 usertests.asm /^ c3: e8 48 09 00 00 call a10 $/;" l -c3 wc.asm /^ c3: 68 00 02 00 00 push $0x200$/;" l -c3 zombie.asm /^ c3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)$/;" l -c31 sh.asm /^ c31: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -c31 usertests.asm /^ c31: eb fe jmp c31 $/;" l -c33 usertests.asm /^ c33: 83 ec 0c sub $0xc,%esp$/;" l -c34 sh.asm /^ c34: c6 04 30 00 movb $0x0,(%eax,%esi,1)$/;" l -c36 usertests.asm /^ c36: ff 75 e4 pushl -0x1c(%ebp)$/;" l -c38 sh.asm /^ c38: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -c39 usertests.asm /^ c39: e8 8c 2c 00 00 call 38ca $/;" l -c3b sh.asm /^ c3b: 5b pop %ebx$/;" l -c3c sh.asm /^ c3c: 5e pop %esi$/;" l -c3d sh.asm /^ c3d: 5f pop %edi$/;" l -c3e sh.asm /^ c3e: 5d pop %ebp$/;" l -c3e usertests.asm /^ c3e: 83 c4 0c add $0xc,%esp$/;" l -c3f sh.asm /^ c3f: c3 ret $/;" l +c1 echo.asm /^ c1: 5b pop %ebx$/;" l +c2 echo.asm /^ c2: 5d pop %ebp$/;" l +c3 echo.asm /^ c3: c3 ret $/;" l c4 cat.asm /^ c4: 56 push %esi$/;" l -c40 sh.asm /^ c40: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -c41 usertests.asm /^ c41: 68 00 20 00 00 push $0x2000$/;" l -c43 sh.asm /^ c43: 89 de mov %ebx,%esi$/;" l -c45 sh.asm /^ c45: c6 04 30 00 movb $0x0,(%eax,%esi,1)$/;" l -c46 usertests.asm /^ c46: 68 c0 85 00 00 push $0x85c0$/;" l -c49 sh.asm /^ c49: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -c4b usertests.asm /^ c4b: ff 75 e0 pushl -0x20(%ebp)$/;" l -c4c sh.asm /^ c4c: 5b pop %ebx$/;" l -c4d sh.asm /^ c4d: 5e pop %esi$/;" l -c4e sh.asm /^ c4e: 5f pop %edi$/;" l -c4e usertests.asm /^ c4e: e8 67 2c 00 00 call 38ba $/;" l -c4f sh.asm /^ c4f: 5d pop %ebp$/;" l -c5 cat.asm /^ c5: e8 a0 02 00 00 call 36a $/;" l -c5 forktest.asm /^ c5: 83 c4 0c add $0xc,%esp$/;" l -c5 kill.asm /^ c5: 74 e9 je b0 $/;" l -c5 ln.asm /^ c5: 74 e9 je b0 $/;" l -c5 ls.asm /^ c5: bb 80 0d 00 00 mov $0xd80,%ebx$/;" l -c5 mkdir.asm /^ c5: eb 29 jmp f0 $/;" l -c5 rm.asm /^ c5: eb 29 jmp f0 $/;" l -c5 stressfs.asm /^ c5: 75 e9 jne b0 $/;" l -c5 test_master.asm /^ c5: eb 29 jmp f0 $/;" l -c50 sh.asm /^ c50: c3 ret $/;" l -c51 sh.asm /^ c51: eb 0d jmp c60 $/;" l -c53 sh.asm /^ c53: 90 nop$/;" l -c53 usertests.asm /^ c53: 83 c4 10 add $0x10,%esp$/;" l -c54 sh.asm /^ c54: 90 nop$/;" l -c55 sh.asm /^ c55: 90 nop$/;" l -c56 sh.asm /^ c56: 90 nop$/;" l -c56 usertests.asm /^ c56: 83 f8 01 cmp $0x1,%eax$/;" l -c57 sh.asm /^ c57: 90 nop$/;" l -c58 sh.asm /^ c58: 90 nop$/;" l -c59 sh.asm /^ c59: 90 nop$/;" l -c59 usertests.asm /^ c59: 74 1a je c75 $/;" l -c5a sh.asm /^ c5a: 90 nop$/;" l -c5b sh.asm /^ c5b: 90 nop$/;" l -c5b usertests.asm /^ c5b: 83 ec 08 sub $0x8,%esp$/;" l -c5c sh.asm /^ c5c: 90 nop$/;" l -c5d sh.asm /^ c5d: 90 nop$/;" l -c5e sh.asm /^ c5e: 90 nop$/;" l -c5e usertests.asm /^ c5e: 68 f2 40 00 00 push $0x40f2$/;" l -c5f sh.asm /^ c5f: 90 nop$/;" l -c6 echo.asm /^ c6: 8d 71 01 lea 0x1(%ecx),%esi$/;" l -c6 sh.asm /^ c6: 83 c4 10 add $0x10,%esp$/;" l -c60 sh.asm /^ c60: 55 push %ebp$/;" l -c61 sh.asm /^ c61: 89 e5 mov %esp,%ebp$/;" l -c63 sh.asm /^ c63: 56 push %esi$/;" l -c63 usertests.asm /^ c63: 6a 01 push $0x1$/;" l -c64 sh.asm /^ c64: 53 push %ebx$/;" l -c65 sh.asm /^ c65: 83 ec 08 sub $0x8,%esp$/;" l -c65 usertests.asm /^ c65: e8 b6 2d 00 00 call 3a20 $/;" l -c68 sh.asm /^ c68: 6a 00 push $0x0$/;" l -c6a sh.asm /^ c6a: ff 75 08 pushl 0x8(%ebp)$/;" l -c6a usertests.asm /^ c6a: 83 c4 10 add $0x10,%esp$/;" l -c6d sh.asm /^ c6d: e8 f0 00 00 00 call d62 $/;" l -c6d usertests.asm /^ c6d: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -c7 kill.asm /^ c7: 29 d8 sub %ebx,%eax$/;" l -c7 ln.asm /^ c7: 29 d8 sub %ebx,%eax$/;" l -c7 mkdir.asm /^ c7: 89 f6 mov %esi,%esi$/;" l -c7 my_userapp.asm /^ c7: 89 d0 mov %edx,%eax$/;" l -c7 rm.asm /^ c7: 89 f6 mov %esi,%esi$/;" l -c7 stressfs.asm /^ c7: 83 ec 0c sub $0xc,%esp$/;" l -c7 test_master.asm /^ c7: 89 f6 mov %esi,%esi$/;" l -c7 test_stride.asm /^ c7: 83 c2 01 add $0x1,%edx$/;" l -c7 zombie.asm /^ c7: 89 d0 mov %edx,%eax$/;" l -c70 usertests.asm /^ c70: 5b pop %ebx$/;" l -c71 usertests.asm /^ c71: 5e pop %esi$/;" l -c72 sh.asm /^ c72: 83 c4 10 add $0x10,%esp$/;" l -c72 usertests.asm /^ c72: 5f pop %edi$/;" l -c73 usertests.asm /^ c73: 5d pop %ebp$/;" l -c74 usertests.asm /^ c74: c3 ret $/;" l -c75 sh.asm /^ c75: 85 c0 test %eax,%eax$/;" l -c75 usertests.asm /^ c75: 83 ec 0c sub $0xc,%esp$/;" l -c77 sh.asm /^ c77: 78 27 js ca0 $/;" l -c78 usertests.asm /^ c78: ff 75 e0 pushl -0x20(%ebp)$/;" l -c79 sh.asm /^ c79: 83 ec 08 sub $0x8,%esp$/;" l -c7b usertests.asm /^ c7b: e8 4a 2c 00 00 call 38ca $/;" l -c7c sh.asm /^ c7c: ff 75 0c pushl 0xc(%ebp)$/;" l -c7f sh.asm /^ c7f: 89 c3 mov %eax,%ebx$/;" l -c8 forktest.asm /^ c8: 50 push %eax$/;" l -c8 grep.asm /^ c8: 83 ec 08 sub $0x8,%esp$/;" l -c8 init.asm /^ c8: 50 push %eax$/;" l -c8 test_mlfq.asm /^ c8: 83 c4 20 add $0x20,%esp$/;" l -c8 test_sample.asm /^ c8: 6a 01 push $0x1$/;" l -c8 usertests.asm /^ c8: e8 d3 0a 00 00 call ba0 $/;" l -c8 wc.asm /^ c8: 68 a0 0b 00 00 push $0xba0$/;" l -c80 usertests.asm /^ c80: 58 pop %eax$/;" l -c81 sh.asm /^ c81: 50 push %eax$/;" l -c81 usertests.asm /^ c81: 5a pop %edx$/;" l -c82 sh.asm /^ c82: e8 f3 00 00 00 call d7a $/;" l -c82 usertests.asm /^ c82: 68 05 41 00 00 push $0x4105$/;" l -c87 sh.asm /^ c87: 89 c6 mov %eax,%esi$/;" l -c87 usertests.asm /^ c87: 6a 01 push $0x1$/;" l -c89 sh.asm /^ c89: 89 1c 24 mov %ebx,(%esp)$/;" l -c89 usertests.asm /^ c89: e8 92 2d 00 00 call 3a20 $/;" l -c8c sh.asm /^ c8c: e8 b9 00 00 00 call d4a $/;" l -c8e usertests.asm /^ c8e: 89 3c 24 mov %edi,(%esp)$/;" l -c9 echo.asm /^ c9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l -c9 forktest.asm /^ c9: 68 96 04 00 00 push $0x496$/;" l -c9 init.asm /^ c9: 6a 01 push $0x1$/;" l -c9 kill.asm /^ c9: 5b pop %ebx$/;" l -c9 ln.asm /^ c9: 5b pop %ebx$/;" l -c9 mkdir.asm /^ c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -c9 my_userapp.asm /^ c9: 75 f5 jne c0 $/;" l -c9 rm.asm /^ c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -c9 sh.asm /^ c9: 85 c0 test %eax,%eax$/;" l -c9 test_master.asm /^ c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -c9 zombie.asm /^ c9: 75 f5 jne c0 $/;" l -c91 sh.asm /^ c91: 83 c4 10 add $0x10,%esp$/;" l -c91 usertests.asm /^ c91: e8 3c 2c 00 00 call 38d2 $/;" l -c94 sh.asm /^ c94: 89 f0 mov %esi,%eax$/;" l -c96 sh.asm /^ c96: 8d 65 f8 lea -0x8(%ebp),%esp$/;" l -c96 usertests.asm /^ c96: 89 34 24 mov %esi,(%esp)$/;" l -c99 sh.asm /^ c99: 5b pop %ebx$/;" l -c99 usertests.asm /^ c99: e8 34 2c 00 00 call 38d2 $/;" l -c9a sh.asm /^ c9a: 5e pop %esi$/;" l -c9b sh.asm /^ c9b: 5d pop %ebp$/;" l -c9c sh.asm /^ c9c: c3 ret $/;" l -c9d sh.asm /^ c9d: 8d 76 00 lea 0x0(%esi),%esi$/;" l -c9e usertests.asm /^ c9e: 89 1c 24 mov %ebx,(%esp)$/;" l +c4 echo.asm /^ c4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l +c5 cat.asm /^ c5: e8 d0 02 00 00 call 39a $/;" l ca cat.asm /^ ca: 83 c4 10 add $0x10,%esp$/;" l -ca kill.asm /^ ca: 5e pop %esi$/;" l -ca ln.asm /^ ca: 5e pop %esi$/;" l -ca ls.asm /^ ca: e8 f1 02 00 00 call 3c0 $/;" l -ca stressfs.asm /^ ca: 57 push %edi$/;" l -ca test_sample.asm /^ ca: e8 d1 03 00 00 call 4a0 $/;" l -ca test_stride.asm /^ ca: 84 db test %bl,%bl$/;" l -ca0 sh.asm /^ ca0: b8 ff ff ff ff mov $0xffffffff,%eax$/;" l -ca1 usertests.asm /^ ca1: e8 2c 2c 00 00 call 38d2 $/;" l -ca5 sh.asm /^ ca5: eb ef jmp c96 $/;" l -ca6 usertests.asm /^ ca6: 59 pop %ecx$/;" l -ca7 sh.asm /^ ca7: 89 f6 mov %esi,%esi$/;" l -ca7 usertests.asm /^ ca7: 5b pop %ebx$/;" l -ca8 usertests.asm /^ ca8: 68 0e 41 00 00 push $0x410e$/;" l -ca9 sh.asm /^ ca9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -cad usertests.asm /^ cad: 6a 01 push $0x1$/;" l -caf usertests.asm /^ caf: e8 6c 2d 00 00 call 3a20 $/;" l +ca echo.asm /^ ca: 8d bf 00 00 00 00 lea 0x0(%edi),%edi$/;" l cat cat.c /^cat(int fd)$/;" f -cb grep.asm /^ cb: 53 push %ebx$/;" l -cb init.asm /^ cb: 6a 01 push $0x1$/;" l -cb kill.asm /^ cb: 5d pop %ebp$/;" l -cb ln.asm /^ cb: 5d pop %ebp$/;" l -cb my_userapp.asm /^ cb: 5d pop %ebp$/;" l -cb sh.asm /^ cb: 79 9a jns 67 $/;" l -cb stressfs.asm /^ cb: e8 da 02 00 00 call 3aa $/;" l -cb test_mlfq.asm /^ cb: e8 62 02 00 00 call 332 $/;" l -cb zombie.asm /^ cb: 5d pop %ebp$/;" l -cb0 sh.asm /^ cb0: 55 push %ebp$/;" l -cb1 sh.asm /^ cb1: 89 e5 mov %esp,%ebp$/;" l -cb3 sh.asm /^ cb3: 53 push %ebx$/;" l -cb4 sh.asm /^ cb4: 8b 4d 08 mov 0x8(%ebp),%ecx$/;" l -cb4 usertests.asm /^ cb4: e8 f1 2b 00 00 call 38aa $/;" l -cb7 sh.asm /^ cb7: 0f be 11 movsbl (%ecx),%edx$/;" l -cb9 usertests.asm /^ cb9: e8 ec 2b 00 00 call 38aa $/;" l -cba sh.asm /^ cba: 8d 42 d0 lea -0x30(%edx),%eax$/;" l -cbd sh.asm /^ cbd: 3c 09 cmp $0x9,%al$/;" l -cbe usertests.asm /^ cbe: e8 e7 2b 00 00 call 38aa $/;" l -cbf sh.asm /^ cbf: b8 00 00 00 00 mov $0x0,%eax$/;" l cc cat.asm /^ cc = read(0, &c, 1);$/;" d cc echo.asm /^ cc = read(0, &c, 1);$/;" d -cc forktest.asm /^ cc = read(0, &c, 1);$/;" d -cc grep.asm /^ cc = read(0, &c, 1);$/;" d -cc grep.asm /^ cc: 57 push %edi$/;" l -cc init.asm /^ cc = read(0, &c, 1);$/;" d -cc kill.asm /^ cc = read(0, &c, 1);$/;" d -cc kill.asm /^ cc: c3 ret $/;" l -cc ln.asm /^ cc = read(0, &c, 1);$/;" d -cc ln.asm /^ cc: c3 ret $/;" l -cc ls.asm /^ cc = read(0, &c, 1);$/;" d -cc mkdir.asm /^ cc = read(0, &c, 1);$/;" d -cc my_userapp.asm /^ cc = read(0, &c, 1);$/;" d -cc my_userapp.asm /^ cc: c3 ret $/;" l -cc rm.asm /^ cc = read(0, &c, 1);$/;" d -cc sh.asm /^ cc = read(0, &c, 1);$/;" d -cc stressfs.asm /^ cc = read(0, &c, 1);$/;" d -cc test_master.asm /^ cc = read(0, &c, 1);$/;" d -cc test_mlfq.asm /^ cc = read(0, &c, 1);$/;" d -cc test_sample.asm /^ cc = read(0, &c, 1);$/;" d -cc test_stride.asm /^ cc = read(0, &c, 1);$/;" d -cc test_stride.asm /^ cc: 88 5a ff mov %bl,-0x1(%edx)$/;" l -cc usertests.asm /^ cc = sizeof(buf);$/;" d -cc usertests.asm /^ cc = cc * 2;$/;" d -cc usertests.asm /^ cc = 1;$/;" d -cc usertests.asm /^ cc = read(0, &c, 1);$/;" d -cc usertests.asm /^ cc = read(fd, buf, 300);$/;" d -cc usertests.asm /^ cc = read(fd, buf, sizeof(buf));$/;" d -cc wc.asm /^ cc = read(0, &c, 1);$/;" d -cc zombie.asm /^ cc = read(0, &c, 1);$/;" d -cc zombie.asm /^ cc: c3 ret $/;" l -cc3 usertests.asm /^ cc3: 5e pop %esi$/;" l -cc4 sh.asm /^ cc4: 77 1f ja ce5 $/;" l -cc4 usertests.asm /^ cc4: 5f pop %edi$/;" l -cc5 usertests.asm /^ cc5: 68 17 41 00 00 push $0x4117$/;" l -cc6 sh.asm /^ cc6: 8d 76 00 lea 0x0(%esi),%esi$/;" l -cc9 sh.asm /^ cc9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -cca usertests.asm /^ cca: 6a 01 push $0x1$/;" l -ccc usertests.asm /^ ccc: e8 4f 2d 00 00 call 3a20 $/;" l cd cat.asm /^ cd: 83 f8 00 cmp $0x0,%eax$/;" l -cd echo.asm /^ cd: 84 c0 test %al,%al$/;" l -cd grep.asm /^ cd: e8 3e 00 00 00 call 110 $/;" l -cd init.asm /^ cd: 68 d0 07 00 00 push $0x7d0$/;" l -cd kill.asm /^ cd: 8d 76 00 lea 0x0(%esi),%esi$/;" l -cd ln.asm /^ cd: 8d 76 00 lea 0x0(%esi),%esi$/;" l -cd my_userapp.asm /^ cd: 31 c0 xor %eax,%eax$/;" l -cd sh.asm /^ cd: 50 push %eax$/;" l -cd usertests.asm /^ cd: e8 0e 0c 00 00 call ce0 $/;" l -cd wc.asm /^ cd: ff 75 08 pushl 0x8(%ebp)$/;" l -cd zombie.asm /^ cd: 31 c0 xor %eax,%eax$/;" l -cd0 sh.asm /^ cd0: 8d 04 80 lea (%eax,%eax,4),%eax$/;" l -cd1 usertests.asm /^ cd1: 83 c4 10 add $0x10,%esp$/;" l -cd3 sh.asm /^ cd3: 83 c1 01 add $0x1,%ecx$/;" l -cd4 usertests.asm /^ cd4: eb 97 jmp c6d $/;" l -cd6 sh.asm /^ cd6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax$/;" l -cd6 usertests.asm /^ cd6: 8d 76 00 lea 0x0(%esi),%esi$/;" l -cd9 usertests.asm /^ cd9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -cda sh.asm /^ cda: 0f be 11 movsbl (%ecx),%edx$/;" l -cdd sh.asm /^ cdd: 8d 5a d0 lea -0x30(%edx),%ebx$/;" l -ce forktest.asm /^ ce: 6a 01 push $0x1$/;" l -ce sh.asm /^ ce: 68 83 18 00 00 push $0x1883$/;" l -ce0 sh.asm /^ ce0: 80 fb 09 cmp $0x9,%bl$/;" l -ce0 usertests.asm /^ ce0: 55 push %ebp$/;" l -ce1 usertests.asm /^ ce1: 89 e5 mov %esp,%ebp$/;" l -ce3 sh.asm /^ ce3: 76 eb jbe cd0 $/;" l -ce3 usertests.asm /^ ce3: 56 push %esi$/;" l -ce4 usertests.asm /^ ce4: be 64 00 00 00 mov $0x64,%esi$/;" l -ce5 sh.asm /^ ce5: 5b pop %ebx$/;" l -ce6 sh.asm /^ ce6: 5d pop %ebp$/;" l -ce7 sh.asm /^ ce7: c3 ret $/;" l -ce8 sh.asm /^ ce8: 90 nop$/;" l -ce9 sh.asm /^ ce9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -ce9 usertests.asm /^ ce9: 53 push %ebx$/;" l -cea usertests.asm /^ cea: eb 14 jmp d00 $/;" l -cec usertests.asm /^ cec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -cf echo.asm /^ cf: 74 0f je e0 $/;" l -cf ls.asm /^ cf: ba 0e 00 00 00 mov $0xe,%edx$/;" l -cf my_userapp.asm /^ cf: 5d pop %ebp$/;" l -cf test_sample.asm /^ cf: e8 4e 02 00 00 call 322 $/;" l -cf test_stride.asm /^ cf: 75 ef jne c0 $/;" l -cf zombie.asm /^ cf: 5d pop %ebp$/;" l -cf0 sh.asm /^ cf0: 55 push %ebp$/;" l -cf0 usertests.asm /^ cf0: 74 6f je d61 $/;" l -cf1 sh.asm /^ cf1: 89 e5 mov %esp,%ebp$/;" l -cf2 usertests.asm /^ cf2: e8 b3 2b 00 00 call 38aa $/;" l -cf3 sh.asm /^ cf3: 56 push %esi$/;" l -cf4 sh.asm /^ cf4: 53 push %ebx$/;" l -cf5 sh.asm /^ cf5: 8b 5d 10 mov 0x10(%ebp),%ebx$/;" l -cf7 usertests.asm /^ cf7: 39 c3 cmp %eax,%ebx$/;" l -cf8 sh.asm /^ cf8: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -cf9 usertests.asm /^ cf9: 75 2d jne d28 $/;" l -cfb sh.asm /^ cfb: 8b 75 0c mov 0xc(%ebp),%esi$/;" l -cfb usertests.asm /^ cfb: 83 ee 01 sub $0x1,%esi$/;" l -cfe sh.asm /^ cfe: 85 db test %ebx,%ebx$/;" l -cfe usertests.asm /^ cfe: 74 48 je d48 $/;" l cgaputc console.c /^cgaputc(int c)$/;" f file: chan proc.h /^ void *chan; \/\/ If non-zero, sleeping on chan$/;" m struct:proc char cat.asm /^char buf[512];$/;" l -char grep.asm /^char buf[1024];$/;" l -char init.asm /^char *argv[] = { "sh", 0 };$/;" l -char sh.asm /^char symbols[] = "<|>&;()";$/;" l -char sh.asm /^char whitespace[] = " \\t\\r\\n\\v";$/;" l -char usertests.asm /^char uninit[10000];$/;" l -char wc.asm /^char buf[512];$/;" l checksum mp.h /^ uchar checksum; \/\/ all bytes must add up to 0$/;" m struct:mp checksum mp.h /^ uchar checksum; \/\/ all bytes must add up to 0$/;" m struct:mpconf child_argv test_master.c /^char *child_argv[CNT_CHILD][3] = {$/;" v child_argv test_sample.c /^char *child_argv[CNT_TEST][CNT_CHILD][3] = {$/;" v clearpteu vm.c /^clearpteu(pde_t *pgdir, char *uva)$/;" f cli x86.h /^cli(void)$/;" f -cmd sh.asm /^ cmd = redircmd(cmd, q, eq, O_RDONLY, 0);$/;" d -cmd sh.asm /^ cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1);$/;" d -cmd sh.asm /^ cmd = backcmd(cmd);$/;" d -cmd sh.asm /^ cmd = listcmd(cmd, parseline(ps, es));$/;" d -cmd sh.asm /^ cmd = pipecmd(cmd, parsepipe(ps, es));$/;" d -cmd sh.asm /^ cmd = (struct execcmd*)ret;$/;" d -cmd sh.asm /^ cmd = malloc(sizeof(*cmd));$/;" d -cmd sh.asm /^ cmd = parseexec(ps, es);$/;" d -cmd sh.asm /^ cmd = parseline(&s, es);$/;" d -cmd sh.asm /^ cmd = parseline(ps, es);$/;" d -cmd sh.asm /^ cmd = parsepipe(ps, es);$/;" d -cmd sh.asm /^ cmd = parseredirs(cmd, ps, es);$/;" d +clone proc.c /^clone(thread_t *thread, void *(*start_routine)(void *), void *arg, void* stack)$/;" f cmd sh.c /^ struct cmd *cmd;$/;" m struct:backcmd typeref:struct:backcmd::cmd file: cmd sh.c /^ struct cmd *cmd;$/;" m struct:redircmd typeref:struct:redircmd::cmd file: cmd sh.c /^struct cmd {$/;" s file: cmos_read lapic.c /^static uint cmos_read(uint reg)$/;" f file: cmostime lapic.c /^void cmostime(struct rtcdate *r)$/;" f -code kernel.asm /^ code = P2V(0x7000);$/;" d commit log.c /^commit()$/;" f file: committing log.c /^ int committing; \/\/ in commit(), please wait.$/;" m struct:log file: concreate usertests.c /^concreate(void)$/;" f -conf kernel.asm /^ conf = (struct mpconf*) P2V((uint) mp->physaddr);$/;" d -cons console.c /^} cons;$/;" v typeref:struct:__anon7 file: +cons console.c /^} cons;$/;" v typeref:struct:__anon5 file: consoleinit console.c /^consoleinit(void)$/;" f consoleintr console.c /^consoleintr(int (*getc)(void))$/;" f consoleread console.c /^consoleread(struct inode *ip, char *dst, int n)$/;" f @@ -1596,7 +499,6 @@ copyuvm vm.c /^copyuvm(pde_t *pgdir, uint sz)$/;" f cprintf console.c /^cprintf(char *fmt, ...)$/;" f cpu proc.h /^struct cpu {$/;" s cpu spinlock.h /^ struct cpu *cpu; \/\/ The cpu holding the lock.$/;" m struct:spinlock typeref:struct:spinlock::cpu -cpu_share test_stride.asm /^ cpu_share = atoi(argv[1]);$/;" d cpuid proc.c /^cpuid() {$/;" f cpus mp.c /^struct cpu cpus[NCPU];$/;" v typeref:struct:cpu cr3 mmu.h /^ void *cr3; \/\/ Page directory base$/;" m struct:taskstate @@ -1608,790 +510,97 @@ cs mmu.h /^ uint cs : 16; \/\/ code segment selector$/;" m struct:gated cs mmu.h /^ ushort cs;$/;" m struct:taskstate cs x86.h /^ ushort cs;$/;" m struct:trapframe ctlmap kbd.h /^static uchar ctlmap[256] =$/;" v -curr_mlfq_level test_mlfq.asm /^ curr_mlfq_level = getlev();$/;" d -curr_tick test_stride.asm /^ curr_tick = uptime();$/;" d cwd proc.h /^ struct inode *cwd; \/\/ Current directory$/;" m struct:proc typeref:struct:proc::inode d cat.asm /^ d: 57 push %edi$/;" l d echo.asm /^ d: 57 push %edi$/;" l -d forktest.asm /^ d: 51 push %ecx$/;" l -d grep.asm /^ d: 57 push %edi$/;" l -d init.asm /^ d: 53 push %ebx$/;" l -d kernel.asm /^ d = dst;$/;" d -d kill.asm /^ d: 57 push %edi$/;" l -d ln.asm /^ d: 55 push %ebp$/;" l -d ls.asm /^ d: 57 push %edi$/;" l -d mkdir.asm /^ d: 57 push %edi$/;" l -d my_userapp.asm /^ d: 51 push %ecx$/;" l -d rm.asm /^ d: 57 push %edi$/;" l -d sh.asm /^ d: 51 push %ecx$/;" l -d test_master.asm /^ d: 53 push %ebx$/;" l -d test_mlfq.asm /^ d: 57 push %edi$/;" l -d test_sample.asm /^ d: 57 push %edi$/;" l -d test_stride.asm /^ d: 57 push %edi$/;" l -d usertests.asm /^ d: 51 push %ecx$/;" l -d wc.asm /^ d: 57 push %edi$/;" l -d zombie.asm /^ d: 51 push %ecx$/;" l d0 cat.asm /^ d0: 89 c3 mov %eax,%ebx$/;" l -d0 forktest.asm /^ d0: e8 dd 02 00 00 call 3b2 $/;" l -d0 kill.asm /^ d0: 31 c0 xor %eax,%eax$/;" l -d0 ln.asm /^ d0: 31 c0 xor %eax,%eax$/;" l -d0 mkdir.asm /^ d0: 83 c2 01 add $0x1,%edx$/;" l -d0 my_userapp.asm /^ d0: c3 ret $/;" l -d0 rm.asm /^ d0: 83 c2 01 add $0x1,%edx$/;" l -d0 stressfs.asm /^ d0: 58 pop %eax$/;" l -d0 test_master.asm /^ d0: 83 c2 01 add $0x1,%edx$/;" l -d0 test_mlfq.asm /^ d0: 50 push %eax$/;" l -d0 wc.asm /^ d0: e8 05 03 00 00 call 3da $/;" l -d0 zombie.asm /^ d0: c3 ret $/;" l -d00 sh.asm /^ d00: 7e 14 jle d16 $/;" l -d00 usertests.asm /^ d00: e8 95 2b 00 00 call 389a $/;" l -d02 sh.asm /^ d02: 31 d2 xor %edx,%edx$/;" l -d04 sh.asm /^ d04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -d05 usertests.asm /^ d05: 85 c0 test %eax,%eax$/;" l -d07 usertests.asm /^ d07: 89 c3 mov %eax,%ebx$/;" l -d08 sh.asm /^ d08: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx$/;" l -d09 usertests.asm /^ d09: 79 e5 jns cf0 $/;" l -d0b usertests.asm /^ d0b: 83 ec 08 sub $0x8,%esp$/;" l -d0c sh.asm /^ d0c: 88 0c 10 mov %cl,(%eax,%edx,1)$/;" l -d0e usertests.asm /^ d0e: 68 81 4c 00 00 push $0x4c81$/;" l -d0f sh.asm /^ d0f: 83 c2 01 add $0x1,%edx$/;" l -d1 echo.asm /^ d1: 89 f1 mov %esi,%ecx$/;" l -d1 my_userapp.asm /^ d1: eb 0d jmp e0 $/;" l -d1 stressfs.asm /^ d1: 5a pop %edx$/;" l -d1 test_mlfq.asm /^ d1: 50 push %eax$/;" l -d1 test_stride.asm /^ d1: 5b pop %ebx$/;" l -d1 zombie.asm /^ d1: eb 0d jmp e0 $/;" l -d12 sh.asm /^ d12: 39 da cmp %ebx,%edx$/;" l -d13 usertests.asm /^ d13: 6a 01 push $0x1$/;" l -d14 sh.asm /^ d14: 75 f2 jne d08 $/;" l -d15 usertests.asm /^ d15: e8 06 2d 00 00 call 3a20 $/;" l -d16 sh.asm /^ d16: 5b pop %ebx$/;" l -d17 sh.asm /^ d17: 5e pop %esi$/;" l -d18 sh.asm /^ d18: 5d pop %ebp$/;" l -d19 sh.asm /^ d19: c3 ret $/;" l -d1a sh.asm /^ d1a: b8 01 00 00 00 mov $0x1,%eax$/;" l -d1a usertests.asm /^ d1a: 83 c4 10 add $0x10,%esp$/;" l -d1d usertests.asm /^ d1d: 8d 65 f8 lea -0x8(%ebp),%esp$/;" l -d1f sh.asm /^ d1f: cd 40 int $0x40$/;" l +d0 echo.asm /^ d0: 55 push %ebp$/;" l +d1 echo.asm /^ d1: 89 e5 mov %esp,%ebp$/;" l d2 cat.asm /^ d2: 7f cc jg a0 $/;" l -d2 grep.asm /^ d2: 83 c4 10 add $0x10,%esp$/;" l -d2 init.asm /^ d2: e8 a3 02 00 00 call 37a $/;" l -d2 kill.asm /^ d2: 29 d8 sub %ebx,%eax$/;" l -d2 ln.asm /^ d2: 29 d8 sub %ebx,%eax$/;" l -d2 stressfs.asm /^ d2: 68 3d 08 00 00 push $0x83d$/;" l -d2 test_mlfq.asm /^ d2: 68 e0 07 00 00 push $0x7e0$/;" l -d2 test_stride.asm /^ d2: 5d pop %ebp$/;" l -d2 usertests.asm /^ d2: e8 e9 26 00 00 call 27c0 $/;" l -d20 usertests.asm /^ d20: 5b pop %ebx$/;" l -d21 sh.asm /^ d21: c3 ret $/;" l -d21 usertests.asm /^ d21: 5e pop %esi$/;" l -d22 sh.asm /^ d22: b8 02 00 00 00 mov $0x2,%eax$/;" l -d22 usertests.asm /^ d22: 5d pop %ebp$/;" l -d23 usertests.asm /^ d23: c3 ret $/;" l -d24 usertests.asm /^ d24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -d27 sh.asm /^ d27: cd 40 int $0x40$/;" l -d28 usertests.asm /^ d28: 83 ec 08 sub $0x8,%esp$/;" l -d29 sh.asm /^ d29: c3 ret $/;" l -d2a sh.asm /^ d2a: b8 03 00 00 00 mov $0x3,%eax$/;" l -d2b usertests.asm /^ d2b: 68 23 41 00 00 push $0x4123$/;" l -d2f sh.asm /^ d2f: cd 40 int $0x40$/;" l -d3 echo.asm /^ d3: 38 d8 cmp %bl,%al$/;" l -d3 mkdir.asm /^ d3: 0f b6 02 movzbl (%edx),%eax$/;" l -d3 my_userapp.asm /^ d3: 90 nop$/;" l -d3 rm.asm /^ d3: 0f b6 02 movzbl (%edx),%eax$/;" l -d3 sh.asm /^ d3: 68 69 12 00 00 push $0x1269$/;" l -d3 test_master.asm /^ d3: 0f b6 02 movzbl (%edx),%eax$/;" l -d3 test_stride.asm /^ d3: c3 ret $/;" l -d3 zombie.asm /^ d3: 90 nop$/;" l -d30 usertests.asm /^ d30: 6a 01 push $0x1$/;" l -d31 sh.asm /^ d31: c3 ret $/;" l -d32 sh.asm /^ d32: b8 04 00 00 00 mov $0x4,%eax$/;" l -d32 usertests.asm /^ d32: e8 e9 2c 00 00 call 3a20 $/;" l -d37 sh.asm /^ d37: cd 40 int $0x40$/;" l -d37 usertests.asm /^ d37: 83 c4 10 add $0x10,%esp$/;" l -d39 sh.asm /^ d39: c3 ret $/;" l -d3a sh.asm /^ d3a: b8 05 00 00 00 mov $0x5,%eax$/;" l -d3a usertests.asm /^ d3a: 8d 65 f8 lea -0x8(%ebp),%esp$/;" l -d3d usertests.asm /^ d3d: 5b pop %ebx$/;" l -d3e usertests.asm /^ d3e: 5e pop %esi$/;" l -d3f sh.asm /^ d3f: cd 40 int $0x40$/;" l -d3f usertests.asm /^ d3f: 5d pop %ebp$/;" l +d3 echo.asm /^ d3: 56 push %esi$/;" l d4 cat.asm /^ d4: 75 1b jne f1 $/;" l -d4 kill.asm /^ d4: 5b pop %ebx$/;" l -d4 ln.asm /^ d4: 5b pop %ebx$/;" l -d4 ls.asm /^ d4: 83 c4 0c add $0xc,%esp$/;" l -d4 my_userapp.asm /^ d4: 90 nop$/;" l -d4 test_sample.asm /^ d4: 85 db test %ebx,%ebx$/;" l -d4 test_stride.asm /^ d4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -d4 zombie.asm /^ d4: 90 nop$/;" l -d40 usertests.asm /^ d40: c3 ret $/;" l -d41 sh.asm /^ d41: c3 ret $/;" l -d41 usertests.asm /^ d41: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -d42 sh.asm /^ d42: b8 10 00 00 00 mov $0x10,%eax$/;" l -d47 sh.asm /^ d47: cd 40 int $0x40$/;" l -d48 usertests.asm /^ d48: 83 ec 08 sub $0x8,%esp$/;" l -d49 sh.asm /^ d49: c3 ret $/;" l -d4a sh.asm /^ d4a: b8 15 00 00 00 mov $0x15,%eax$/;" l -d4b usertests.asm /^ d4b: 68 33 41 00 00 push $0x4133$/;" l -d4f sh.asm /^ d4f: cd 40 int $0x40$/;" l -d5 echo.asm /^ d5: 74 e9 je c0 $/;" l -d5 forktest.asm /^ d5: 8b 5d fc mov -0x4(%ebp),%ebx$/;" l -d5 grep.asm /^ d5: 85 c0 test %eax,%eax$/;" l -d5 kill.asm /^ d5: 5e pop %esi$/;" l -d5 ln.asm /^ d5: 5e pop %esi$/;" l -d5 my_userapp.asm /^ d5: 90 nop$/;" l -d5 wc.asm /^ d5: 83 c4 10 add $0x10,%esp$/;" l -d5 zombie.asm /^ d5: 90 nop$/;" l -d50 usertests.asm /^ d50: 6a 01 push $0x1$/;" l -d51 sh.asm /^ d51: c3 ret $/;" l -d52 sh.asm /^ d52: b8 06 00 00 00 mov $0x6,%eax$/;" l -d52 usertests.asm /^ d52: e8 c9 2c 00 00 call 3a20 $/;" l -d57 sh.asm /^ d57: cd 40 int $0x40$/;" l -d57 usertests.asm /^ d57: 83 c4 10 add $0x10,%esp$/;" l -d59 sh.asm /^ d59: c3 ret $/;" l -d5a sh.asm /^ d5a: b8 07 00 00 00 mov $0x7,%eax$/;" l -d5a usertests.asm /^ d5a: 8d 65 f8 lea -0x8(%ebp),%esp$/;" l -d5d usertests.asm /^ d5d: 5b pop %ebx$/;" l -d5e usertests.asm /^ d5e: 5e pop %esi$/;" l -d5f sh.asm /^ d5f: cd 40 int $0x40$/;" l -d5f usertests.asm /^ d5f: 5d pop %ebp$/;" l +d4 echo.asm /^ d4: 53 push %ebx$/;" l +d5 echo.asm /^ d5: 8b 55 08 mov 0x8(%ebp),%edx$/;" l d6 cat.asm /^ d6: 8d 65 f8 lea -0x8(%ebp),%esp$/;" l -d6 kill.asm /^ d6: 5d pop %ebp$/;" l -d6 ln.asm /^ d6: 5d pop %ebp$/;" l -d6 mkdir.asm /^ d6: 8d 71 01 lea 0x1(%ecx),%esi$/;" l -d6 my_userapp.asm /^ d6: 90 nop$/;" l -d6 rm.asm /^ d6: 8d 71 01 lea 0x1(%ecx),%esi$/;" l -d6 test_master.asm /^ d6: 8d 71 01 lea 0x1(%ecx),%esi$/;" l -d6 test_sample.asm /^ d6: 0f 85 75 ff ff ff jne 51 $/;" l -d6 zombie.asm /^ d6: 90 nop$/;" l -d60 usertests.asm /^ d60: c3 ret $/;" l -d61 sh.asm /^ d61: c3 ret $/;" l -d61 usertests.asm /^ d61: e8 3c 2b 00 00 call 38a2 $/;" l -d62 sh.asm /^ d62: b8 0f 00 00 00 mov $0xf,%eax$/;" l -d66 usertests.asm /^ d66: 8d 76 00 lea 0x0(%esi),%esi$/;" l -d67 sh.asm /^ d67: cd 40 int $0x40$/;" l -d69 sh.asm /^ d69: c3 ret $/;" l -d69 usertests.asm /^ d69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -d6a sh.asm /^ d6a: b8 11 00 00 00 mov $0x11,%eax$/;" l -d6f sh.asm /^ d6f: cd 40 int $0x40$/;" l -d7 echo.asm /^ d7: 29 d8 sub %ebx,%eax$/;" l -d7 grep.asm /^ d7: 75 1f jne f8 $/;" l -d7 init.asm /^ d7: 58 pop %eax$/;" l -d7 kill.asm /^ d7: c3 ret $/;" l -d7 ln.asm /^ d7: c3 ret $/;" l -d7 ls.asm /^ d7: 05 80 0d 00 00 add $0xd80,%eax$/;" l -d7 my_userapp.asm /^ d7: 90 nop$/;" l -d7 stressfs.asm /^ d7: 6a 01 push $0x1$/;" l -d7 test_mlfq.asm /^ d7: 6a 01 push $0x1$/;" l -d7 usertests.asm /^ d7: e8 a4 25 00 00 call 2680 $/;" l -d7 zombie.asm /^ d7: 90 nop$/;" l -d70 usertests.asm /^ d70: 55 push %ebp$/;" l -d71 sh.asm /^ d71: c3 ret $/;" l -d71 usertests.asm /^ d71: 89 e5 mov %esp,%ebp$/;" l -d72 sh.asm /^ d72: b8 12 00 00 00 mov $0x12,%eax$/;" l -d73 usertests.asm /^ d73: 57 push %edi$/;" l -d74 usertests.asm /^ d74: 56 push %esi$/;" l -d75 usertests.asm /^ d75: 53 push %ebx$/;" l -d76 usertests.asm /^ d76: 83 ec 14 sub $0x14,%esp$/;" l -d77 sh.asm /^ d77: cd 40 int $0x40$/;" l -d79 sh.asm /^ d79: c3 ret $/;" l -d79 usertests.asm /^ d79: 68 40 41 00 00 push $0x4140$/;" l -d7a sh.asm /^ d7a: b8 08 00 00 00 mov $0x8,%eax$/;" l -d7e usertests.asm /^ d7e: 6a 01 push $0x1$/;" l -d7f sh.asm /^ d7f: cd 40 int $0x40$/;" l -d8 forktest.asm /^ d8: c9 leave $/;" l -d8 init.asm /^ d8: 5a pop %edx$/;" l -d8 kill.asm /^ d8: 90 nop$/;" l -d8 ln.asm /^ d8: 90 nop$/;" l -d8 my_userapp.asm /^ d8: 90 nop$/;" l -d8 sh.asm /^ d8: 6a 02 push $0x2$/;" l -d8 wc.asm /^ d8: 83 f8 00 cmp $0x0,%eax$/;" l -d8 zombie.asm /^ d8: 90 nop$/;" l -d80 usertests.asm /^ d80: e8 9b 2c 00 00 call 3a20 $/;" l -d81 sh.asm /^ d81: c3 ret $/;" l -d82 sh.asm /^ d82: b8 13 00 00 00 mov $0x13,%eax$/;" l -d85 usertests.asm /^ d85: e8 98 2b 00 00 call 3922 $/;" l -d87 sh.asm /^ d87: cd 40 int $0x40$/;" l -d89 sh.asm /^ d89: c3 ret $/;" l -d8a sh.asm /^ d8a: b8 14 00 00 00 mov $0x14,%eax$/;" l -d8a usertests.asm /^ d8a: 89 c6 mov %eax,%esi$/;" l -d8c usertests.asm /^ d8c: e8 09 2b 00 00 call 389a $/;" l -d8f sh.asm /^ d8f: cd 40 int $0x40$/;" l +d8 echo.asm /^ d8: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l d9 cat.asm /^ d9: 5b pop %ebx$/;" l -d9 echo.asm /^ d9: 5b pop %ebx$/;" l -d9 forktest.asm /^ d9: c3 ret $/;" l -d9 grep.asm /^ d9: 0f be 13 movsbl (%ebx),%edx$/;" l -d9 init.asm /^ d9: 6a 02 push $0x2$/;" l -d9 kill.asm /^ d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -d9 ln.asm /^ d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -d9 mkdir.asm /^ d9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l -d9 my_userapp.asm /^ d9: 90 nop$/;" l -d9 rm.asm /^ d9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l -d9 stressfs.asm /^ d9: e8 22 04 00 00 call 500 $/;" l -d9 test_master.asm /^ d9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l -d9 test_mlfq.asm /^ d9: e8 d2 03 00 00 call 4b0 $/;" l -d9 zombie.asm /^ d9: 90 nop$/;" l -d91 sh.asm /^ d91: c3 ret $/;" l -d91 usertests.asm /^ d91: 83 c4 10 add $0x10,%esp$/;" l -d92 sh.asm /^ d92: b8 09 00 00 00 mov $0x9,%eax$/;" l -d94 usertests.asm /^ d94: 85 c0 test %eax,%eax$/;" l -d96 usertests.asm /^ d96: 75 70 jne e08 $/;" l -d97 sh.asm /^ d97: cd 40 int $0x40$/;" l -d98 usertests.asm /^ d98: 31 db xor %ebx,%ebx$/;" l -d99 sh.asm /^ d99: c3 ret $/;" l -d9a sh.asm /^ d9a: b8 0a 00 00 00 mov $0xa,%eax$/;" l -d9a usertests.asm /^ d9a: eb 08 jmp da4 $/;" l -d9c usertests.asm /^ d9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -d9f sh.asm /^ d9f: cd 40 int $0x40$/;" l da cat.asm /^ da: 5e pop %esi$/;" l -da echo.asm /^ da: 5e pop %esi$/;" l -da forktest.asm /^ da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -da my_userapp.asm /^ da: 90 nop$/;" l -da sh.asm /^ da: e8 c1 0d 00 00 call ea0 $/;" l -da test_stride.asm /^ da: 8d bf 00 00 00 00 lea 0x0(%edi),%edi$/;" l -da zombie.asm /^ da: 90 nop$/;" l -da0 usertests.asm /^ da0: 89 18 mov %ebx,(%eax)$/;" l -da1 sh.asm /^ da1: c3 ret $/;" l -da2 sh.asm /^ da2: b8 0b 00 00 00 mov $0xb,%eax$/;" l -da2 usertests.asm /^ da2: 89 c3 mov %eax,%ebx$/;" l -da4 usertests.asm /^ da4: 83 ec 0c sub $0xc,%esp$/;" l -da7 sh.asm /^ da7: cd 40 int $0x40$/;" l -da7 usertests.asm /^ da7: 68 11 27 00 00 push $0x2711$/;" l -da9 sh.asm /^ da9: c3 ret $/;" l -daa sh.asm /^ daa: b8 0c 00 00 00 mov $0xc,%eax$/;" l -dac usertests.asm /^ dac: e8 9f 2e 00 00 call 3c50 $/;" l -daf sh.asm /^ daf: cd 40 int $0x40$/;" l data buf.h /^ uchar data[BSIZE];$/;" m struct:buf data ioapic.c /^ uint data;$/;" m struct:ioapic file: -data kernel.asm /^ data = (shift & E0ESC ? data : data & 0x7F);$/;" d -data kernel.asm /^ data = inb(KBDATAP);$/;" d data pipe.c /^ char data[PIPESIZE];$/;" m struct:pipe file: day date.h /^ uint day;$/;" m struct:rtcdate db cat.asm /^ db: 5d pop %ebp$/;" l -db echo.asm /^ db: 5d pop %ebp$/;" l -db init.asm /^ db: 68 d0 07 00 00 push $0x7d0$/;" l +db echo.asm /^ db: 0f b6 02 movzbl (%edx),%eax$/;" l db mmu.h /^ uint db : 1; \/\/ 0 = 16-bit segment, 1 = 32-bit segment$/;" m struct:segdesc -db my_userapp.asm /^ db: 90 nop$/;" l -db wc.asm /^ db: 89 45 e4 mov %eax,-0x1c(%ebp)$/;" l -db zombie.asm /^ db: 90 nop$/;" l -db1 sh.asm /^ db1: c3 ret $/;" l -db1 usertests.asm /^ db1: 83 c4 10 add $0x10,%esp$/;" l -db2 sh.asm /^ db2: b8 0d 00 00 00 mov $0xd,%eax$/;" l -db4 usertests.asm /^ db4: 85 c0 test %eax,%eax$/;" l -db6 usertests.asm /^ db6: 75 e8 jne da0 $/;" l -db7 sh.asm /^ db7: cd 40 int $0x40$/;" l -db8 usertests.asm /^ db8: 85 db test %ebx,%ebx$/;" l -db9 sh.asm /^ db9: c3 ret $/;" l -dba sh.asm /^ dba: b8 0e 00 00 00 mov $0xe,%eax$/;" l -dba usertests.asm /^ dba: 74 18 je dd4 $/;" l -dbc usertests.asm /^ dbc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -dbf sh.asm /^ dbf: cd 40 int $0x40$/;" l dc cat.asm /^ dc: c3 ret $/;" l -dc echo.asm /^ dc: c3 ret $/;" l -dc grep.asm /^ dc: 84 d2 test %dl,%dl$/;" l -dc ls.asm /^ dc: 29 f2 sub %esi,%edx$/;" l -dc my_userapp.asm /^ dc: 90 nop$/;" l -dc test_sample.asm /^ dc: eb 86 jmp 64 $/;" l -dc usertests.asm /^ dc: e8 cf 23 00 00 call 24b0 $/;" l -dc zombie.asm /^ dc: 90 nop$/;" l -dc0 usertests.asm /^ dc0: 8b 3b mov (%ebx),%edi$/;" l -dc1 sh.asm /^ dc1: c3 ret $/;" l -dc2 sh.asm /^ dc2: b8 16 00 00 00 mov $0x16,%eax$/;" l -dc2 usertests.asm /^ dc2: 83 ec 0c sub $0xc,%esp$/;" l -dc5 usertests.asm /^ dc5: 53 push %ebx$/;" l -dc6 usertests.asm /^ dc6: 89 fb mov %edi,%ebx$/;" l -dc7 sh.asm /^ dc7: cd 40 int $0x40$/;" l -dc8 usertests.asm /^ dc8: e8 f3 2d 00 00 call 3bc0 $/;" l -dc9 sh.asm /^ dc9: c3 ret $/;" l -dca sh.asm /^ dca: b8 17 00 00 00 mov $0x17,%eax$/;" l -dcd usertests.asm /^ dcd: 83 c4 10 add $0x10,%esp$/;" l -dcf sh.asm /^ dcf: cd 40 int $0x40$/;" l dd cat.asm /^ dd: 83 ec 08 sub $0x8,%esp$/;" l -dd echo.asm /^ dd: 8d 76 00 lea 0x0(%esi),%esi$/;" l -dd mkdir.asm /^ dd: 84 c0 test %al,%al$/;" l -dd my_userapp.asm /^ dd: 90 nop$/;" l -dd rm.asm /^ dd: 84 c0 test %al,%al$/;" l -dd test_master.asm /^ dd: 84 c0 test %al,%al$/;" l -dd zombie.asm /^ dd: 90 nop$/;" l -dd0 usertests.asm /^ dd0: 85 db test %ebx,%ebx$/;" l -dd1 sh.asm /^ dd1: c3 ret $/;" l -dd2 sh.asm /^ dd2: b8 18 00 00 00 mov $0x18,%eax$/;" l -dd2 usertests.asm /^ dd2: 75 ec jne dc0 $/;" l -dd4 usertests.asm /^ dd4: 83 ec 0c sub $0xc,%esp$/;" l -dd7 sh.asm /^ dd7: cd 40 int $0x40$/;" l -dd7 usertests.asm /^ dd7: 68 00 50 00 00 push $0x5000$/;" l -dd9 sh.asm /^ dd9: c3 ret $/;" l -dda sh.asm /^ dda: b8 19 00 00 00 mov $0x19,%eax$/;" l -ddc usertests.asm /^ ddc: e8 6f 2e 00 00 call 3c50 $/;" l -ddf sh.asm /^ ddf: cd 40 int $0x40$/;" l -de grep.asm /^ de: 74 0c je ec $/;" l -de ls.asm /^ de: 52 push %edx$/;" l -de my_userapp.asm /^ de: 90 nop$/;" l -de stressfs.asm /^ de: 59 pop %ecx$/;" l -de test_mlfq.asm /^ de: e8 4f 02 00 00 call 332 $/;" l -de test_sample.asm /^ de: 66 90 xchg %ax,%ax$/;" l -de wc.asm /^ de: 7e 5f jle 13f $/;" l -de zombie.asm /^ de: 90 nop$/;" l -de1 sh.asm /^ de1: c3 ret $/;" l -de1 usertests.asm /^ de1: 83 c4 10 add $0x10,%esp$/;" l -de2 sh.asm /^ de2: b8 1a 00 00 00 mov $0x1a,%eax$/;" l -de4 usertests.asm /^ de4: 85 c0 test %eax,%eax$/;" l -de6 usertests.asm /^ de6: 74 30 je e18 $/;" l -de7 sh.asm /^ de7: cd 40 int $0x40$/;" l -de8 usertests.asm /^ de8: 83 ec 0c sub $0xc,%esp$/;" l -de9 sh.asm /^ de9: c3 ret $/;" l -dea sh.asm /^ dea: b8 1b 00 00 00 mov $0x1b,%eax$/;" l +de echo.asm /^ de: 0f b6 19 movzbl (%ecx),%ebx$/;" l deallocuvm vm.c /^deallocuvm(pde_t *pgdir, uint oldsz, uint newsz)$/;" f -deb usertests.asm /^ deb: 50 push %eax$/;" l -dec usertests.asm /^ dec: e8 cf 2d 00 00 call 3bc0 $/;" l -def sh.asm /^ def: cd 40 int $0x40$/;" l -default kernel.asm /^ default:$/;" l -default kernel.asm /^ default:$/;" l -default sh.asm /^ default:$/;" l dev buf.h /^ uint dev;$/;" m struct:buf dev file.h /^ uint dev; \/\/ Device number$/;" m struct:inode dev log.c /^ int dev;$/;" m struct:log file: dev stat.h /^ int dev; \/\/ File system's disk device$/;" m struct:stat devsw file.c /^struct devsw devsw[NDEV];$/;" v typeref:struct:devsw devsw file.h /^struct devsw {$/;" s -df ls.asm /^ df: 6a 20 push $0x20$/;" l -df mkdir.asm /^ df: 74 0f je f0 $/;" l -df my_userapp.asm /^ df: 90 nop$/;" l -df rm.asm /^ df: 74 0f je f0 $/;" l -df sh.asm /^ df: 83 c4 10 add $0x10,%esp$/;" l -df stressfs.asm /^ df: 8d 85 de fd ff ff lea -0x222(%ebp),%eax$/;" l -df test_master.asm /^ df: 74 0f je f0 $/;" l -df zombie.asm /^ df: 90 nop$/;" l -df1 sh.asm /^ df1: c3 ret $/;" l -df1 usertests.asm /^ df1: 58 pop %eax$/;" l -df2 sh.asm /^ df2: 66 90 xchg %ax,%ax$/;" l -df2 usertests.asm /^ df2: 5a pop %edx$/;" l -df3 usertests.asm /^ df3: 68 64 41 00 00 push $0x4164$/;" l -df4 sh.asm /^ df4: 66 90 xchg %ax,%ax$/;" l -df6 sh.asm /^ df6: 66 90 xchg %ax,%ax$/;" l -df8 sh.asm /^ df8: 66 90 xchg %ax,%ax$/;" l -df8 usertests.asm /^ df8: 6a 01 push $0x1$/;" l -dfa sh.asm /^ dfa: 66 90 xchg %ax,%ax$/;" l -dfa usertests.asm /^ dfa: e8 21 2c 00 00 call 3a20 $/;" l -dfc sh.asm /^ dfc: 66 90 xchg %ax,%ax$/;" l -dfe sh.asm /^ dfe: 66 90 xchg %ax,%ax$/;" l -dff usertests.asm /^ dff: e8 9e 2a 00 00 call 38a2 $/;" l dinode fs.h /^struct dinode {$/;" s -dip kernel.asm /^ dip = (struct dinode*)bp->data + inum%IPB;$/;" d -dip kernel.asm /^ dip = (struct dinode*)bp->data + ip->inum%IPB;$/;" d -dip kernel.asm /^ dip = (struct dinode*)bp->data + ip->inum%IPB;$/;" d dirent fs.h /^struct dirent {$/;" s dirfile usertests.c /^dirfile(void)$/;" f dirlink fs.c /^dirlink(struct inode *dp, char *name, uint inum)$/;" f dirlookup fs.c /^dirlookup(struct inode *dp, char *name, uint *poff)$/;" f dirtest usertests.c /^void dirtest(void)$/;" f disksize memide.c /^static int disksize;$/;" v file: -do_commit kernel.asm /^ do_commit = 1;$/;" d -do_yield test_mlfq.asm /^ do_yield = atoi(argv[1]);$/;" d -doprocdump kernel.asm /^ doprocdump = 1;$/;" d dpl mmu.h /^ uint dpl : 2; \/\/ descriptor(meaning new) privilege level$/;" m struct:gatedesc dpl mmu.h /^ uint dpl : 2; \/\/ Descriptor Privilege Level$/;" m struct:segdesc ds mmu.h /^ ushort ds;$/;" m struct:taskstate ds x86.h /^ ushort ds;$/;" m struct:trapframe dst cat.asm /^ dst = vdst;$/;" d dst echo.asm /^ dst = vdst;$/;" d -dst forktest.asm /^ dst = vdst;$/;" d -dst grep.asm /^ dst = vdst;$/;" d -dst init.asm /^ dst = vdst;$/;" d -dst kill.asm /^ dst = vdst;$/;" d -dst ln.asm /^ dst = vdst;$/;" d -dst ls.asm /^ dst = vdst;$/;" d -dst mkdir.asm /^ dst = vdst;$/;" d -dst my_userapp.asm /^ dst = vdst;$/;" d -dst rm.asm /^ dst = vdst;$/;" d -dst sh.asm /^ dst = vdst;$/;" d -dst stressfs.asm /^ dst = vdst;$/;" d -dst test_master.asm /^ dst = vdst;$/;" d -dst test_mlfq.asm /^ dst = vdst;$/;" d -dst test_sample.asm /^ dst = vdst;$/;" d -dst test_stride.asm /^ dst = vdst;$/;" d -dst usertests.asm /^ dst = vdst;$/;" d -dst wc.asm /^ dst = vdst;$/;" d -dst zombie.asm /^ dst = vdst;$/;" d e cat.asm /^ e: 56 push %esi$/;" l -e console.c /^ uint e; \/\/ Edit index$/;" m struct:__anon8 file: +e console.c /^ uint e; \/\/ Edit index$/;" m struct:__anon6 file: e echo.asm /^ e: 56 push %esi$/;" l -e forktest.asm /^ e: 83 ec 04 sub $0x4,%esp$/;" l -e grep.asm /^ e: 56 push %esi$/;" l -e init.asm /^ e: 51 push %ecx$/;" l -e kernel.asm /^ e = addr+len;$/;" d -e kill.asm /^ e: 56 push %esi$/;" l -e ln.asm /^ e: 89 e5 mov %esp,%ebp$/;" l -e ls.asm /^ e: 56 push %esi$/;" l -e mkdir.asm /^ e: 56 push %esi$/;" l -e my_userapp.asm /^ e: 83 ec 10 sub $0x10,%esp$/;" l -e rm.asm /^ e: 56 push %esi$/;" l -e sh.asm /^ e: 83 ec 04 sub $0x4,%esp$/;" l -e test_master.asm /^ e: 51 push %ecx$/;" l -e test_mlfq.asm /^ e: 56 push %esi$/;" l -e test_sample.asm /^ e: 56 push %esi$/;" l -e test_stride.asm /^ e: 56 push %esi$/;" l -e usertests.asm /^ e: 83 ec 0c sub $0xc,%esp$/;" l -e wc.asm /^ e: 56 push %esi$/;" l -e zombie.asm /^ e: 83 ec 04 sub $0x4,%esp$/;" l -e0 cat.asm /^ e0: 68 f0 07 00 00 push $0x7f0$/;" l -e0 echo.asm /^ e0: 31 c0 xor %eax,%eax$/;" l -e0 forktest.asm /^ e0: 83 ec 0c sub $0xc,%esp$/;" l -e0 grep.asm /^ e0: 83 c3 01 add $0x1,%ebx$/;" l -e0 init.asm /^ e0: e8 8d 02 00 00 call 372 $/;" l -e0 kill.asm /^ e0: 55 push %ebp$/;" l -e0 ln.asm /^ e0: 55 push %ebp$/;" l -e0 my_userapp.asm /^ e0: 55 push %ebp$/;" l -e0 test_sample.asm /^ e0: 55 push %ebp$/;" l -e0 test_stride.asm /^ e0: 55 push %ebp$/;" l -e0 wc.asm /^ e0: 31 ff xor %edi,%edi$/;" l -e0 zombie.asm /^ e0: 55 push %ebp$/;" l -e00 sh.asm /^ e00: 55 push %ebp$/;" l -e01 sh.asm /^ e01: 89 e5 mov %esp,%ebp$/;" l -e03 sh.asm /^ e03: 57 push %edi$/;" l -e04 sh.asm /^ e04: 56 push %esi$/;" l -e04 usertests.asm /^ e04: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -e05 sh.asm /^ e05: 53 push %ebx$/;" l -e06 sh.asm /^ e06: 89 c6 mov %eax,%esi$/;" l -e08 sh.asm /^ e08: 83 ec 3c sub $0x3c,%esp$/;" l -e08 usertests.asm /^ e08: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -e0b sh.asm /^ e0b: 8b 5d 08 mov 0x8(%ebp),%ebx$/;" l -e0b usertests.asm /^ e0b: 5b pop %ebx$/;" l -e0c usertests.asm /^ e0c: 5e pop %esi$/;" l -e0d usertests.asm /^ e0d: 5f pop %edi$/;" l -e0e sh.asm /^ e0e: 85 db test %ebx,%ebx$/;" l -e0e usertests.asm /^ e0e: 5d pop %ebp$/;" l -e0f usertests.asm /^ e0f: e9 96 2a 00 00 jmp 38aa $/;" l -e1 kill.asm /^ e1: 89 e5 mov %esp,%ebp$/;" l -e1 ln.asm /^ e1: 89 e5 mov %esp,%ebp$/;" l -e1 ls.asm /^ e1: 50 push %eax$/;" l -e1 mkdir.asm /^ e1: 89 f1 mov %esi,%ecx$/;" l -e1 my_userapp.asm /^ e1: 89 e5 mov %esp,%ebp$/;" l -e1 rm.asm /^ e1: 89 f1 mov %esi,%ecx$/;" l -e1 test_master.asm /^ e1: 89 f1 mov %esi,%ecx$/;" l -e1 test_sample.asm /^ e1: 89 e5 mov %esp,%ebp$/;" l -e1 test_stride.asm /^ e1: 89 e5 mov %esp,%ebp$/;" l -e1 usertests.asm /^ e1: e8 0a 1c 00 00 call 1cf0 $/;" l -e1 zombie.asm /^ e1: 89 e5 mov %esp,%ebp$/;" l -e10 sh.asm /^ e10: 74 7e je e90 $/;" l -e12 sh.asm /^ e12: 89 d0 mov %edx,%eax$/;" l -e14 sh.asm /^ e14: c1 e8 1f shr $0x1f,%eax$/;" l -e14 usertests.asm /^ e14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -e17 sh.asm /^ e17: 84 c0 test %al,%al$/;" l -e18 usertests.asm /^ e18: 83 ec 08 sub $0x8,%esp$/;" l -e19 sh.asm /^ e19: 74 75 je e90 $/;" l -e1b sh.asm /^ e1b: 89 d0 mov %edx,%eax$/;" l -e1b usertests.asm /^ e1b: 68 4a 41 00 00 push $0x414a$/;" l -e1d sh.asm /^ e1d: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)$/;" l -e2 echo.asm /^ e2: 29 d8 sub %ebx,%eax$/;" l -e2 ls.asm /^ e2: e8 09 03 00 00 call 3f0 $/;" l -e2 sh.asm /^ e2: eb 83 jmp 67 $/;" l -e2 wc.asm /^ e2: eb 0e jmp f2 $/;" l -e20 usertests.asm /^ e20: 6a 01 push $0x1$/;" l -e22 usertests.asm /^ e22: e8 f9 2b 00 00 call 3a20 $/;" l -e24 sh.asm /^ e24: f7 d8 neg %eax$/;" l -e26 sh.asm /^ e26: 89 75 c0 mov %esi,-0x40(%ebp)$/;" l -e27 usertests.asm /^ e27: 89 34 24 mov %esi,(%esp)$/;" l -e29 sh.asm /^ e29: 31 ff xor %edi,%edi$/;" l -e2a usertests.asm /^ e2a: e8 a3 2a 00 00 call 38d2 $/;" l -e2b sh.asm /^ e2b: 8d 5d d7 lea -0x29(%ebp),%ebx$/;" l -e2e sh.asm /^ e2e: 89 ce mov %ecx,%esi$/;" l -e2f usertests.asm /^ e2f: e8 6e 2a 00 00 call 38a2 $/;" l -e3 forktest.asm /^ e3: 68 a4 04 00 00 push $0x4a4$/;" l -e3 grep.asm /^ e3: 83 fe 2e cmp $0x2e,%esi$/;" l -e3 kill.asm /^ e3: 8b 4d 08 mov 0x8(%ebp),%ecx$/;" l -e3 ln.asm /^ e3: 8b 4d 08 mov 0x8(%ebp),%ecx$/;" l -e3 mkdir.asm /^ e3: 38 d8 cmp %bl,%al$/;" l -e3 my_userapp.asm /^ e3: 57 push %edi$/;" l -e3 rm.asm /^ e3: 38 d8 cmp %bl,%al$/;" l -e3 test_master.asm /^ e3: 38 d8 cmp %bl,%al$/;" l -e3 test_mlfq.asm /^ e3: 66 90 xchg %ax,%ax$/;" l -e3 test_sample.asm /^ e3: 53 push %ebx$/;" l -e3 test_stride.asm /^ e3: 56 push %esi$/;" l -e3 zombie.asm /^ e3: 57 push %edi$/;" l -e30 sh.asm /^ e30: eb 08 jmp e3a $/;" l -e32 sh.asm /^ e32: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -e34 usertests.asm /^ e34: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -e38 sh.asm /^ e38: 89 cf mov %ecx,%edi$/;" l -e3a sh.asm /^ e3a: 31 d2 xor %edx,%edx$/;" l -e3a usertests.asm /^ e3a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi$/;" l -e3c sh.asm /^ e3c: 8d 4f 01 lea 0x1(%edi),%ecx$/;" l -e3f sh.asm /^ e3f: f7 f6 div %esi$/;" l -e4 echo.asm /^ e4: 5b pop %ebx$/;" l -e4 my_userapp.asm /^ e4: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -e4 sh.asm /^ e4: 83 ec 0c sub $0xc,%esp$/;" l -e4 test_sample.asm /^ e4: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -e4 test_stride.asm /^ e4: 53 push %ebx$/;" l -e4 wc.asm /^ e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -e4 zombie.asm /^ e4: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -e40 usertests.asm /^ e40: 55 push %ebp$/;" l -e41 sh.asm /^ e41: 0f b6 92 b0 12 00 00 movzbl 0x12b0(%edx),%edx$/;" l -e41 usertests.asm /^ e41: 89 e5 mov %esp,%ebp$/;" l -e43 usertests.asm /^ e43: 57 push %edi$/;" l -e44 usertests.asm /^ e44: 56 push %esi$/;" l -e45 usertests.asm /^ e45: 53 push %ebx$/;" l -e46 usertests.asm /^ e46: 83 ec 34 sub $0x34,%esp$/;" l -e48 sh.asm /^ e48: 85 c0 test %eax,%eax$/;" l -e49 usertests.asm /^ e49: 68 6c 41 00 00 push $0x416c$/;" l -e4a sh.asm /^ e4a: 88 14 0b mov %dl,(%ebx,%ecx,1)$/;" l -e4d sh.asm /^ e4d: 75 e9 jne e38 $/;" l -e4e usertests.asm /^ e4e: 6a 01 push $0x1$/;" l -e4f sh.asm /^ e4f: 8b 45 c4 mov -0x3c(%ebp),%eax$/;" l +e0 cat.asm /^ e0: 68 30 08 00 00 push $0x830$/;" l +e1 echo.asm /^ e1: 84 c0 test %al,%al$/;" l +e3 echo.asm /^ e3: 75 1e jne 103 $/;" l e5 cat.asm /^ e5: 6a 01 push $0x1$/;" l -e5 echo.asm /^ e5: 5e pop %esi$/;" l -e5 init.asm /^ e5: 83 c4 10 add $0x10,%esp$/;" l -e5 mkdir.asm /^ e5: 74 e9 je d0 $/;" l -e5 rm.asm /^ e5: 74 e9 je d0 $/;" l -e5 stressfs.asm /^ e5: 5b pop %ebx$/;" l -e5 test_master.asm /^ e5: 74 e9 je d0 $/;" l -e5 test_mlfq.asm /^ e5: 66 90 xchg %ax,%ax$/;" l -e5 test_stride.asm /^ e5: 8b 55 08 mov 0x8(%ebp),%edx$/;" l -e50 usertests.asm /^ e50: e8 cb 2b 00 00 call 3a20 $/;" l -e52 sh.asm /^ e52: 8b 75 c0 mov -0x40(%ebp),%esi$/;" l -e55 sh.asm /^ e55: 85 c0 test %eax,%eax$/;" l -e55 usertests.asm /^ e55: c7 04 24 7b 41 00 00 movl $0x417b,(%esp)$/;" l -e57 sh.asm /^ e57: 74 08 je e61 $/;" l -e59 sh.asm /^ e59: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1)$/;" l -e5c usertests.asm /^ e5c: e8 91 2a 00 00 call 38f2 $/;" l -e5e sh.asm /^ e5e: 8d 4f 02 lea 0x2(%edi),%ecx$/;" l -e6 echo.asm /^ e6: 5d pop %ebp$/;" l -e6 grep.asm /^ e6: 74 e0 je c8 $/;" l -e6 kill.asm /^ e6: 80 39 00 cmpb $0x0,(%ecx)$/;" l -e6 ln.asm /^ e6: 80 39 00 cmpb $0x0,(%ecx)$/;" l -e6 stressfs.asm /^ e6: 6a 00 push $0x0$/;" l -e6 usertests.asm /^ e6: e8 a5 14 00 00 call 1590 $/;" l -e61 sh.asm /^ e61: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi$/;" l -e61 usertests.asm /^ e61: 5b pop %ebx$/;" l -e62 usertests.asm /^ e62: 5e pop %esi$/;" l -e63 usertests.asm /^ e63: 68 02 02 00 00 push $0x202$/;" l -e65 sh.asm /^ e65: 8d 76 00 lea 0x0(%esi),%esi$/;" l -e68 sh.asm /^ e68: 0f b6 07 movzbl (%edi),%eax$/;" l -e68 usertests.asm /^ e68: 68 7b 41 00 00 push $0x417b$/;" l -e6b sh.asm /^ e6b: 83 ec 04 sub $0x4,%esp$/;" l -e6d usertests.asm /^ e6d: e8 70 2a 00 00 call 38e2 $/;" l -e6e sh.asm /^ e6e: 83 ef 01 sub $0x1,%edi$/;" l -e7 cat.asm /^ e7: e8 e4 03 00 00 call 4d0 $/;" l -e7 echo.asm /^ e7: c3 ret $/;" l -e7 ls.asm /^ e7: 83 c4 10 add $0x10,%esp$/;" l -e7 mkdir.asm /^ e7: 29 d8 sub %ebx,%eax$/;" l -e7 my_userapp.asm /^ e7: 8b 4d 10 mov 0x10(%ebp),%ecx$/;" l -e7 rm.asm /^ e7: 29 d8 sub %ebx,%eax$/;" l -e7 sh.asm /^ e7: 50 push %eax$/;" l -e7 test_master.asm /^ e7: 29 d8 sub %ebx,%eax$/;" l -e7 test_mlfq.asm /^ e7: 66 90 xchg %ax,%ax$/;" l -e7 test_sample.asm /^ e7: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -e7 zombie.asm /^ e7: 8b 4d 10 mov 0x10(%ebp),%ecx$/;" l -e71 sh.asm /^ e71: 6a 01 push $0x1$/;" l -e72 usertests.asm /^ e72: 83 c4 10 add $0x10,%esp$/;" l -e73 sh.asm /^ e73: 53 push %ebx$/;" l -e74 sh.asm /^ e74: 56 push %esi$/;" l -e75 sh.asm /^ e75: 88 45 d7 mov %al,-0x29(%ebp)$/;" l -e75 usertests.asm /^ e75: 85 c0 test %eax,%eax$/;" l -e77 usertests.asm /^ e77: 0f 88 29 01 00 00 js fa6 $/;" l -e78 sh.asm /^ e78: e8 c5 fe ff ff call d42 $/;" l -e7d sh.asm /^ e7d: 83 c4 10 add $0x10,%esp$/;" l -e7d usertests.asm /^ e7d: 89 c7 mov %eax,%edi$/;" l -e7f usertests.asm /^ e7f: 8d 75 de lea -0x22(%ebp),%esi$/;" l -e8 echo.asm /^ e8: 90 nop$/;" l -e8 forktest.asm /^ e8: e8 e3 00 00 00 call 1d0 $/;" l -e8 grep.asm /^ e8: 39 f2 cmp %esi,%edx$/;" l -e8 init.asm /^ e8: e9 3c ff ff ff jmp 29 $/;" l -e8 sh.asm /^ e8: e8 5d 0c 00 00 call d4a $/;" l -e8 stressfs.asm /^ e8: 50 push %eax$/;" l -e8 test_stride.asm /^ e8: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -e8 wc.asm /^ e8: 31 f6 xor %esi,%esi$/;" l -e80 sh.asm /^ e80: 39 df cmp %ebx,%edi$/;" l -e82 sh.asm /^ e82: 75 e4 jne e68 $/;" l -e82 usertests.asm /^ e82: bb e8 03 00 00 mov $0x3e8,%ebx$/;" l -e84 sh.asm /^ e84: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -e87 sh.asm /^ e87: 5b pop %ebx$/;" l -e87 usertests.asm /^ e87: e8 0e 2a 00 00 call 389a $/;" l -e88 sh.asm /^ e88: 5e pop %esi$/;" l -e89 sh.asm /^ e89: 5f pop %edi$/;" l -e8a sh.asm /^ e8a: 5d pop %ebp$/;" l -e8b sh.asm /^ e8b: c3 ret $/;" l -e8c sh.asm /^ e8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -e8c usertests.asm /^ e8c: 83 f8 01 cmp $0x1,%eax$/;" l -e8f usertests.asm /^ e8f: 89 45 d4 mov %eax,-0x2c(%ebp)$/;" l -e9 echo.asm /^ e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -e9 kill.asm /^ e9: 74 12 je fd $/;" l -e9 ln.asm /^ e9: 74 12 je fd $/;" l -e9 mkdir.asm /^ e9: 5b pop %ebx$/;" l -e9 rm.asm /^ e9: 5b pop %ebx$/;" l -e9 stressfs.asm /^ e9: bb 14 00 00 00 mov $0x14,%ebx$/;" l -e9 test_master.asm /^ e9: 5b pop %ebx$/;" l -e9 test_mlfq.asm /^ e9: 66 90 xchg %ax,%ax$/;" l -e90 sh.asm /^ e90: 89 d0 mov %edx,%eax$/;" l -e92 sh.asm /^ e92: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)$/;" l -e92 usertests.asm /^ e92: 19 c0 sbb %eax,%eax$/;" l -e94 usertests.asm /^ e94: 83 ec 04 sub $0x4,%esp$/;" l -e97 usertests.asm /^ e97: 83 e0 f3 and $0xfffffff3,%eax$/;" l -e99 sh.asm /^ e99: eb 8b jmp e26 $/;" l -e9a usertests.asm /^ e9a: 6a 0a push $0xa$/;" l -e9b sh.asm /^ e9b: 90 nop$/;" l -e9c sh.asm /^ e9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -e9c usertests.asm /^ e9c: 83 c0 70 add $0x70,%eax$/;" l -e9f usertests.asm /^ e9f: 50 push %eax$/;" l -ea grep.asm /^ ea: 74 dc je c8 $/;" l -ea ls.asm /^ ea: 8d 65 f8 lea -0x8(%ebp),%esp$/;" l -ea mkdir.asm /^ ea: 5e pop %esi$/;" l -ea my_userapp.asm /^ ea: 8b 45 0c mov 0xc(%ebp),%eax$/;" l -ea rm.asm /^ ea: 5e pop %esi$/;" l -ea test_master.asm /^ ea: 5e pop %esi$/;" l -ea test_sample.asm /^ ea: 89 c2 mov %eax,%edx$/;" l -ea wc.asm /^ ea: 83 c7 01 add $0x1,%edi$/;" l -ea zombie.asm /^ ea: 8b 45 0c mov 0xc(%ebp),%eax$/;" l -ea0 sh.asm /^ ea0: 55 push %ebp$/;" l -ea0 usertests.asm /^ ea0: 56 push %esi$/;" l -ea1 sh.asm /^ ea1: 89 e5 mov %esp,%ebp$/;" l -ea1 usertests.asm /^ ea1: e8 6a 28 00 00 call 3710 $/;" l -ea3 sh.asm /^ ea3: 57 push %edi$/;" l -ea4 sh.asm /^ ea4: 56 push %esi$/;" l -ea5 sh.asm /^ ea5: 53 push %ebx$/;" l -ea6 sh.asm /^ ea6: 8d 45 10 lea 0x10(%ebp),%eax$/;" l -ea6 usertests.asm /^ ea6: 83 c4 10 add $0x10,%esp$/;" l -ea9 sh.asm /^ ea9: 83 ec 2c sub $0x2c,%esp$/;" l -ea9 usertests.asm /^ ea9: eb 0a jmp eb5 $/;" l -eab usertests.asm /^ eab: 90 nop$/;" l -eac sh.asm /^ eac: 8b 75 0c mov 0xc(%ebp),%esi$/;" l -eac usertests.asm /^ eac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -eaf sh.asm /^ eaf: 8b 7d 08 mov 0x8(%ebp),%edi$/;" l +e5 echo.asm /^ e5: eb 29 jmp 110 $/;" l +e7 cat.asm /^ e7: e8 24 04 00 00 call 510 $/;" l +e7 echo.asm /^ e7: 89 f6 mov %esi,%esi$/;" l +e9 echo.asm /^ e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l eargv sh.c /^ char *eargv[MAXARGS];$/;" m struct:execcmd file: eax mmu.h /^ uint eax; \/\/ More saved state (registers)$/;" m struct:taskstate eax x86.h /^ uint eax;$/;" m struct:trapframe -eb kill.asm /^ eb: 31 d2 xor %edx,%edx$/;" l -eb ln.asm /^ eb: 31 d2 xor %edx,%edx$/;" l -eb mkdir.asm /^ eb: 5d pop %ebp$/;" l -eb rm.asm /^ eb: 5d pop %ebp$/;" l -eb test_master.asm /^ eb: 5d pop %ebp$/;" l -eb test_mlfq.asm /^ eb: 66 90 xchg %ax,%ax$/;" l -eb test_stride.asm /^ eb: 0f b6 02 movzbl (%edx),%eax$/;" l -eb usertests.asm /^ eb: e8 10 13 00 00 call 1400 $/;" l -eb0 usertests.asm /^ eb0: 83 eb 01 sub $0x1,%ebx$/;" l -eb2 sh.asm /^ eb2: 89 45 d0 mov %eax,-0x30(%ebp)$/;" l -eb3 usertests.asm /^ eb3: 74 26 je edb $/;" l -eb5 sh.asm /^ eb5: 0f b6 1e movzbl (%esi),%ebx$/;" l -eb5 usertests.asm /^ eb5: 83 ec 04 sub $0x4,%esp$/;" l -eb8 sh.asm /^ eb8: 83 c6 01 add $0x1,%esi$/;" l -eb8 usertests.asm /^ eb8: 6a 0a push $0xa$/;" l -eba usertests.asm /^ eba: 56 push %esi$/;" l -ebb sh.asm /^ ebb: 84 db test %bl,%bl$/;" l -ebb usertests.asm /^ ebb: 57 push %edi$/;" l -ebc usertests.asm /^ ebc: e8 01 2a 00 00 call 38c2 $/;" l -ebd sh.asm /^ ebd: 0f 84 b0 00 00 00 je f73 $/;" l -ebp kernel.asm /^ ebp = (uint*)ebp[0]; \/\/ saved %ebp$/;" d -ebp kernel.asm /^ ebp = (uint*)v - 2;$/;" d ebp mmu.h /^ uint *ebp;$/;" m struct:taskstate ebp proc.h /^ uint ebp;$/;" m struct:context ebp x86.h /^ uint ebp;$/;" m struct:trapframe ebx mmu.h /^ uint ebx;$/;" m struct:taskstate ebx proc.h /^ uint ebx;$/;" m struct:context ebx x86.h /^ uint ebx;$/;" m struct:trapframe -ec cat.asm /^ ec: e8 61 02 00 00 call 352 $/;" l -ec grep.asm /^ ec: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -ec mkdir.asm /^ ec: c3 ret $/;" l -ec rm.asm /^ ec: c3 ret $/;" l -ec test_master.asm /^ ec: c3 ret $/;" l -ec test_sample.asm /^ ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -ec1 usertests.asm /^ ec1: 83 c4 10 add $0x10,%esp$/;" l -ec3 sh.asm /^ ec3: 31 d2 xor %edx,%edx$/;" l -ec4 usertests.asm /^ ec4: 83 f8 0a cmp $0xa,%eax$/;" l -ec5 sh.asm /^ ec5: eb 39 jmp f00 $/;" l -ec7 sh.asm /^ ec7: 89 f6 mov %esi,%esi$/;" l -ec7 usertests.asm /^ ec7: 74 e7 je eb0 $/;" l -ec9 sh.asm /^ ec9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -ec9 usertests.asm /^ ec9: 83 ec 08 sub $0x8,%esp$/;" l -ecc usertests.asm /^ ecc: 68 6c 4e 00 00 push $0x4e6c$/;" l +ec cat.asm /^ ec: e8 91 02 00 00 call 382 $/;" l echoargv usertests.c /^char *echoargv[] = { "echo", "ALL", "TESTS", "PASSED", 0 };$/;" v -ecmd sh.asm /^ ecmd = (struct execcmd*)cmd;$/;" d ecx mmu.h /^ uint ecx;$/;" m struct:taskstate ecx x86.h /^ uint ecx;$/;" m struct:trapframe -ed forktest.asm /^ ed: 83 c4 0c add $0xc,%esp$/;" l -ed init.asm /^ ed: 66 90 xchg %ax,%ax$/;" l -ed kill.asm /^ ed: 8d 76 00 lea 0x0(%esi),%esi$/;" l -ed ln.asm /^ ed: 8d 76 00 lea 0x0(%esi),%esi$/;" l -ed ls.asm /^ ed: 89 d8 mov %ebx,%eax$/;" l -ed mkdir.asm /^ ed: 8d 76 00 lea 0x0(%esi),%esi$/;" l -ed my_userapp.asm /^ ed: 89 d7 mov %edx,%edi$/;" l -ed rm.asm /^ ed: 8d 76 00 lea 0x0(%esi),%esi$/;" l -ed sh.asm /^ ed: 83 c4 10 add $0x10,%esp$/;" l -ed test_master.asm /^ ed: 8d 76 00 lea 0x0(%esi),%esi$/;" l -ed test_mlfq.asm /^ ed: 66 90 xchg %ax,%ax$/;" l -ed wc.asm /^ ed: 39 7d e4 cmp %edi,-0x1c(%ebp)$/;" l -ed zombie.asm /^ ed: 89 d7 mov %edx,%edi$/;" l -ed0 sh.asm /^ ed0: 83 f8 25 cmp $0x25,%eax$/;" l -ed1 usertests.asm /^ ed1: 6a 01 push $0x1$/;" l -ed3 sh.asm /^ ed3: 89 55 d4 mov %edx,-0x2c(%ebp)$/;" l -ed3 usertests.asm /^ ed3: e8 48 2b 00 00 call 3a20 $/;" l -ed6 sh.asm /^ ed6: ba 25 00 00 00 mov $0x25,%edx$/;" l -ed8 usertests.asm /^ ed8: 83 c4 10 add $0x10,%esp$/;" l -edb sh.asm /^ edb: 74 18 je ef5 $/;" l -edb usertests.asm /^ edb: 8b 4d d4 mov -0x2c(%ebp),%ecx$/;" l -edd sh.asm /^ edd: 8d 45 e2 lea -0x1e(%ebp),%eax$/;" l -ede usertests.asm /^ ede: 85 c9 test %ecx,%ecx$/;" l edi mmu.h /^ uint edi;$/;" m struct:taskstate edi proc.h /^ uint edi;$/;" m struct:context edi x86.h /^ uint edi;$/;" m struct:trapframe edx mmu.h /^ uint edx;$/;" m struct:taskstate edx x86.h /^ uint edx;$/;" m struct:trapframe -ee stressfs.asm /^ ee: e8 cf 02 00 00 call 3c2 $/;" l -ee test_stride.asm /^ ee: 0f b6 19 movzbl (%ecx),%ebx$/;" l -ee0 sh.asm /^ ee0: 83 ec 04 sub $0x4,%esp$/;" l -ee0 usertests.asm /^ ee0: 0f 84 f4 00 00 00 je fda $/;" l -ee3 sh.asm /^ ee3: 88 5d e2 mov %bl,-0x1e(%ebp)$/;" l -ee6 sh.asm /^ ee6: 6a 01 push $0x1$/;" l -ee6 usertests.asm /^ ee6: e8 bf 29 00 00 call 38aa $/;" l -ee8 sh.asm /^ ee8: 50 push %eax$/;" l -ee9 sh.asm /^ ee9: 57 push %edi$/;" l -eea sh.asm /^ eea: e8 53 fe ff ff call d42 $/;" l -eeb usertests.asm /^ eeb: 83 ec 0c sub $0xc,%esp$/;" l -eee usertests.asm /^ eee: 31 db xor %ebx,%ebx$/;" l -eef sh.asm /^ eef: 8b 55 d4 mov -0x2c(%ebp),%edx$/;" l -ef grep.asm /^ ef: 5b pop %ebx$/;" l -ef init.asm /^ ef: 90 nop$/;" l -ef ls.asm /^ ef: 5b pop %ebx$/;" l -ef my_userapp.asm /^ ef: fc cld $/;" l -ef test_mlfq.asm /^ ef: 90 nop$/;" l -ef zombie.asm /^ ef: fc cld $/;" l -ef0 usertests.asm /^ ef0: 57 push %edi$/;" l -ef1 usertests.asm /^ ef1: 8d 7d e8 lea -0x18(%ebp),%edi$/;" l -ef2 sh.asm /^ ef2: 83 c4 10 add $0x10,%esp$/;" l -ef4 usertests.asm /^ ef4: e8 d1 29 00 00 call 38ca $/;" l -ef5 sh.asm /^ ef5: 83 c6 01 add $0x1,%esi$/;" l -ef8 sh.asm /^ ef8: 0f b6 5e ff movzbl -0x1(%esi),%ebx$/;" l -ef9 usertests.asm /^ ef9: 58 pop %eax$/;" l -efa usertests.asm /^ efa: 5a pop %edx$/;" l -efb usertests.asm /^ efb: 6a 00 push $0x0$/;" l -efc sh.asm /^ efc: 84 db test %bl,%bl$/;" l -efd usertests.asm /^ efd: 68 7b 41 00 00 push $0x417b$/;" l -efe sh.asm /^ efe: 74 73 je f73 $/;" l efile sh.c /^ char *efile;$/;" m struct:redircmd file: -eflags kernel.asm /^ eflags = readeflags();$/;" d eflags mmu.h /^ uint eflags;$/;" m struct:taskstate eflags x86.h /^ uint eflags;$/;" m struct:trapframe ehsize elf.h /^ ushort ehsize;$/;" m struct:elfhdr eip mmu.h /^ uint *eip; \/\/ Saved state from last task switch$/;" m struct:taskstate eip proc.h /^ uint eip;$/;" m struct:context eip x86.h /^ uint eip;$/;" m struct:trapframe -elf bootblock.asm /^ elf = (struct elfhdr*)0x10000; \/\/ scratch space$/;" d elf elf.h /^ uchar elf[12];$/;" m struct:elfhdr elfhdr elf.h /^struct elfhdr {$/;" s -empty kernel.asm /^ empty = ip;$/;" d -empty kernel.asm /^ empty = 0;$/;" d end_op log.c /^end_op(void)$/;" f -entry bootblock.asm /^ entry = (void(*)(void))(elf->entry);$/;" d entry elf.h /^ uint entry;$/;" m struct:elfhdr entry entry.S /^entry:$/;" l -entry kernel.asm /^entry:$/;" l entry mp.h /^ ushort entry; \/\/ entry count$/;" m struct:mpconf entrypgdir main.c /^pde_t entrypgdir[NPDENTRIES] = {$/;" v entrypgdir main.c /^pde_t entrypgdir[]; \/\/ For entry.S$/;" v -ep kernel.asm /^ ep = (char*)curproc->sz;$/;" d -epa bootblock.asm /^ epa = pa + count;$/;" d -eph bootblock.asm /^ eph = ph + elf->phnum;$/;" d err x86.h /^ uint err;$/;" m struct:trapframe es mmu.h /^ ushort es; \/\/ Even more saved state (segment selectors)$/;" m struct:taskstate -es sh.asm /^ es = s + strlen(s);$/;" d es x86.h /^ ushort es;$/;" m struct:trapframe esi mmu.h /^ uint esi;$/;" m struct:taskstate esi proc.h /^ uint esi;$/;" m struct:context @@ -2406,10 +615,11 @@ execcmd sh.c /^execcmd(void)$/;" f execcmd sh.c /^struct execcmd {$/;" s file: exectest usertests.c /^exectest(void)$/;" f exit initcode.S /^exit:$/;" l -exit initcode.asm /^exit:$/;" l exit proc.c /^exit(void)$/;" f exitiputtest usertests.c /^exitiputtest(void)$/;" f exitwait usertests.c /^exitwait(void)$/;" f +extern cat.asm /^extern void* malloc(uint);$/;" l +extern echo.asm /^extern void* malloc(uint);$/;" l f Makefile /^ dd if=\/dev\/zero of=xv6.img count=10000$/;" m f Makefile /^ dd if=\/dev\/zero of=xv6memfs.img count=10000$/;" m f Makefile /^ dd if=bootblock of=xv6.img conv=notrunc$/;" m @@ -2418,384 +628,24 @@ f Makefile /^ dd if=kernel of=xv6.img seek=1 conv=notrunc$/;" m f Makefile /^ dd if=kernelmemfs of=xv6memfs.img seek=1 conv=notrunc$/;" m f cat.asm /^ f: 53 push %ebx$/;" l f echo.asm /^ f: 53 push %ebx$/;" l -f grep.asm /^ f: 53 push %ebx$/;" l -f init.asm /^ f: 83 ec 08 sub $0x8,%esp$/;" l -f kill.asm /^ f: 53 push %ebx$/;" l -f ls.asm /^ f: 53 push %ebx$/;" l -f mkdir.asm /^ f: 53 push %ebx$/;" l -f rm.asm /^ f: 53 push %ebx$/;" l -f stressfs.asm /^ f: 55 push %ebp$/;" l -f test_master.asm /^ f: 31 db xor %ebx,%ebx$/;" l -f test_mlfq.asm /^ f: 53 push %ebx$/;" l -f test_sample.asm /^ f: 53 push %ebx$/;" l -f test_stride.asm /^ f: 53 push %ebx$/;" l -f wc.asm /^ f: 53 push %ebx$/;" l -f0 echo.asm /^ f0: 55 push %ebp$/;" l -f0 forktest.asm /^ f0: 50 push %eax$/;" l -f0 grep.asm /^ f0: 5e pop %esi$/;" l -f0 init.asm /^ f0: 55 push %ebp$/;" l -f0 kill.asm /^ f0: 83 c2 01 add $0x1,%edx$/;" l -f0 ln.asm /^ f0: 83 c2 01 add $0x1,%edx$/;" l -f0 ls.asm /^ f0: 5e pop %esi$/;" l -f0 mkdir.asm /^ f0: 31 c0 xor %eax,%eax$/;" l -f0 my_userapp.asm /^ f0: f3 aa rep stos %al,%es:(%edi)$/;" l -f0 rm.asm /^ f0: 31 c0 xor %eax,%eax$/;" l -f0 sh.asm /^ f0: e9 72 ff ff ff jmp 67 $/;" l -f0 test_master.asm /^ f0: 31 c0 xor %eax,%eax$/;" l -f0 test_mlfq.asm /^ f0: 55 push %ebp$/;" l -f0 test_sample.asm /^ f0: 83 c1 01 add $0x1,%ecx$/;" l -f0 usertests.asm /^ f0: e8 4b 28 00 00 call 2940 $/;" l -f0 wc.asm /^ f0: 74 3a je 12c $/;" l -f0 zombie.asm /^ f0: f3 aa rep stos %al,%es:(%edi)$/;" l -f00 sh.asm /^ f00: 85 d2 test %edx,%edx$/;" l -f02 sh.asm /^ f02: 0f be cb movsbl %bl,%ecx$/;" l -f02 usertests.asm /^ f02: e8 db 29 00 00 call 38e2 $/;" l -f05 sh.asm /^ f05: 0f b6 c3 movzbl %bl,%eax$/;" l -f07 usertests.asm /^ f07: 83 c4 10 add $0x10,%esp$/;" l -f08 sh.asm /^ f08: 74 c6 je ed0 $/;" l -f0a sh.asm /^ f0a: 83 fa 25 cmp $0x25,%edx$/;" l -f0a usertests.asm /^ f0a: 31 d2 xor %edx,%edx$/;" l -f0c usertests.asm /^ f0c: 85 c0 test %eax,%eax$/;" l -f0d sh.asm /^ f0d: 75 e6 jne ef5 $/;" l -f0e usertests.asm /^ f0e: 89 45 d0 mov %eax,-0x30(%ebp)$/;" l -f0f sh.asm /^ f0f: 83 f8 64 cmp $0x64,%eax$/;" l +f0 echo.asm /^ f0: 83 c2 01 add $0x1,%edx$/;" l f1 cat.asm /^ f1: 83 ec 08 sub $0x8,%esp$/;" l -f1 echo.asm /^ f1: 89 e5 mov %esp,%ebp$/;" l -f1 forktest.asm /^ f1: 68 a4 04 00 00 push $0x4a4$/;" l -f1 grep.asm /^ f1: 5f pop %edi$/;" l -f1 init.asm /^ f1: 89 e5 mov %esp,%ebp$/;" l -f1 ls.asm /^ f1: 5d pop %ebp$/;" l -f1 test_mlfq.asm /^ f1: 89 e5 mov %esp,%ebp$/;" l -f1 test_stride.asm /^ f1: 84 c0 test %al,%al$/;" l -f11 usertests.asm /^ f11: 0f 88 a9 00 00 00 js fc0 $/;" l -f12 sh.asm /^ f12: 0f 84 f8 00 00 00 je 1010 $/;" l -f17 usertests.asm /^ f17: 89 f6 mov %esi,%esi$/;" l -f18 sh.asm /^ f18: 81 e1 f7 00 00 00 and $0xf7,%ecx$/;" l -f19 usertests.asm /^ f19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -f1e sh.asm /^ f1e: 83 f9 70 cmp $0x70,%ecx$/;" l -f2 grep.asm /^ f2: 5d pop %ebp$/;" l -f2 ls.asm /^ f2: c3 ret $/;" l -f2 mkdir.asm /^ f2: 29 d8 sub %ebx,%eax$/;" l -f2 my_userapp.asm /^ f2: 89 d0 mov %edx,%eax$/;" l -f2 rm.asm /^ f2: 29 d8 sub %ebx,%eax$/;" l -f2 test_master.asm /^ f2: 29 d8 sub %ebx,%eax$/;" l -f2 wc.asm /^ f2: 0f be 87 a0 0b 00 00 movsbl 0xba0(%edi),%eax$/;" l -f2 zombie.asm /^ f2: 89 d0 mov %edx,%eax$/;" l -f20 usertests.asm /^ f20: 83 ec 04 sub $0x4,%esp$/;" l -f21 sh.asm /^ f21: 74 5d je f80 $/;" l -f23 sh.asm /^ f23: 83 f8 73 cmp $0x73,%eax$/;" l -f23 usertests.asm /^ f23: 89 55 d4 mov %edx,-0x2c(%ebp)$/;" l -f26 sh.asm /^ f26: 0f 84 84 00 00 00 je fb0 $/;" l -f26 usertests.asm /^ f26: 6a 0a push $0xa$/;" l -f28 usertests.asm /^ f28: 56 push %esi$/;" l -f29 usertests.asm /^ f29: ff 75 d0 pushl -0x30(%ebp)$/;" l -f2c sh.asm /^ f2c: 83 f8 63 cmp $0x63,%eax$/;" l -f2c usertests.asm /^ f2c: e8 89 29 00 00 call 38ba $/;" l -f2f sh.asm /^ f2f: 0f 84 ea 00 00 00 je 101f $/;" l -f3 echo.asm /^ f3: 8b 4d 08 mov 0x8(%ebp),%ecx$/;" l -f3 grep.asm /^ f3: c3 ret $/;" l -f3 init.asm /^ f3: 53 push %ebx$/;" l -f3 kill.asm /^ f3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)$/;" l -f3 ln.asm /^ f3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)$/;" l -f3 ls.asm /^ f3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi$/;" l -f3 stressfs.asm /^ f3: 83 c4 10 add $0x10,%esp$/;" l -f3 test_mlfq.asm /^ f3: 53 push %ebx$/;" l -f3 test_sample.asm /^ f3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx$/;" l -f3 test_stride.asm /^ f3: 75 1e jne 113 $/;" l -f31 usertests.asm /^ f31: 83 c4 10 add $0x10,%esp$/;" l -f34 usertests.asm /^ f34: 85 c0 test %eax,%eax$/;" l -f35 sh.asm /^ f35: 83 f8 25 cmp $0x25,%eax$/;" l -f36 usertests.asm /^ f36: 7e 27 jle f5f $/;" l -f38 sh.asm /^ f38: 0f 84 c2 00 00 00 je 1000 $/;" l -f38 usertests.asm /^ f38: 89 f0 mov %esi,%eax$/;" l -f3a usertests.asm /^ f3a: 8b 55 d4 mov -0x2c(%ebp),%edx$/;" l -f3d usertests.asm /^ f3d: eb 13 jmp f52 $/;" l -f3e sh.asm /^ f3e: 8d 45 e7 lea -0x19(%ebp),%eax$/;" l -f3f usertests.asm /^ f3f: 90 nop$/;" l -f4 cat.asm /^ f4: 68 02 08 00 00 push $0x802$/;" l -f4 grep.asm /^ f4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -f4 init.asm /^ f4: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -f4 mkdir.asm /^ f4: 5b pop %ebx$/;" l -f4 my_userapp.asm /^ f4: 5f pop %edi$/;" l -f4 rm.asm /^ f4: 5b pop %ebx$/;" l -f4 test_master.asm /^ f4: 5b pop %ebx$/;" l -f4 test_mlfq.asm /^ f4: 8b 45 08 mov 0x8(%ebp),%eax$/;" l -f4 zombie.asm /^ f4: 5f pop %edi$/;" l -f40 usertests.asm /^ f40: 80 f9 70 cmp $0x70,%cl$/;" l -f41 sh.asm /^ f41: 83 ec 04 sub $0x4,%esp$/;" l -f43 usertests.asm /^ f43: 0f 94 c1 sete %cl$/;" l -f44 sh.asm /^ f44: c6 45 e7 25 movb $0x25,-0x19(%ebp)$/;" l -f46 usertests.asm /^ f46: 0f b6 c9 movzbl %cl,%ecx$/;" l -f48 sh.asm /^ f48: 6a 01 push $0x1$/;" l -f49 usertests.asm /^ f49: 01 cb add %ecx,%ebx$/;" l -f4a sh.asm /^ f4a: 50 push %eax$/;" l -f4b sh.asm /^ f4b: 57 push %edi$/;" l -f4b usertests.asm /^ f4b: 83 c0 01 add $0x1,%eax$/;" l -f4c sh.asm /^ f4c: e8 f1 fd ff ff call d42 $/;" l -f4e usertests.asm /^ f4e: 39 c7 cmp %eax,%edi$/;" l -f5 mkdir.asm /^ f5: 5e pop %esi$/;" l -f5 my_userapp.asm /^ f5: 5d pop %ebp$/;" l -f5 rm.asm /^ f5: 5e pop %esi$/;" l -f5 sh.asm /^ f5: e8 28 0c 00 00 call d22 $/;" l -f5 test_master.asm /^ f5: 5e pop %esi$/;" l -f5 test_stride.asm /^ f5: eb 29 jmp 120 $/;" l -f5 usertests.asm /^ f5: e8 46 2a 00 00 call 2b40 $/;" l -f5 zombie.asm /^ f5: 5d pop %ebp$/;" l -f50 usertests.asm /^ f50: 74 ce je f20 $/;" l -f51 sh.asm /^ f51: 83 c4 0c add $0xc,%esp$/;" l -f52 usertests.asm /^ f52: 0f b6 08 movzbl (%eax),%ecx$/;" l -f54 sh.asm /^ f54: 8d 45 e6 lea -0x1a(%ebp),%eax$/;" l -f55 usertests.asm /^ f55: 80 f9 63 cmp $0x63,%cl$/;" l -f57 sh.asm /^ f57: 88 5d e6 mov %bl,-0x1a(%ebp)$/;" l -f58 usertests.asm /^ f58: 75 e6 jne f40 $/;" l -f5a sh.asm /^ f5a: 6a 01 push $0x1$/;" l -f5a usertests.asm /^ f5a: 83 c2 01 add $0x1,%edx$/;" l -f5c sh.asm /^ f5c: 50 push %eax$/;" l -f5d sh.asm /^ f5d: 57 push %edi$/;" l -f5d usertests.asm /^ f5d: eb ec jmp f4b $/;" l -f5e sh.asm /^ f5e: 83 c6 01 add $0x1,%esi$/;" l -f5f usertests.asm /^ f5f: 83 ec 0c sub $0xc,%esp$/;" l -f6 echo.asm /^ f6: 80 39 00 cmpb $0x0,(%ecx)$/;" l -f6 forktest.asm /^ f6: 6a 01 push $0x1$/;" l -f6 mkdir.asm /^ f6: 5d pop %ebp$/;" l -f6 my_userapp.asm /^ f6: c3 ret $/;" l -f6 rm.asm /^ f6: 5d pop %ebp$/;" l -f6 stressfs.asm /^ f6: 89 c7 mov %eax,%edi$/;" l -f6 test_master.asm /^ f6: 5d pop %ebp$/;" l -f6 zombie.asm /^ f6: c3 ret $/;" l -f61 sh.asm /^ f61: e8 dc fd ff ff call d42 $/;" l -f62 usertests.asm /^ f62: ff 75 d0 pushl -0x30(%ebp)$/;" l -f65 usertests.asm /^ f65: e8 60 29 00 00 call 38ca $/;" l -f66 sh.asm /^ f66: 0f b6 5e ff movzbl -0x1(%esi),%ebx$/;" l -f6a sh.asm /^ f6a: 83 c4 10 add $0x10,%esp$/;" l -f6a usertests.asm /^ f6a: c7 04 24 7b 41 00 00 movl $0x417b,(%esp)$/;" l -f6d sh.asm /^ f6d: 31 d2 xor %edx,%edx$/;" l -f6f sh.asm /^ f6f: 84 db test %bl,%bl$/;" l -f7 init.asm /^ f7: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -f7 kill.asm /^ f7: 89 d0 mov %edx,%eax$/;" l -f7 ln.asm /^ f7: 89 d0 mov %edx,%eax$/;" l -f7 mkdir.asm /^ f7: c3 ret $/;" l -f7 my_userapp.asm /^ f7: 89 f6 mov %esi,%esi$/;" l -f7 rm.asm /^ f7: c3 ret $/;" l -f7 test_master.asm /^ f7: c3 ret $/;" l -f7 test_mlfq.asm /^ f7: 8b 4d 0c mov 0xc(%ebp),%ecx$/;" l -f7 test_sample.asm /^ f7: 83 c2 01 add $0x1,%edx$/;" l -f7 test_stride.asm /^ f7: 89 f6 mov %esi,%esi$/;" l -f7 zombie.asm /^ f7: 89 f6 mov %esi,%esi$/;" l -f71 sh.asm /^ f71: 75 8d jne f00 $/;" l -f71 usertests.asm /^ f71: e8 7c 29 00 00 call 38f2 $/;" l -f73 sh.asm /^ f73: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -f76 sh.asm /^ f76: 5b pop %ebx$/;" l -f76 usertests.asm /^ f76: 8b 55 d4 mov -0x2c(%ebp),%edx$/;" l -f77 sh.asm /^ f77: 5e pop %esi$/;" l -f78 sh.asm /^ f78: 5f pop %edi$/;" l -f79 sh.asm /^ f79: 5d pop %ebp$/;" l -f79 usertests.asm /^ f79: 83 c4 10 add $0x10,%esp$/;" l -f7a sh.asm /^ f7a: c3 ret $/;" l -f7b sh.asm /^ f7b: 90 nop$/;" l -f7c sh.asm /^ f7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -f7c usertests.asm /^ f7c: 81 fa 10 27 00 00 cmp $0x2710,%edx$/;" l -f8 forktest.asm /^ f8: e8 b5 02 00 00 call 3b2 $/;" l -f8 grep.asm /^ f8: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -f8 mkdir.asm /^ f8: 90 nop$/;" l -f8 rm.asm /^ f8: 90 nop$/;" l -f8 stressfs.asm /^ f8: 90 nop$/;" l -f8 test_master.asm /^ f8: 90 nop$/;" l -f80 sh.asm /^ f80: 83 ec 0c sub $0xc,%esp$/;" l -f82 usertests.asm /^ f82: 75 5b jne fdf $/;" l -f83 sh.asm /^ f83: b9 10 00 00 00 mov $0x10,%ecx$/;" l -f84 usertests.asm /^ f84: 81 fb 10 27 00 00 cmp $0x2710,%ebx$/;" l -f88 sh.asm /^ f88: 6a 00 push $0x0$/;" l -f8a sh.asm /^ f8a: 8b 5d d0 mov -0x30(%ebp),%ebx$/;" l -f8a usertests.asm /^ f8a: 75 53 jne fdf $/;" l -f8c usertests.asm /^ f8c: 83 ec 08 sub $0x8,%esp$/;" l -f8d sh.asm /^ f8d: 89 f8 mov %edi,%eax$/;" l -f8f sh.asm /^ f8f: 8b 13 mov (%ebx),%edx$/;" l -f8f usertests.asm /^ f8f: 68 84 41 00 00 push $0x4184$/;" l +f3 echo.asm /^ f3: 0f b6 02 movzbl (%edx),%eax$/;" l +f4 cat.asm /^ f4: 68 42 08 00 00 push $0x842$/;" l +f6 echo.asm /^ f6: 8d 71 01 lea 0x1(%ecx),%esi$/;" l f9 cat.asm /^ f9: 6a 01 push $0x1$/;" l -f9 echo.asm /^ f9: 74 12 je 10d $/;" l -f9 kill.asm /^ f9: 75 f5 jne f0 $/;" l -f9 ln.asm /^ f9: 75 f5 jne f0 $/;" l -f9 ls.asm /^ f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -f9 mkdir.asm /^ f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -f9 my_userapp.asm /^ f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -f9 rm.asm /^ f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -f9 stressfs.asm /^ f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -f9 test_master.asm /^ f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -f9 test_stride.asm /^ f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -f9 wc.asm /^ f9: 31 c9 xor %ecx,%ecx$/;" l -f9 zombie.asm /^ f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -f91 sh.asm /^ f91: e8 6a fe ff ff call e00 $/;" l -f94 usertests.asm /^ f94: 6a 01 push $0x1$/;" l -f96 sh.asm /^ f96: 89 d8 mov %ebx,%eax$/;" l -f96 usertests.asm /^ f96: e8 85 2a 00 00 call 3a20 $/;" l -f98 sh.asm /^ f98: 83 c4 10 add $0x10,%esp$/;" l -f9b sh.asm /^ f9b: 31 d2 xor %edx,%edx$/;" l -f9b usertests.asm /^ f9b: 83 c4 10 add $0x10,%esp$/;" l -f9d sh.asm /^ f9d: 83 c0 04 add $0x4,%eax$/;" l -f9e usertests.asm /^ f9e: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -fa init.asm /^ fa: 89 c2 mov %eax,%edx$/;" l -fa sh.asm /^ fa: 83 ec 0c sub $0xc,%esp$/;" l -fa test_mlfq.asm /^ fa: 89 c2 mov %eax,%edx$/;" l -fa test_sample.asm /^ fa: 84 db test %bl,%bl$/;" l -fa usertests.asm /^ fa: e8 61 2b 00 00 call 2c60 $/;" l -fa0 sh.asm /^ fa0: 89 45 d0 mov %eax,-0x30(%ebp)$/;" l -fa1 usertests.asm /^ fa1: 5b pop %ebx$/;" l -fa2 usertests.asm /^ fa2: 5e pop %esi$/;" l -fa3 sh.asm /^ fa3: e9 4d ff ff ff jmp ef5 $/;" l -fa3 usertests.asm /^ fa3: 5f pop %edi$/;" l -fa4 usertests.asm /^ fa4: 5d pop %ebp$/;" l -fa5 usertests.asm /^ fa5: c3 ret $/;" l -fa6 usertests.asm /^ fa6: 83 ec 08 sub $0x8,%esp$/;" l -fa8 sh.asm /^ fa8: 90 nop$/;" l -fa9 sh.asm /^ fa9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -fa9 usertests.asm /^ fa9: 68 40 4e 00 00 push $0x4e40$/;" l -fae usertests.asm /^ fae: 6a 01 push $0x1$/;" l -fb cat.asm /^ fb: e8 d0 03 00 00 call 4d0 $/;" l -fb echo.asm /^ fb: 31 d2 xor %edx,%edx$/;" l -fb grep.asm /^ fb: b8 01 00 00 00 mov $0x1,%eax$/;" l -fb kill.asm /^ fb: 5d pop %ebp$/;" l -fb ln.asm /^ fb: 5d pop %ebp$/;" l -fb wc.asm /^ fb: 3c 0a cmp $0xa,%al$/;" l -fb0 sh.asm /^ fb0: 8b 45 d0 mov -0x30(%ebp),%eax$/;" l -fb0 usertests.asm /^ fb0: e8 6b 2a 00 00 call 3a20 $/;" l -fb3 sh.asm /^ fb3: 8b 18 mov (%eax),%ebx$/;" l -fb5 sh.asm /^ fb5: 83 c0 04 add $0x4,%eax$/;" l -fb5 usertests.asm /^ fb5: 83 c4 10 add $0x10,%esp$/;" l -fb8 sh.asm /^ fb8: 89 45 d0 mov %eax,-0x30(%ebp)$/;" l -fb8 usertests.asm /^ fb8: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -fbb sh.asm /^ fbb: b8 a8 12 00 00 mov $0x12a8,%eax$/;" l -fbb usertests.asm /^ fbb: 5b pop %ebx$/;" l -fbc usertests.asm /^ fbc: 5e pop %esi$/;" l -fbd usertests.asm /^ fbd: 5f pop %edi$/;" l -fbe usertests.asm /^ fbe: 5d pop %ebp$/;" l -fbf usertests.asm /^ fbf: c3 ret $/;" l -fc init.asm /^ fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -fc kill.asm /^ fc: c3 ret $/;" l -fc ln.asm /^ fc: c3 ret $/;" l -fc test_mlfq.asm /^ fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -fc test_sample.asm /^ fc: 88 5a ff mov %bl,-0x1(%edx)$/;" l -fc0 sh.asm /^ fc0: 85 db test %ebx,%ebx$/;" l -fc0 usertests.asm /^ fc0: 83 ec 08 sub $0x8,%esp$/;" l -fc2 sh.asm /^ fc2: 0f 44 d8 cmove %eax,%ebx$/;" l -fc3 usertests.asm /^ fc3: 68 8c 4e 00 00 push $0x4e8c$/;" l -fc5 sh.asm /^ fc5: 0f b6 03 movzbl (%ebx),%eax$/;" l -fc8 sh.asm /^ fc8: 84 c0 test %al,%al$/;" l -fc8 usertests.asm /^ fc8: 6a 01 push $0x1$/;" l -fca sh.asm /^ fca: 74 23 je fef $/;" l -fca usertests.asm /^ fca: e8 51 2a 00 00 call 3a20 $/;" l -fcc sh.asm /^ fcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -fcf usertests.asm /^ fcf: 83 c4 10 add $0x10,%esp$/;" l +f9 echo.asm /^ f9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx$/;" l +fb cat.asm /^ fb: e8 10 04 00 00 call 510 $/;" l fd cat.asm /^ fd = open(n, O_RDONLY);$/;" d fd echo.asm /^ fd = open(n, O_RDONLY);$/;" d -fd echo.asm /^ fd: 8d 76 00 lea 0x0(%esi),%esi$/;" l -fd forktest.asm /^ fd = open(n, O_RDONLY);$/;" d -fd forktest.asm /^ fd: e8 90 02 00 00 call 392 $/;" l -fd grep.asm /^ fd = open(n, O_RDONLY);$/;" d -fd init.asm /^ fd = open(n, O_RDONLY);$/;" d -fd kill.asm /^ fd = open(n, O_RDONLY);$/;" d -fd kill.asm /^ fd: 31 c0 xor %eax,%eax$/;" l -fd ln.asm /^ fd = open(n, O_RDONLY);$/;" d -fd ln.asm /^ fd: 31 c0 xor %eax,%eax$/;" l -fd ls.asm /^ fd = open(n, O_RDONLY);$/;" d -fd mkdir.asm /^ fd = open(n, O_RDONLY);$/;" d -fd my_userapp.asm /^ fd = open(n, O_RDONLY);$/;" d -fd rm.asm /^ fd = open(n, O_RDONLY);$/;" d -fd sh.asm /^ fd: 68 80 18 00 00 push $0x1880$/;" l -fd sh.asm /^ fd = open(n, O_RDONLY);$/;" d +fd echo.asm /^ fd: 84 c0 test %al,%al$/;" l fd sh.c /^ int fd;$/;" m struct:redircmd file: -fd stressfs.asm /^ fd = open(n, O_RDONLY);$/;" d -fd stressfs.asm /^ fd = open(path, O_CREATE | O_RDWR);$/;" d -fd stressfs.asm /^ fd = open(path, O_RDONLY);$/;" d -fd test_master.asm /^ fd = open(n, O_RDONLY);$/;" d -fd test_mlfq.asm /^ fd = open(n, O_RDONLY);$/;" d -fd test_sample.asm /^ fd = open(n, O_RDONLY);$/;" d -fd test_stride.asm /^ fd = open(n, O_RDONLY);$/;" d -fd usertests.asm /^ fd = open(name, O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open(file, O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open(fname, O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open(name, 0);$/;" d -fd usertests.asm /^ fd = open("", O_CREATE);$/;" d -fd usertests.asm /^ fd = open("bigarg-ok", O_CREATE);$/;" d -fd usertests.asm /^ fd = open("bigwrite", O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open("xx", O_CREATE);$/;" d -fd usertests.asm /^ fd = open(fname, 0);$/;" d -fd usertests.asm /^ fd = open(name, O_CREATE|O_RDWR);$/;" d -fd usertests.asm /^ fd = open(".", 0);$/;" d -fd usertests.asm /^ fd = open(".", O_RDWR);$/;" d -fd usertests.asm /^ fd = open("123456789012345\/123456789012345\/123456789012345", O_CREATE);$/;" d -fd usertests.asm /^ fd = open("12345678901234\/12345678901234\/12345678901234", 0);$/;" d -fd usertests.asm /^ fd = open("bd", O_CREATE);$/;" d -fd usertests.asm /^ fd = open("big", O_CREATE|O_RDWR);$/;" d -fd usertests.asm /^ fd = open("big", O_RDONLY);$/;" d -fd usertests.asm /^ fd = open("bigarg-ok", 0);$/;" d -fd usertests.asm /^ fd = open("bigfile", 0);$/;" d -fd usertests.asm /^ fd = open("bigfile", O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open("dd\/dd\/..\/ff", 0);$/;" d -fd usertests.asm /^ fd = open("dd\/dd\/ff", O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open("dd\/dd\/ffff", 0);$/;" d -fd usertests.asm /^ fd = open("dd\/ff", O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open("dirfile", O_CREATE);$/;" d -fd usertests.asm /^ fd = open("dirfile\/xx", 0);$/;" d -fd usertests.asm /^ fd = open("dirfile\/xx", O_CREATE);$/;" d -fd usertests.asm /^ fd = open("doesnotexist", 0);$/;" d -fd usertests.asm /^ fd = open("echo", 0);$/;" d -fd usertests.asm /^ fd = open("init", O_RDONLY);$/;" d -fd usertests.asm /^ fd = open("lf1", O_CREATE|O_RDWR);$/;" d -fd usertests.asm /^ fd = open("lf2", 0);$/;" d -fd usertests.asm /^ fd = open("sharedfd", 0);$/;" d -fd usertests.asm /^ fd = open("sharedfd", O_CREATE|O_RDWR);$/;" d -fd usertests.asm /^ fd = open("small", O_CREATE|O_RDWR);$/;" d -fd usertests.asm /^ fd = open("small", O_RDONLY);$/;" d -fd usertests.asm /^ fd = open("unlinkread", O_CREATE | O_RDWR);$/;" d -fd usertests.asm /^ fd = open("unlinkread", O_RDWR);$/;" d -fd usertests.asm /^ fd = open(n, O_RDONLY);$/;" d -fd wc.asm /^ fd = open(n, O_RDONLY);$/;" d -fd wc.asm /^ fd: 0f 94 c1 sete %cl$/;" l -fd zombie.asm /^ fd = open(n, O_RDONLY);$/;" d -fd0 kernel.asm /^ fd0 = -1;$/;" d -fd0 sh.asm /^ fd0: 88 45 e3 mov %al,-0x1d(%ebp)$/;" l -fd1 usertests.asm /^ fd1 = open("unlinkread", O_CREATE | O_RDWR);$/;" d -fd2 usertests.asm /^ fd2: 8d 65 f4 lea -0xc(%ebp),%esp$/;" l -fd3 sh.asm /^ fd3: 8d 45 e3 lea -0x1d(%ebp),%eax$/;" l -fd5 usertests.asm /^ fd5: 5b pop %ebx$/;" l -fd6 sh.asm /^ fd6: 83 ec 04 sub $0x4,%esp$/;" l -fd6 usertests.asm /^ fd6: 5e pop %esi$/;" l -fd7 usertests.asm /^ fd7: 5f pop %edi$/;" l -fd8 usertests.asm /^ fd8: 5d pop %ebp$/;" l -fd9 sh.asm /^ fd9: 6a 01 push $0x1$/;" l -fd9 usertests.asm /^ fd9: c3 ret $/;" l -fda usertests.asm /^ fda: e8 c3 28 00 00 call 38a2 $/;" l fdalloc sysfile.c /^fdalloc(struct file *f)$/;" f file: -fdb sh.asm /^ fdb: 83 c3 01 add $0x1,%ebx$/;" l -fde sh.asm /^ fde: 50 push %eax$/;" l -fdf sh.asm /^ fdf: 57 push %edi$/;" l -fdf usertests.asm /^ fdf: 53 push %ebx$/;" l -fe0 sh.asm /^ fe0: e8 5d fd ff ff call d42 $/;" l -fe0 usertests.asm /^ fe0: 52 push %edx$/;" l -fe1 usertests.asm /^ fe1: 68 91 41 00 00 push $0x4191$/;" l -fe5 sh.asm /^ fe5: 0f b6 03 movzbl (%ebx),%eax$/;" l -fe6 usertests.asm /^ fe6: 6a 01 push $0x1$/;" l -fe8 sh.asm /^ fe8: 83 c4 10 add $0x10,%esp$/;" l -fe8 usertests.asm /^ fe8: e8 33 2a 00 00 call 3a20 $/;" l feature mp.h /^ uint feature; \/\/ feature flags from CPUID instruction$/;" m struct:mpproc -feb sh.asm /^ feb: 84 c0 test %al,%al$/;" l -fed sh.asm /^ fed: 75 e1 jne fd0 $/;" l -fed usertests.asm /^ fed: e8 b0 28 00 00 call 38a2 $/;" l -fef sh.asm /^ fef: 31 d2 xor %edx,%edx$/;" l fetchint syscall.c /^fetchint(uint addr, int *ip)$/;" f fetchstr syscall.c /^fetchstr(uint addr, char **pp)$/;" f -ff kernel.asm /^ ff = *f;$/;" d -ff kill.asm /^ ff: 5d pop %ebp$/;" l -ff ln.asm /^ ff: 5d pop %ebp$/;" l -ff test_sample.asm /^ ff: 75 ef jne f0 $/;" l -ff usertests.asm /^ ff: e8 bc 1a 00 00 call 1bc0 $/;" l -ff1 sh.asm /^ ff1: e9 ff fe ff ff jmp ef5 $/;" l -ff2 usertests.asm /^ ff2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi$/;" l -ff6 sh.asm /^ ff6: 8d 76 00 lea 0x0(%esi),%esi$/;" l -ff9 sh.asm /^ ff9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -ff9 usertests.asm /^ ff9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi$/;" l -file file.c /^ struct file file[NFILE];$/;" m struct:__anon4 typeref:struct:__anon4::file file: +ff echo.asm /^ ff: 74 0f je 110 $/;" l +file file.c /^ struct file file[NFILE];$/;" m struct:__anon8 typeref:struct:__anon8::file file: file file.h /^struct file {$/;" s file sh.c /^ char *file;$/;" m struct:redircmd file: filealloc file.c /^filealloc(void)$/;" f @@ -2807,76 +657,38 @@ filestat file.c /^filestat(struct file *f, struct stat *st)$/;" f filesz elf.h /^ uint filesz;$/;" m struct:proghdr filewrite file.c /^filewrite(struct file *f, char *addr, int n)$/;" f fill_rtcdate lapic.c /^static void fill_rtcdate(struct rtcdate *r)$/;" f file: -first kernel.asm /^ first = 0;$/;" d flags buf.h /^ int flags;$/;" m struct:buf flags elf.h /^ uint flags;$/;" m struct:elfhdr flags elf.h /^ uint flags;$/;" m struct:proghdr -flags kernel.asm /^ flags = PTE_FLAGS(*pte);$/;" d flags mp.h /^ uchar flags; \/\/ CPU flags$/;" m struct:mpproc flags mp.h /^ uchar flags; \/\/ I\/O APIC flags$/;" m struct:mpioapic fmtname ls.c /^fmtname(char *path)$/;" f -fname usertests.asm /^ fname = names[i];$/;" d -fname usertests.asm /^ fname = names[pi];$/;" d fork proc.c /^fork(void)$/;" f fork1 sh.c /^fork1(void)$/;" f forkret proc.c /^forkret(void)$/;" f forktest forktest.c /^forktest(void)$/;" f forktest usertests.c /^forktest(void)$/;" f -found kernel.asm /^found:$/;" l fourfiles usertests.c /^fourfiles(void)$/;" f fourteen usertests.c /^fourteen(void)$/;" f free umalloc.c /^free(void *ap)$/;" f freeblock mkfs.c /^uint freeblock;$/;" v freeinode mkfs.c /^uint freeinode = 1;$/;" v -freelist kalloc.c /^ struct run *freelist;$/;" m struct:__anon6 typeref:struct:__anon6::run file: +freelist kalloc.c /^ struct run *freelist;$/;" m struct:__anon9 typeref:struct:__anon9::run file: freep cat.asm /^ freep = prevp;$/;" d freep cat.asm /^ freep = p;$/;" d freep echo.asm /^ freep = prevp;$/;" d freep echo.asm /^ freep = p;$/;" d -freep grep.asm /^ freep = prevp;$/;" d -freep grep.asm /^ freep = p;$/;" d -freep init.asm /^ freep = prevp;$/;" d -freep init.asm /^ freep = p;$/;" d -freep kill.asm /^ freep = prevp;$/;" d -freep kill.asm /^ freep = p;$/;" d -freep ln.asm /^ freep = prevp;$/;" d -freep ln.asm /^ freep = p;$/;" d -freep ls.asm /^ freep = prevp;$/;" d -freep ls.asm /^ freep = p;$/;" d -freep mkdir.asm /^ freep = prevp;$/;" d -freep mkdir.asm /^ freep = p;$/;" d -freep my_userapp.asm /^ freep = prevp;$/;" d -freep my_userapp.asm /^ freep = p;$/;" d -freep rm.asm /^ freep = prevp;$/;" d -freep rm.asm /^ freep = p;$/;" d -freep sh.asm /^ freep = prevp;$/;" d -freep sh.asm /^ freep = p;$/;" d -freep stressfs.asm /^ freep = prevp;$/;" d -freep stressfs.asm /^ freep = p;$/;" d -freep test_master.asm /^ freep = prevp;$/;" d -freep test_master.asm /^ freep = p;$/;" d -freep test_mlfq.asm /^ freep = prevp;$/;" d -freep test_mlfq.asm /^ freep = p;$/;" d -freep test_sample.asm /^ freep = prevp;$/;" d -freep test_sample.asm /^ freep = p;$/;" d -freep test_stride.asm /^ freep = prevp;$/;" d -freep test_stride.asm /^ freep = p;$/;" d freep umalloc.c /^static Header *freep;$/;" v file: -freep usertests.asm /^ freep = prevp;$/;" d -freep usertests.asm /^ freep = p;$/;" d -freep wc.asm /^ freep = prevp;$/;" d -freep wc.asm /^ freep = p;$/;" d -freep zombie.asm /^ freep = prevp;$/;" d -freep zombie.asm /^ freep = p;$/;" d freerange kalloc.c /^freerange(void *vstart, void *vend)$/;" f freevm vm.c /^freevm(pde_t *pgdir)$/;" f fs mmu.h /^ ushort fs;$/;" m struct:taskstate fs x86.h /^ ushort fs;$/;" m struct:trapframe fsfd mkfs.c /^int fsfd;$/;" v fsfull usertests.c /^fsfull()$/;" f -ftable file.c /^} ftable;$/;" v typeref:struct:__anon4 +ftable file.c /^} ftable;$/;" v typeref:struct:__anon8 g mmu.h /^ uint g : 1; \/\/ Granularity: limit scaled by 4K when set$/;" m struct:segdesc gatedesc mmu.h /^struct gatedesc {$/;" s +gcnt threadtest.c /^int gcnt;$/;" v gdt bootasm.S /^gdt:$/;" l gdt entryother.S /^gdt:$/;" l gdt proc.h /^ struct segdesc gdt[NSEGS]; \/\/ x86 global descriptor table$/;" m struct:cpu typeref:struct:cpu::segdesc @@ -2886,76 +698,31 @@ getcallerpcs spinlock.c /^getcallerpcs(void *v, uint pcs[])$/;" f getcmd sh.c /^getcmd(char *buf, int nbuf)$/;" f gets ulib.c /^gets(char *buf, int max)$/;" f gettoken sh.c /^gettoken(char **ps, char *es, char **q, char **eq)$/;" f +gpipe threadtest.c /^int gpipe[2];$/;" v grep grep.c /^grep(char *pattern, int fd)$/;" f growproc proc.c /^growproc(int n)$/;" f gs mmu.h /^ ushort gs;$/;" m struct:taskstate gs x86.h /^ ushort gs;$/;" m struct:trapframe havedisk1 ide.c /^static int havedisk1;$/;" v file: -havedisk1 kernel.asm /^ havedisk1 = 1;$/;" d -havekids kernel.asm /^ havekids = 1;$/;" d -havekids kernel.asm /^ havekids = 0;$/;" d -head bio.c /^ struct buf head;$/;" m struct:__anon1 typeref:struct:__anon1::buf file: +head bio.c /^ struct buf head;$/;" m struct:__anon7 typeref:struct:__anon7::buf file: header umalloc.c /^union header {$/;" u file: -hi usertests.asm /^ hi = 1100*1024;$/;" d holding spinlock.c /^holding(struct spinlock *lock)$/;" f holdingsleep sleeplock.c /^holdingsleep(struct sleeplock *lk)$/;" f hour date.h /^ uint hour;$/;" m struct:rtcdate hp cat.asm /^ hp = (Header*)p;$/;" d hp echo.asm /^ hp = (Header*)p;$/;" d -hp grep.asm /^ hp = (Header*)p;$/;" d -hp init.asm /^ hp = (Header*)p;$/;" d -hp kill.asm /^ hp = (Header*)p;$/;" d -hp ln.asm /^ hp = (Header*)p;$/;" d -hp ls.asm /^ hp = (Header*)p;$/;" d -hp mkdir.asm /^ hp = (Header*)p;$/;" d -hp my_userapp.asm /^ hp = (Header*)p;$/;" d -hp rm.asm /^ hp = (Header*)p;$/;" d -hp sh.asm /^ hp = (Header*)p;$/;" d -hp stressfs.asm /^ hp = (Header*)p;$/;" d -hp test_master.asm /^ hp = (Header*)p;$/;" d -hp test_mlfq.asm /^ hp = (Header*)p;$/;" d -hp test_sample.asm /^ hp = (Header*)p;$/;" d -hp test_stride.asm /^ hp = (Header*)p;$/;" d -hp usertests.asm /^ hp = (Header*)p;$/;" d -hp wc.asm /^ hp = (Header*)p;$/;" d -hp zombie.asm /^ hp = (Header*)p;$/;" d i cat.asm /^ i = 0;$/;" d i echo.asm /^ i = 0;$/;" d -i grep.asm /^ i = 0;$/;" d -i init.asm /^ i = 0;$/;" d -i kernel.asm /^ i = 0;$/;" d -i kill.asm /^ i = 0;$/;" d -i ln.asm /^ i = 0;$/;" d -i ls.asm /^ i = 0;$/;" d -i mkdir.asm /^ i = 0;$/;" d -i my_userapp.asm /^ i = 0;$/;" d -i rm.asm /^ i = 0;$/;" d -i sh.asm /^ i = 0;$/;" d -i stressfs.asm /^ i = 0;$/;" d -i test_master.asm /^ i = 0;$/;" d -i test_mlfq.asm /^ i = 0;$/;" d -i test_mlfq.asm /^ i = 0;$/;" d -i test_sample.asm /^ i = 0;$/;" d -i test_stride.asm /^ i = 0;$/;" d -i test_stride.asm /^ i = 0;$/;" d -i usertests.asm /^ i = de.name[1] - '0';$/;" d -i usertests.asm /^ i = read(fd, buf, 512);$/;" d -i usertests.asm /^ i = 0;$/;" d -i usertests.asm /^ i = read(fd, buf, 2000);$/;" d -i wc.asm /^ i = 0;$/;" d -i zombie.asm /^ i = 0;$/;" d ialloc fs.c /^ialloc(uint dev, short type)$/;" f ialloc mkfs.c /^ialloc(ushort type)$/;" f iappend mkfs.c /^iappend(uint inum, void *xp, int n)$/;" f -icache fs.c /^} icache;$/;" v typeref:struct:__anon5 -id kernel.asm /^ id = ioapicread(REG_ID) >> 24;$/;" d +icache fs.c /^} icache;$/;" v typeref:struct:__anon3 ideinit ide.c /^ideinit(void)$/;" f ideinit memide.c /^ideinit(void)$/;" f ideintr ide.c /^ideintr(void)$/;" f ideintr memide.c /^ideintr(void)$/;" f idelock ide.c /^static struct spinlock idelock;$/;" v typeref:struct:spinlock file: idequeue ide.c /^static struct buf *idequeue;$/;" v typeref:struct:buf file: -idequeue kernel.asm /^ idequeue = b->qnext;$/;" d iderw ide.c /^iderw(struct buf *b)$/;" f iderw memide.c /^iderw(struct buf *b)$/;" f idestart ide.c /^idestart(struct buf *b)$/;" f file: @@ -2971,92 +738,46 @@ inb x86.h /^inb(ushort port)$/;" f init initcode.S /^init:$/;" l initlock spinlock.c /^initlock(struct spinlock *lk, char *name)$/;" f initlog log.c /^initlog(int dev)$/;" f -initproc kernel.asm /^ initproc = p;$/;" d initproc proc.c /^static struct proc *initproc;$/;" v typeref:struct:proc file: initsleeplock sleeplock.c /^initsleeplock(struct sleeplock *lk, char *name)$/;" f inituvm vm.c /^inituvm(pde_t *pgdir, char *init, uint sz)$/;" f ino stat.h /^ uint ino; \/\/ Inode number$/;" m struct:stat inode file.h /^struct inode {$/;" s -inode fs.c /^ struct inode inode[NINODE];$/;" m struct:__anon5 typeref:struct:__anon5::inode file: +inode fs.c /^ struct inode inode[NINODE];$/;" m struct:__anon3 typeref:struct:__anon3::inode file: inodestart fs.h /^ uint inodestart; \/\/ Block number of first inode block$/;" m struct:superblock -input console.c /^} input;$/;" v typeref:struct:__anon8 +input console.c /^} input;$/;" v typeref:struct:__anon6 insl x86.h /^insl(int port, void *addr, int cnt)$/;" f install_trans log.c /^install_trans(void)$/;" f file: int cat.asm /^int$/;" l int echo.asm /^int$/;" l -int forktest.asm /^int$/;" l -int grep.asm /^int match(char*, char*);$/;" l -int grep.asm /^int matchhere(char *re, char *text)$/;" l -int grep.asm /^int matchhere(char*, char*);$/;" l -int grep.asm /^int matchstar(int c, char *re, char *text)$/;" l -int grep.asm /^int matchstar(int, char*, char*);$/;" l -int grep.asm /^int$/;" l -int init.asm /^int$/;" l -int kernel.asm /^int printk_str(char *str){$/;" l -int kernel.asm /^int sys_myfunction(void){$/;" l -int kernel.asm /^int$/;" l -int kill.asm /^int$/;" l -int ln.asm /^int$/;" l -int ls.asm /^int$/;" l -int mkdir.asm /^int$/;" l -int my_userapp.asm /^int main(int argc, char *argv[]){$/;" l -int my_userapp.asm /^int$/;" l -int rm.asm /^int$/;" l -int sh.asm /^int$/;" l -int stressfs.asm /^int$/;" l -int test_master.asm /^int$/;" l -int test_mlfq.asm /^int$/;" l -int test_sample.asm /^int$/;" l -int test_stride.asm /^int$/;" l -int usertests.asm /^int stdout = 1;$/;" l -int usertests.asm /^int$/;" l -int wc.asm /^int$/;" l -int zombie.asm /^int$/;" l -intena kernel.asm /^ intena = mycpu()->intena;$/;" d intena proc.h /^ int intena; \/\/ Were interrupts enabled before pushcli?$/;" m struct:cpu inum file.h /^ uint inum; \/\/ Inode number$/;" m struct:inode inum fs.h /^ ushort inum;$/;" m struct:dirent -inum kernel.asm /^ inum = de.inum;$/;" d -inword wc.asm /^ inword = 0;$/;" d -inword wc.asm /^ inword = 1;$/;" d -inword wc.asm /^ inword = 0;$/;" d ioapic ioapic.c /^struct ioapic {$/;" s file: ioapic ioapic.c /^volatile struct ioapic *ioapic;$/;" v typeref:struct:ioapic -ioapic kernel.asm /^ ioapic = (struct mpioapic*)p;$/;" d -ioapic kernel.asm /^ ioapic = (volatile struct ioapic*)IOAPIC;$/;" d ioapicenable ioapic.c /^ioapicenable(int irq, int cpunum)$/;" f -ioapicid kernel.asm /^ ioapicid = ioapic->apicno;$/;" d ioapicid mp.c /^uchar ioapicid;$/;" v ioapicinit ioapic.c /^ioapicinit(void)$/;" f ioapicread ioapic.c /^ioapicread(int reg)$/;" f file: ioapicwrite ioapic.c /^ioapicwrite(int reg, uint data)$/;" f file: iomb mmu.h /^ ushort iomb; \/\/ I\/O map base address$/;" m struct:taskstate ip file.h /^ struct inode *ip;$/;" m struct:file typeref:struct:file::inode -ip kernel.asm /^ ip = create(path, T_FILE, 0, 0);$/;" d -ip kernel.asm /^ ip = idup(myproc()->cwd);$/;" d -ip kernel.asm /^ ip = iget(ROOTDEV, ROOTINO);$/;" d -ip kernel.asm /^ ip = next;$/;" d -ip kernel.asm /^ ip = 0;$/;" d -ip kernel.asm /^ ip = empty;$/;" d iput fs.c /^iput(struct inode *ip)$/;" f iputtest usertests.c /^iputtest(void)$/;" f iref usertests.c /^iref(void)$/;" f -isNewStride ptable.h /^ int isNewStride; \/\/ same as Newbiecome, a process call set_cpu_share,$/;" m struct:__anon3 -isNewbieComing ptable.h /^ int isNewbieComing; \/\/ if isNewbieComing is 1, then new process is allocated$/;" m struct:__anon3 +isNewStride ptable.h /^ int isNewStride; \/\/ same as Newbiecome, a process call set_cpu_share,$/;" m struct:__anon4 +isNewbieComing ptable.h /^ int isNewbieComing; \/\/ if isNewbieComing is 1, then new process is allocated$/;" m struct:__anon4 isQueueEmpty proc.c /^isQueueEmpty(int lev) {$/;" f isStride proc.h /^ int isStride; \/\/ if 1, this proc is stride$/;" m struct:proc +isThread proc.h /^ int isThread;$/;" m struct:proc isdirempty sysfile.c /^isdirempty(struct inode *dp)$/;" f file: -ismp kernel.asm /^ ismp = 0;$/;" d -ismp kernel.asm /^ ismp = 1;$/;" d itrunc fs.c /^itrunc(struct inode *ip)$/;" f file: iunlock fs.c /^iunlock(struct inode *ip)$/;" f iunlockput fs.c /^iunlockput(struct inode *ip)$/;" f iupdate fs.c /^iupdate(struct inode *ip)$/;" f -k test_sample.asm /^ k = 0;$/;" d kalloc kalloc.c /^kalloc(void)$/;" f kbdgetc kbd.c /^kbdgetc(void)$/;" f kbdintr kbd.c /^kbdintr(void)$/;" f -kernel kernel.asm /^kernel: file format elf32-i386$/;" l kfree kalloc.c /^kfree(char *v)$/;" f kill proc.c /^kill(int pid)$/;" f killed proc.h /^ int killed; \/\/ If non-zero, have been killed$/;" m struct:proc @@ -3064,13 +785,10 @@ kinit1 kalloc.c /^kinit1(void *vstart, void *vend)$/;" f kinit2 kalloc.c /^kinit2(void *vstart, void *vend)$/;" f kmap vm.c /^static struct kmap {$/;" s file: kmap vm.c /^} kmap[] = {$/;" v typeref:struct:kmap file: -kmem kalloc.c /^} kmem;$/;" v typeref:struct:__anon6 -kpgdir kernel.asm /^ kpgdir = setupkvm();$/;" d +kmem kalloc.c /^} kmem;$/;" v typeref:struct:__anon9 kpgdir vm.c /^pde_t *kpgdir; \/\/ for use in scheduler()$/;" v kstack proc.h /^ char *kstack; \/\/ Bottom of kernel stack for this process$/;" m struct:proc kvmalloc vm.c /^kvmalloc(void)$/;" f -l wc.asm /^ l = w = c = 0;$/;" d -lapic kernel.asm /^ lapic = (uint*)conf->lapicaddr;$/;" d lapic lapic.c /^volatile uint *lapic; \/\/ Initialized in mp.c$/;" v lapicaddr mp.h /^ uint *lapicaddr; \/\/ address of local APIC$/;" m struct:mpconf lapiceoi lapic.c /^lapiceoi(void)$/;" f @@ -3078,18 +796,12 @@ lapicid lapic.c /^lapicid(void)$/;" f lapicinit lapic.c /^lapicinit(void)$/;" f lapicstartap lapic.c /^lapicstartap(uchar apicid, uint addr)$/;" f lapicw lapic.c /^lapicw(int index, int value)$/;" f file: -last kernel.asm /^ last = s+1;$/;" d -last kernel.asm /^ last = (char*)PGROUNDDOWN(((uint)va) + size - 1);$/;" d -lastaddr usertests.asm /^ lastaddr = (char*) (BIG-1);$/;" d -lcmd sh.asm /^ lcmd = (struct listcmd*)cmd;$/;" d lcr3 x86.h /^lcr3(uint val)$/;" f ldt mmu.h /^ ushort ldt;$/;" m struct:taskstate left sh.c /^ struct cmd *left;$/;" m struct:listcmd typeref:struct:listcmd::cmd file: left sh.c /^ struct cmd *left;$/;" m struct:pipecmd typeref:struct:pipecmd::cmd file: -len kernel.asm /^ len = path - s;$/;" d length mp.h /^ uchar length; \/\/ 1$/;" m struct:mp length mp.h /^ ushort length; \/\/ total table length$/;" m struct:mpconf -lev kernel.asm /^ lev = -1;$/;" d lgdt x86.h /^lgdt(struct segdesc *p, int size)$/;" f lh log.c /^ struct logheader lh;$/;" m struct:log typeref:struct:log::logheader file: lidt x86.h /^lidt(struct gatedesc *p, int size)$/;" f @@ -3103,20 +815,19 @@ listcmd sh.c /^struct listcmd {$/;" s file: lk sleeplock.h /^ struct spinlock lk; \/\/ spinlock protecting this sleep lock$/;" m struct:sleeplock typeref:struct:sleeplock::spinlock loadgs x86.h /^loadgs(ushort v)$/;" f loaduvm vm.c /^loaduvm(pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz)$/;" f -lock bio.c /^ struct spinlock lock;$/;" m struct:__anon1 typeref:struct:__anon1::spinlock file: +lock bio.c /^ struct spinlock lock;$/;" m struct:__anon7 typeref:struct:__anon7::spinlock file: lock buf.h /^ struct sleeplock lock;$/;" m struct:buf typeref:struct:buf::sleeplock -lock console.c /^ struct spinlock lock;$/;" m struct:__anon7 typeref:struct:__anon7::spinlock file: -lock file.c /^ struct spinlock lock;$/;" m struct:__anon4 typeref:struct:__anon4::spinlock file: +lock console.c /^ struct spinlock lock;$/;" m struct:__anon5 typeref:struct:__anon5::spinlock file: +lock file.c /^ struct spinlock lock;$/;" m struct:__anon8 typeref:struct:__anon8::spinlock file: lock file.h /^ struct sleeplock lock; \/\/ protects everything below here$/;" m struct:inode typeref:struct:inode::sleeplock -lock fs.c /^ struct spinlock lock;$/;" m struct:__anon5 typeref:struct:__anon5::spinlock file: -lock kalloc.c /^ struct spinlock lock;$/;" m struct:__anon6 typeref:struct:__anon6::spinlock file: +lock fs.c /^ struct spinlock lock;$/;" m struct:__anon3 typeref:struct:__anon3::spinlock file: +lock kalloc.c /^ struct spinlock lock;$/;" m struct:__anon9 typeref:struct:__anon9::spinlock file: lock log.c /^ struct spinlock lock;$/;" m struct:log typeref:struct:log::spinlock file: lock pipe.c /^ struct spinlock lock;$/;" m struct:pipe typeref:struct:pipe::spinlock file: -lock ptable.h /^ struct spinlock lock;$/;" m struct:__anon3 typeref:struct:__anon3::spinlock +lock ptable.h /^ struct spinlock lock;$/;" m struct:__anon4 typeref:struct:__anon4::spinlock locked sleeplock.h /^ uint locked; \/\/ Is the lock held?$/;" m struct:sleeplock locked spinlock.h /^ uint locked; \/\/ Is the lock held?$/;" m struct:spinlock -locking console.c /^ int locking;$/;" m struct:__anon7 file: -locking kernel.asm /^ locking = cons.locking;$/;" d +locking console.c /^ int locking;$/;" m struct:__anon5 file: log log.c /^struct log log;$/;" v typeref:struct:log log log.c /^struct log {$/;" s file: log_write log.c /^log_write(struct buf *b)$/;" f @@ -3124,15 +835,6 @@ logheader log.c /^struct logheader {$/;" s file: logstart fs.h /^ uint logstart; \/\/ Block number of first log block$/;" m struct:superblock ls ls.c /^ls(char *path)$/;" f ltr x86.h /^ltr(ushort sel)$/;" f -m grep.asm /^ m = 0;$/;" d -m grep.asm /^ m = 0;$/;" d -m kernel.asm /^ m = 1 << (bi % 8);$/;" d -m kernel.asm /^ m = min(n - tot, BSIZE - off%BSIZE);$/;" d -m kernel.asm /^ m = 1 << (bi % 8);$/;" d -m1 usertests.asm /^ m1 = m2;$/;" d -m1 usertests.asm /^ m1 = 0;$/;" d -m1 usertests.asm /^ m1 = malloc(1024*20);$/;" d -m2 usertests.asm /^ m2 = *(char**)m1;$/;" d machine elf.h /^ ushort machine;$/;" m struct:elfhdr magic elf.h /^ uint magic; \/\/ must equal ELF_MAGIC$/;" m struct:elfhdr main cat.c /^main(int argc, char *argv[])$/;" f @@ -3150,10 +852,12 @@ main my_userapp.c /^int main(int argc, char *argv[]){$/;" f main rm.c /^main(int argc, char *argv[])$/;" f main sh.c /^main(void)$/;" f main stressfs.c /^main(int argc, char *argv[])$/;" f +main test.c /^int main(int argc, char *argv[]){$/;" f main test_master.c /^main(int argc, char *argv[])$/;" f main test_mlfq.c /^main(int argc, char *argv[])$/;" f main test_sample.c /^main(int argc, char *argv[])$/;" f main test_stride.c /^main(int argc, char *argv[])$/;" f +main threadtest.c /^main(int argc, char *argv[])$/;" f main usertests.c /^main(int argc, char *argv[])$/;" f main wc.c /^main(int argc, char *argv[])$/;" f main zombie.c /^main(void)$/;" f @@ -3164,9 +868,6 @@ mappages vm.c /^mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm)$/ match grep.c /^match(char *re, char *text)$/;" f matchhere grep.c /^int matchhere(char *re, char *text)$/;" f matchstar grep.c /^int matchstar(int c, char *re, char *text)$/;" f -maxintr kernel.asm /^ maxintr = (ioapicread(REG_VER) >> 16) & 0xFF;$/;" d -mem kernel.asm /^ mem = kalloc();$/;" d -mem kernel.asm /^ mem = kalloc();$/;" d mem usertests.c /^mem(void)$/;" f memcmp string.c /^memcmp(const void *v1, const void *v2, uint n)$/;" f memcpy string.c /^memcpy(void *dst, const void *src, uint n)$/;" f @@ -3177,12 +878,12 @@ memset string.c /^memset(void *dst, int c, uint n)$/;" f memset ulib.c /^memset(void *dst, int c, uint n)$/;" f memsz elf.h /^ uint memsz;$/;" m struct:proghdr microdelay lapic.c /^microdelay(int us)$/;" f -min fs.c 24;" d file: -min mkfs.c 253;" d file: +min fs.c /^#define min(/;" d file: +min mkfs.c /^#define min(/;" d file: minor file.h /^ short minor;$/;" m struct:inode minor fs.h /^ short minor; \/\/ Minor device number (T_DEV only)$/;" m struct:dinode minute date.h /^ uint minute;$/;" m struct:rtcdate -mlfq ptable.h /^ struct proc* mlfq[3][NPROC]; \/\/ queue for MLFQ$/;" m struct:__anon3 typeref:struct:__anon3::proc +mlfq ptable.h /^ struct proc* mlfq[3][NPROC]; \/\/ queue for MLFQ$/;" m struct:__anon4 typeref:struct:__anon4::proc mode sh.c /^ int mode;$/;" m struct:redircmd file: month date.h /^ uint month;$/;" m struct:rtcdate morecore umalloc.c /^morecore(uint nu)$/;" f file: @@ -3203,75 +904,15 @@ n cat.asm /^ n = n*10 + *s++ - '0';$/;" d n cat.asm /^ n = 0;$/;" d n echo.asm /^ n = n*10 + *s++ - '0';$/;" d n echo.asm /^ n = 0;$/;" d -n forktest.asm /^ n = n*10 + *s++ - '0';$/;" d -n forktest.asm /^ n = 0;$/;" d -n grep.asm /^ n = n*10 + *s++ - '0';$/;" d -n grep.asm /^ n = 0;$/;" d -n init.asm /^ n = n*10 + *s++ - '0';$/;" d -n init.asm /^ n = 0;$/;" d -n kernel.asm /^ n = PGSIZE;$/;" d -n kernel.asm /^ n = len;$/;" d -n kernel.asm /^ n = sz - i;$/;" d -n kernel.asm /^ n = PGSIZE - (va - va0);$/;" d -n kernel.asm /^ n = ip->size - off;$/;" d -n kill.asm /^ n = n*10 + *s++ - '0';$/;" d -n kill.asm /^ n = 0;$/;" d -n ln.asm /^ n = n*10 + *s++ - '0';$/;" d -n ln.asm /^ n = 0;$/;" d n log.c /^ int n;$/;" m struct:logheader file: -n ls.asm /^ n = n*10 + *s++ - '0';$/;" d -n ls.asm /^ n = 0;$/;" d -n mkdir.asm /^ n = n*10 + *s++ - '0';$/;" d -n mkdir.asm /^ n = 0;$/;" d -n my_userapp.asm /^ n = n*10 + *s++ - '0';$/;" d -n my_userapp.asm /^ n = 0;$/;" d -n rm.asm /^ n = n*10 + *s++ - '0';$/;" d -n rm.asm /^ n = 0;$/;" d -n sh.asm /^ n = n*10 + *s++ - '0';$/;" d -n sh.asm /^ n = 0;$/;" d -n stressfs.asm /^ n = n*10 + *s++ - '0';$/;" d -n stressfs.asm /^ n = 0;$/;" d -n test_master.asm /^ n = n*10 + *s++ - '0';$/;" d -n test_master.asm /^ n = 0;$/;" d -n test_mlfq.asm /^ n = n*10 + *s++ - '0';$/;" d -n test_mlfq.asm /^ n = 0;$/;" d -n test_sample.asm /^ n = n*10 + *s++ - '0';$/;" d -n test_sample.asm /^ n = 0;$/;" d -n test_stride.asm /^ n = n*10 + *s++ - '0';$/;" d -n test_stride.asm /^ n = 0;$/;" d -n usertests.asm /^ n = n*10 + *s++ - '0';$/;" d -n usertests.asm /^ n = 0;$/;" d -n wc.asm /^ n = n*10 + *s++ - '0';$/;" d -n wc.asm /^ n = 0;$/;" d -n zombie.asm /^ n = n*10 + *s++ - '0';$/;" d -n zombie.asm /^ n = 0;$/;" d -n1 kernel.asm /^ n1 = max;$/;" d name cat.asm /^ name: \\$/;" l name echo.asm /^ name: \\$/;" l -name forktest.asm /^ name: \\$/;" l name fs.h /^ char name[DIRSIZ];$/;" m struct:dirent -name grep.asm /^ name: \\$/;" l -name init.asm /^ name: \\$/;" l -name kill.asm /^ name: \\$/;" l -name ln.asm /^ name: \\$/;" l -name ls.asm /^ name: \\$/;" l -name mkdir.asm /^ name: \\$/;" l -name my_userapp.asm /^ name: \\$/;" l name proc.h /^ char name[16]; \/\/ Process name (debugging)$/;" m struct:proc -name rm.asm /^ name: \\$/;" l -name sh.asm /^ name: \\$/;" l name sleeplock.h /^ char *name; \/\/ Name of lock.$/;" m struct:sleeplock name spinlock.h /^ char *name; \/\/ Name of lock.$/;" m struct:spinlock -name stressfs.asm /^ name: \\$/;" l -name test_master.asm /^ name: \\$/;" l -name test_mlfq.asm /^ name: \\$/;" l -name test_sample.asm /^ name: \\$/;" l -name test_stride.asm /^ name: \\$/;" l -name usertests.asm /^ name: \\$/;" l name usertests.c /^char name[3];$/;" v name usys.S /^ name: \\$/;" l -name wc.asm /^ name: \\$/;" l -name zombie.asm /^ name: \\$/;" l namecmp fs.c /^namecmp(const char *s, const char *t)$/;" f namei fs.c /^namei(char *path)$/;" f nameiparent fs.c /^nameiparent(char *path, char *name)$/;" f @@ -3279,47 +920,12 @@ namex fs.c /^namex(char *path, int nameiparent, char *name)$/;" f file: nbitmap mkfs.c /^int nbitmap = FSSIZE\/(BSIZE*8) + 1;$/;" v nblocks fs.h /^ uint nblocks; \/\/ Number of data blocks$/;" m struct:superblock nblocks mkfs.c /^int nblocks; \/\/ Number of data blocks$/;" v -nc usertests.asm /^ nc = np = 0;$/;" d ncli proc.h /^ int ncli; \/\/ Depth of pushcli nesting.$/;" m struct:cpu ncpu mp.c /^int ncpu;$/;" v neg cat.asm /^ neg = 1;$/;" d neg cat.asm /^ neg = 0;$/;" d neg echo.asm /^ neg = 1;$/;" d neg echo.asm /^ neg = 0;$/;" d -neg grep.asm /^ neg = 1;$/;" d -neg grep.asm /^ neg = 0;$/;" d -neg init.asm /^ neg = 1;$/;" d -neg init.asm /^ neg = 0;$/;" d -neg kill.asm /^ neg = 1;$/;" d -neg kill.asm /^ neg = 0;$/;" d -neg ln.asm /^ neg = 1;$/;" d -neg ln.asm /^ neg = 0;$/;" d -neg ls.asm /^ neg = 1;$/;" d -neg ls.asm /^ neg = 0;$/;" d -neg mkdir.asm /^ neg = 1;$/;" d -neg mkdir.asm /^ neg = 0;$/;" d -neg my_userapp.asm /^ neg = 1;$/;" d -neg my_userapp.asm /^ neg = 0;$/;" d -neg rm.asm /^ neg = 1;$/;" d -neg rm.asm /^ neg = 0;$/;" d -neg sh.asm /^ neg = 1;$/;" d -neg sh.asm /^ neg = 0;$/;" d -neg stressfs.asm /^ neg = 1;$/;" d -neg stressfs.asm /^ neg = 0;$/;" d -neg test_master.asm /^ neg = 1;$/;" d -neg test_master.asm /^ neg = 0;$/;" d -neg test_mlfq.asm /^ neg = 1;$/;" d -neg test_mlfq.asm /^ neg = 0;$/;" d -neg test_sample.asm /^ neg = 1;$/;" d -neg test_sample.asm /^ neg = 0;$/;" d -neg test_stride.asm /^ neg = 1;$/;" d -neg test_stride.asm /^ neg = 0;$/;" d -neg usertests.asm /^ neg = 1;$/;" d -neg usertests.asm /^ neg = 0;$/;" d -neg wc.asm /^ neg = 1;$/;" d -neg wc.asm /^ neg = 0;$/;" d -neg zombie.asm /^ neg = 1;$/;" d -neg zombie.asm /^ neg = 0;$/;" d next buf.h /^ struct buf *next;$/;" m struct:buf typeref:struct:buf::buf next kalloc.c /^ struct run *next;$/;" m struct:run typeref:struct:run::run file: nextpid proc.c /^int nextpid = 1;$/;" v @@ -3331,48 +937,14 @@ nlink stat.h /^ short nlink; \/\/ Number of links to file$/;" m struct:stat nlog fs.h /^ uint nlog; \/\/ Number of log blocks$/;" m struct:superblock nlog mkfs.c /^int nlog = LOGSIZE;$/;" v nmeta mkfs.c /^int nmeta; \/\/ Number of meta blocks (boot, sb, nlog, inode, bitmap)$/;" v +nop threadtest.c /^void nop(){ }$/;" f normalmap kbd.h /^static uchar normalmap[256] =$/;" v nread pipe.c /^ uint nread; \/\/ number of bytes read$/;" m struct:pipe file: nu cat.asm /^ nu = 4096;$/;" d nu echo.asm /^ nu = 4096;$/;" d -nu grep.asm /^ nu = 4096;$/;" d -nu init.asm /^ nu = 4096;$/;" d -nu kill.asm /^ nu = 4096;$/;" d -nu ln.asm /^ nu = 4096;$/;" d -nu ls.asm /^ nu = 4096;$/;" d -nu mkdir.asm /^ nu = 4096;$/;" d -nu my_userapp.asm /^ nu = 4096;$/;" d -nu rm.asm /^ nu = 4096;$/;" d -nu sh.asm /^ nu = 4096;$/;" d -nu stressfs.asm /^ nu = 4096;$/;" d -nu test_master.asm /^ nu = 4096;$/;" d -nu test_mlfq.asm /^ nu = 4096;$/;" d -nu test_sample.asm /^ nu = 4096;$/;" d -nu test_stride.asm /^ nu = 4096;$/;" d -nu usertests.asm /^ nu = 4096;$/;" d -nu wc.asm /^ nu = 4096;$/;" d -nu zombie.asm /^ nu = 4096;$/;" d nulterminate sh.c /^nulterminate(struct cmd *cmd)$/;" f -num kernel.asm /^ num = curproc->tf->eax;$/;" d nunits cat.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d nunits echo.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits grep.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits init.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits kill.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits ln.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits ls.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits mkdir.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits my_userapp.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits rm.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits sh.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits stressfs.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits test_master.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits test_mlfq.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits test_sample.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits test_stride.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits usertests.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits wc.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d -nunits zombie.asm /^ nunits = (nbytes + sizeof(Header) - 1)\/sizeof(Header) + 1;$/;" d nwrite pipe.c /^ uint nwrite; \/\/ number of bytes written$/;" m struct:pipe file: oemlength mp.h /^ ushort oemlength; \/\/ OEM table length$/;" m struct:mpconf oemtable mp.h /^ uint *oemtable; \/\/ OEM table pointer$/;" m struct:mpconf @@ -3381,77 +953,19 @@ off elf.h /^ uint off;$/;" m struct:proghdr off file.h /^ uint off;$/;" m struct:file off_15_0 mmu.h /^ uint off_15_0 : 16; \/\/ low 16 bits of offset in segment$/;" m struct:gatedesc off_31_16 mmu.h /^ uint off_31_16 : 16; \/\/ high bits of offset in segment$/;" m struct:gatedesc -offset bootblock.asm /^ offset = (offset \/ SECTSIZE) + 1;$/;" d ofile proc.h /^ struct file *ofile[NOFILE]; \/\/ Open files$/;" m struct:proc typeref:struct:proc::file -oldbrk usertests.asm /^ oldbrk = sbrk(0);$/;" d -oldpgdir kernel.asm /^ oldpgdir = curproc->pgdir;$/;" d openiputtest usertests.c /^openiputtest(void)$/;" f opentest usertests.c /^opentest(void)$/;" f os cat.asm /^ os = s;$/;" d os echo.asm /^ os = s;$/;" d -os forktest.asm /^ os = s;$/;" d -os grep.asm /^ os = s;$/;" d -os init.asm /^ os = s;$/;" d -os kernel.asm /^ os = s;$/;" d -os kill.asm /^ os = s;$/;" d -os ln.asm /^ os = s;$/;" d -os ls.asm /^ os = s;$/;" d -os mkdir.asm /^ os = s;$/;" d -os my_userapp.asm /^ os = s;$/;" d -os rm.asm /^ os = s;$/;" d -os sh.asm /^ os = s;$/;" d -os stressfs.asm /^ os = s;$/;" d -os test_master.asm /^ os = s;$/;" d -os test_mlfq.asm /^ os = s;$/;" d -os test_sample.asm /^ os = s;$/;" d -os test_stride.asm /^ os = s;$/;" d -os usertests.asm /^ os = s;$/;" d -os wc.asm /^ os = s;$/;" d -os zombie.asm /^ os = s;$/;" d outb x86.h /^outb(ushort port, uchar data)$/;" f outsl x86.h /^outsl(int port, const void *addr, int cnt)$/;" f outstanding log.c /^ int outstanding; \/\/ how many FS sys calls are executing.$/;" m struct:log file: outw x86.h /^outw(ushort port, ushort data)$/;" f p cat.asm /^ p = sbrk(nu * sizeof(Header));$/;" d p echo.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p grep.asm /^ p = q+1;$/;" d -p grep.asm /^ p = buf;$/;" d -p grep.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p init.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p kernel.asm /^ p = ptable.mlfq[lev][qhead];$/;" d -p kernel.asm /^ p = ptable.mlfq[lev][i]; \/\/ the small loss of last proc will be very large $/;" d -p kernel.asm /^ p = ptable.mlfq[lev][index]; $/;" d -p kernel.asm /^ p = ptable.stride[qhead];$/;" d -p kernel.asm /^ p = myproc();$/;" d -p kernel.asm /^ p = ((bda[0x14]<<8)|bda[0x13])*1024;$/;" d -p kernel.asm /^ p = (char*)PGROUNDUP((uint)vstart);$/;" d -p kernel.asm /^ p = 0;$/;" d -p kernel.asm /^ p = allocproc();$/;" d -p kernel.asm /^ p = c->proc;$/;" d -p kernel.asm /^ p = myproc(); \/\/ Each time total share added, the check of total share is not correctly working.$/;" d -p kill.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p ln.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p ls.asm /^ p = buf+strlen(buf);$/;" d -p ls.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p mkdir.asm /^ p = sbrk(nu * sizeof(Header));$/;" d p mmu.h /^ uint p : 1; \/\/ Present$/;" m struct:gatedesc p mmu.h /^ uint p : 1; \/\/ Present$/;" m struct:segdesc -p my_userapp.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p rm.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p sh.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p stressfs.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p test_master.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p test_mlfq.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p test_sample.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p test_stride.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p usertests.asm /^ p = sbrk(amt);$/;" d -p usertests.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p wc.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -p zombie.asm /^ p = sbrk(nu * sizeof(Header));$/;" d -pa bootblock.asm /^ pa = (uchar*)ph->paddr;$/;" d -pa kernel.asm /^ pa = PTE_ADDR(*pte);$/;" d -pa kernel.asm /^ pa = PTE_ADDR(*pte);$/;" d -pa0 kernel.asm /^ pa0 = uva2ka(pgdir, (char*)va0);$/;" d pad ioapic.c /^ uint pad[3];$/;" m struct:ioapic file: pad runoff /^pad()$/;" f padding1 mmu.h /^ ushort padding1;$/;" m struct:taskstate @@ -3474,7 +988,6 @@ paddr elf.h /^ uint paddr;$/;" m struct:proghdr panic console.c /^panic(char *s)$/;" f panic sh.c /^panic(char *s)$/;" f panicked console.c /^static int panicked = 0;$/;" v file: -panicked kernel.asm /^ panicked = 1; \/\/ freeze other CPU$/;" d parent proc.h /^ struct proc *parent; \/\/ Parent process$/;" m struct:proc typeref:struct:proc::proc parseblock sh.c /^parseblock(char **ps, char *es)$/;" f parsecmd sh.c /^parsecmd(char *s)$/;" f @@ -3482,17 +995,11 @@ parseexec sh.c /^parseexec(char **ps, char *es)$/;" f parseline sh.c /^parseline(char **ps, char *es)$/;" f parsepipe sh.c /^parsepipe(char **ps, char *es)$/;" f parseredirs sh.c /^parseredirs(struct cmd *cmd, char **ps, char *es)$/;" f -pattern grep.asm /^ pattern = argv[1];$/;" d -pcmd sh.asm /^ pcmd = (struct pipecmd*)cmd;$/;" d pcs spinlock.h /^ uint pcs[10]; \/\/ The call stack (an array of program counters)$/;" m struct:spinlock -pde kernel.asm /^ pde = &pgdir[PDX(va)];$/;" d pde_t types.h /^typedef uint pde_t;$/;" t peek sh.c /^peek(char **ps, char *es, char *toks)$/;" f perm vm.c /^ int perm;$/;" m struct:kmap file: -pgdir kernel.asm /^ pgdir = 0;$/;" d pgdir proc.h /^ pde_t* pgdir; \/\/ Page table$/;" m struct:proc -pgtab kernel.asm /^ pgtab = (pte_t*)P2V(PTE_ADDR(*pde));$/;" d -ph bootblock.asm /^ ph = (struct proghdr*)((uchar*)elf + elf->phoff);$/;" d phentsize elf.h /^ ushort phentsize;$/;" m struct:elfhdr phnum elf.h /^ ushort phnum;$/;" m struct:elfhdr phoff elf.h /^ uint phoff;$/;" m struct:elfhdr @@ -3500,20 +1007,8 @@ phys_end vm.c /^ uint phys_end;$/;" m struct:kmap file: phys_start vm.c /^ uint phys_start;$/;" m struct:kmap file: physaddr mp.h /^ void *physaddr; \/\/ phys addr of MP config table$/;" m struct:mp picinit picirq.c /^picinit(void)$/;" f -pid forktest.asm /^ pid = fork();$/;" d -pid init.asm /^ pid = fork();$/;" d -pid kernel.asm /^ pid = p->pid;$/;" d -pid kernel.asm /^ pid = np->pid;$/;" d pid proc.h /^ int pid; \/\/ Process ID$/;" m struct:proc -pid sh.asm /^ pid = fork();$/;" d pid sleeplock.h /^ int pid; \/\/ Process holding lock$/;" m struct:sleeplock -pid test_master.asm /^ pid = fork();$/;" d -pid test_sample.asm /^ pid = fork();$/;" d -pid usertests.asm /^ pid = fork();$/;" d -pid usertests.asm /^ pid = fork();$/;" d -pid1 usertests.asm /^ pid1 = fork();$/;" d -pid2 usertests.asm /^ pid2 = fork();$/;" d -pid3 usertests.asm /^ pid3 = fork();$/;" d pinit proc.c /^pinit(void)$/;" f pipe file.h /^ struct pipe *pipe;$/;" m struct:file typeref:struct:file::pipe pipe pipe.c /^struct pipe {$/;" s file: @@ -3527,11 +1022,6 @@ pipewrite pipe.c /^pipewrite(struct pipe *p, char *addr, int n)$/;" f pop_queue proc.c /^pop_queue(struct proc* p) {$/;" f pop_stride proc.c /^pop_stride(struct proc* p) {$/;" f popcli spinlock.c /^popcli(void)$/;" f -port usertests.asm /^ port = RTC_ADDR;$/;" d -port usertests.asm /^ port = RTC_DATA;$/;" d -pos kernel.asm /^ pos = inb(CRTPORT+1) << 8;$/;" d -ppid usertests.asm /^ ppid = getpid();$/;" d -ppid usertests.asm /^ ppid = getpid();$/;" d preempt usertests.c /^preempt(void)$/;" f prev buf.h /^ struct buf *prev; \/\/ LRU cache list$/;" m struct:buf typeref:struct:buf::buf printf forktest.c /^printf(int fd, char *s, ...)$/;" f @@ -3539,56 +1029,30 @@ printf printf.c /^printf(int fd, char *fmt, ...)$/;" f printint console.c /^printint(int xx, int base, int sign)$/;" f file: printint printf.c /^printint(int fd, int xx, int base, int sgn)$/;" f file: printk_str prac_syscall.c /^int printk_str(char *str){$/;" f -proc kernel.asm /^ proc = (struct mpproc*)p;$/;" d proc proc.h /^ struct proc *proc; \/\/ The process running on this cpu or null$/;" m struct:cpu typeref:struct:cpu::proc proc proc.h /^struct proc {$/;" s -proc ptable.h /^ struct proc proc[NPROC];$/;" m struct:__anon3 typeref:struct:__anon3::proc +proc ptable.h /^ struct proc proc[NPROC];$/;" m struct:__anon4 typeref:struct:__anon4::proc procdump proc.c /^procdump(void)$/;" f procstate proc.h /^enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };$/;" g product mp.h /^ uchar product[20]; \/\/ product id$/;" m struct:mpconf proghdr elf.h /^struct proghdr {$/;" s -ptable ptable.h /^} ptable; \/\/ so that it turns to stride scheduling, isNewStride becomes$/;" v typeref:struct:__anon3 -pte kernel.asm /^ pte = walkpgdir(pgdir, (char*)a, 0);$/;" d -pte kernel.asm /^ pte = walkpgdir(pgdir, uva, 0);$/;" d +ptable ptable.h /^} ptable; \/\/ so that it turns to stride scheduling, isNewStride becomes$/;" v typeref:struct:__anon4 pte_t mmu.h /^typedef uint pte_t;$/;" t -ptr umalloc.c /^ union header *ptr;$/;" m struct:header::__anon9 typeref:union:header::__anon9::header file: +ptr umalloc.c /^ union header *ptr;$/;" m struct:header::__anon2 typeref:union:header::__anon2::header file: push_queue proc.c /^push_queue(struct proc* p, int lev) {$/;" f push_stride proc.c /^push_stride(struct proc* p) {$/;" f pushcli spinlock.c /^pushcli(void)$/;" f putc printf.c /^putc(int fd, char c)$/;" f file: q_index proc.h /^ int q_index; \/\/ index of queue both MLFQ and Stride$/;" m struct:proc q_lev proc.h /^ int q_lev; \/\/ level of MLFQ of process$/;" m struct:proc -qhead kernel.asm /^ qhead = -1;$/;" d -qhead kernel.asm /^ qhead = -1;$/;" d qnext buf.h /^ struct buf *qnext; \/\/ disk queue$/;" m struct:buf typeref:struct:buf::buf r cat.asm /^ r = fstat(fd, st);$/;" d -r console.c /^ uint r; \/\/ Read index$/;" m struct:__anon8 file: +r console.c /^ uint r; \/\/ Read index$/;" m struct:__anon6 file: r echo.asm /^ r = fstat(fd, st);$/;" d -r forktest.asm /^ r = fstat(fd, st);$/;" d -r grep.asm /^ r = fstat(fd, st);$/;" d -r init.asm /^ r = fstat(fd, st);$/;" d -r kernel.asm /^ r = (struct run*)v;$/;" d -r kernel.asm /^ r = kmem.freelist;$/;" d -r kernel.asm /^ r = lk->locked;$/;" d -r kill.asm /^ r = fstat(fd, st);$/;" d -r ln.asm /^ r = fstat(fd, st);$/;" d -r ls.asm /^ r = fstat(fd, st);$/;" d -r mkdir.asm /^ r = fstat(fd, st);$/;" d -r my_userapp.asm /^ r = fstat(fd, st);$/;" d -r rm.asm /^ r = fstat(fd, st);$/;" d -r sh.asm /^ r = fstat(fd, st);$/;" d -r stressfs.asm /^ r = fstat(fd, st);$/;" d -r test_master.asm /^ r = fstat(fd, st);$/;" d -r test_mlfq.asm /^ r = fstat(fd, st);$/;" d -r test_sample.asm /^ r = fstat(fd, st);$/;" d -r test_stride.asm /^ r = fstat(fd, st);$/;" d -r usertests.asm /^ r = fstat(fd, st);$/;" d -r wc.asm /^ r = fstat(fd, st);$/;" d -r zombie.asm /^ r = fstat(fd, st);$/;" d +racingtest threadtest.c /^racingtest(void)$/;" f +racingthreadmain threadtest.c /^racingthreadmain(void *arg)$/;" f rand usertests.c /^rand()$/;" f -randstate usertests.asm /^ randstate = randstate * 1664525 + 1013904223;$/;" d randstate usertests.c /^unsigned long randstate = 1;$/;" v -rcmd sh.asm /^ rcmd = (struct redircmd*)cmd;$/;" d rcr2 x86.h /^rcr2(void)$/;" f read file.h /^ int (*read)(struct inode*, char*, int);$/;" m struct:devsw read_head log.c /^read_head(void)$/;" f file: @@ -3611,14 +1075,6 @@ releasesleep sleeplock.c /^releasesleep(struct sleeplock *lk)$/;" f reserved mp.h /^ uchar reserved;$/;" m struct:mpconf reserved mp.h /^ uchar reserved[3];$/;" m struct:mp reserved mp.h /^ uchar reserved[8];$/;" m struct:mpproc -ret sh.asm /^ ret = '+';$/;" d -ret sh.asm /^ ret = 'a';$/;" d -ret sh.asm /^ ret = parseredirs(ret, ps, es);$/;" d -ret sh.asm /^ ret = *s;$/;" d -ret sh.asm /^ ret = execcmd();$/;" d -ret sh.asm /^ ret = parseredirs(ret, ps, es);$/;" d -ret_val my_userapp.asm /^ ret_val = myfunction(buf);$/;" d -return kernel.asm /^ return d;$/;" d right sh.c /^ struct cmd *right;$/;" m struct:listcmd typeref:struct:listcmd::cmd file: right sh.c /^ struct cmd *right;$/;" m struct:pipecmd typeref:struct:pipecmd::cmd file: rinode mkfs.c /^rinode(uint inum, struct dinode *ip)$/;" f @@ -3635,61 +1091,19 @@ s cat.asm /^ s = "(null)";$/;" d s cat.asm /^ s = (char*)*ap;$/;" d s echo.asm /^ s = "(null)";$/;" d s echo.asm /^ s = (char*)*ap;$/;" d -s grep.asm /^ s = "(null)";$/;" d -s grep.asm /^ s = (char*)*ap;$/;" d -s init.asm /^ s = "(null)";$/;" d -s init.asm /^ s = (char*)*ap;$/;" d -s kernel.asm /^ s = "(null)";$/;" d -s kernel.asm /^ s = path;$/;" d -s kernel.asm /^ s = src;$/;" d -s kill.asm /^ s = "(null)";$/;" d -s kill.asm /^ s = (char*)*ap;$/;" d -s ln.asm /^ s = "(null)";$/;" d -s ln.asm /^ s = (char*)*ap;$/;" d -s ls.asm /^ s = "(null)";$/;" d -s ls.asm /^ s = (char*)*ap;$/;" d -s mkdir.asm /^ s = "(null)";$/;" d -s mkdir.asm /^ s = (char*)*ap;$/;" d s mmu.h /^ uint s : 1; \/\/ must be 0 (system)$/;" m struct:gatedesc s mmu.h /^ uint s : 1; \/\/ 0 = system, 1 = application$/;" m struct:segdesc -s my_userapp.asm /^ s = "(null)";$/;" d -s my_userapp.asm /^ s = (char*)*ap;$/;" d -s rm.asm /^ s = "(null)";$/;" d -s rm.asm /^ s = (char*)*ap;$/;" d -s sh.asm /^ s = "(null)";$/;" d -s sh.asm /^ s = (char*)*ap;$/;" d -s sh.asm /^ s = *ps;$/;" d -s stressfs.asm /^ s = "(null)";$/;" d -s stressfs.asm /^ s = (char*)*ap;$/;" d -s test_master.asm /^ s = "(null)";$/;" d -s test_master.asm /^ s = (char*)*ap;$/;" d -s test_mlfq.asm /^ s = "(null)";$/;" d -s test_mlfq.asm /^ s = (char*)*ap;$/;" d -s test_sample.asm /^ s = "(null)";$/;" d -s test_sample.asm /^ s = (char*)*ap;$/;" d -s test_stride.asm /^ s = "(null)";$/;" d -s test_stride.asm /^ s = (char*)*ap;$/;" d -s umalloc.c /^ } s;$/;" m union:header typeref:struct:header::__anon9 file: -s usertests.asm /^ s = "(null)";$/;" d -s usertests.asm /^ s = (char*)*ap;$/;" d -s wc.asm /^ s = "(null)";$/;" d -s wc.asm /^ s = (char*)*ap;$/;" d -s zombie.asm /^ s = "(null)";$/;" d -s zombie.asm /^ s = (char*)*ap;$/;" d -s1 kernel.asm /^ s1 = v1;$/;" d -s2 kernel.asm /^ s2 = v2;$/;" d +s umalloc.c /^ } s;$/;" m union:header typeref:struct:header::__anon2 file: safestrcpy string.c /^safestrcpy(char *s, const char *t, int n)$/;" f sb fs.c /^struct superblock sb; $/;" v typeref:struct:superblock sb mkfs.c /^struct superblock sb;$/;" v typeref:struct:superblock sbrktest usertests.c /^sbrktest(void)$/;" f sched proc.c /^sched(void)$/;" f -schedule kernel.asm /^schedule:$/;" l scheduler proc.c /^scheduler(void)$/;" f scheduler proc.h /^ struct context *scheduler; \/\/ swtch() here to enter scheduler$/;" m struct:cpu typeref:struct:cpu::context second date.h /^ uint second;$/;" m struct:rtcdate segdesc mmu.h /^struct segdesc {$/;" s seginit vm.c /^seginit(void)$/;" f -seq usertests.asm /^ seq = 0;$/;" d set_cpu_share proc.c /^set_cpu_share(int share)$/;" f setupkvm vm.c /^setupkvm(void)$/;" f sh proc.h /^ int sh; \/\/ cpu share of process, MLFQ is time allotment at each level$/;" m struct:proc @@ -3708,61 +1122,32 @@ size fs.h /^ uint size; \/\/ Size of file (bytes)$/;" m struct:dinod size fs.h /^ uint size; \/\/ Size of file system image (blocks)$/;" m struct:superblock size log.c /^ int size;$/;" m struct:log file: size stat.h /^ uint size; \/\/ Size of file in bytes$/;" m struct:stat -size umalloc.c /^ uint size;$/;" m struct:header::__anon9 file: +size umalloc.c /^ uint size;$/;" m struct:header::__anon2 file: skipelem fs.c /^skipelem(char *path, char *name)$/;" f file: sleep proc.c /^sleep(void *chan, struct spinlock *lk)$/;" f sleeplock sleeplock.h /^struct sleeplock {$/;" s -sp kernel.asm /^ sp = (sp - (strlen(argv[argc]) + 1)) & ~3;$/;" d -sp kernel.asm /^ sp = p->kstack + KSTACKSIZE;$/;" d -sp kernel.asm /^ sp = sz;$/;" d specrev mp.h /^ uchar specrev; \/\/ [14]$/;" m struct:mp spin bootasm.S /^spin:$/;" l -spin bootblock.asm /^spin:$/;" l spin entryother.S /^spin:$/;" l -spin entryother.asm /^spin:$/;" l spinlock spinlock.h /^struct spinlock {$/;" s src cat.asm /^ src = vsrc;$/;" d src echo.asm /^ src = vsrc;$/;" d -src forktest.asm /^ src = vsrc;$/;" d -src grep.asm /^ src = vsrc;$/;" d -src init.asm /^ src = vsrc;$/;" d -src kill.asm /^ src = vsrc;$/;" d -src ln.asm /^ src = vsrc;$/;" d -src ls.asm /^ src = vsrc;$/;" d -src mkdir.asm /^ src = vsrc;$/;" d -src my_userapp.asm /^ src = vsrc;$/;" d -src rm.asm /^ src = vsrc;$/;" d -src sh.asm /^ src = vsrc;$/;" d -src stressfs.asm /^ src = vsrc;$/;" d -src test_master.asm /^ src = vsrc;$/;" d -src test_mlfq.asm /^ src = vsrc;$/;" d -src test_sample.asm /^ src = vsrc;$/;" d -src test_stride.asm /^ src = vsrc;$/;" d -src usertests.asm /^ src = vsrc;$/;" d -src wc.asm /^ src = vsrc;$/;" d -src zombie.asm /^ src = vsrc;$/;" d ss mmu.h /^ ushort ss;$/;" m struct:taskstate ss x86.h /^ ushort ss;$/;" m struct:trapframe ss0 mmu.h /^ ushort ss0; \/\/ after an increase in privilege level$/;" m struct:taskstate ss1 mmu.h /^ ushort ss1;$/;" m struct:taskstate ss2 mmu.h /^ ushort ss2;$/;" m struct:taskstate -st kernel.asm /^ st = inb(KBSTATP);$/;" d -stack kernel.asm /^ stack = kalloc();$/;" d +stack cat.asm /^ stack = malloc(4096);$/;" d +stack echo.asm /^ stack = malloc(4096);$/;" d start bootasm.S /^start:$/;" l -start bootblock.asm /^start:$/;" l start entryother.S /^start:$/;" l -start entryother.asm /^start:$/;" l start initcode.S /^start:$/;" l -start initcode.asm /^start:$/;" l start log.c /^ int start;$/;" m struct:log file: start32 bootasm.S /^start32:$/;" l -start32 bootblock.asm /^start32:$/;" l start32 entryother.S /^start32:$/;" l -start32 entryother.asm /^start32:$/;" l -start_tick test_stride.asm /^ start_tick = uptime();$/;" d started proc.h /^ volatile uint started; \/\/ Has the CPU started?$/;" m struct:cpu startothers main.c /^startothers(void)$/;" f file: -stat mkfs.c 8;" d file: +stat mkfs.c /^#define stat /;" d file: stat stat.h /^struct stat {$/;" s stat ulib.c /^stat(char *n, struct stat *st)$/;" f state cat.asm /^ state = '%';$/;" d @@ -3771,157 +1156,13 @@ state cat.asm /^ state = 0;$/;" d state echo.asm /^ state = '%';$/;" d state echo.asm /^ state = 0;$/;" d state echo.asm /^ state = 0;$/;" d -state grep.asm /^ state = '%';$/;" d -state grep.asm /^ state = 0;$/;" d -state grep.asm /^ state = 0;$/;" d -state init.asm /^ state = '%';$/;" d -state init.asm /^ state = 0;$/;" d -state init.asm /^ state = 0;$/;" d -state kernel.asm /^ state = "???";$/;" d -state kernel.asm /^ state = states[p->state];$/;" d -state kill.asm /^ state = '%';$/;" d -state kill.asm /^ state = 0;$/;" d -state kill.asm /^ state = 0;$/;" d -state ln.asm /^ state = '%';$/;" d -state ln.asm /^ state = 0;$/;" d -state ln.asm /^ state = 0;$/;" d -state ls.asm /^ state = '%';$/;" d -state ls.asm /^ state = 0;$/;" d -state ls.asm /^ state = 0;$/;" d -state mkdir.asm /^ state = '%';$/;" d -state mkdir.asm /^ state = 0;$/;" d -state mkdir.asm /^ state = 0;$/;" d -state my_userapp.asm /^ state = '%';$/;" d -state my_userapp.asm /^ state = 0;$/;" d -state my_userapp.asm /^ state = 0;$/;" d state proc.h /^ enum procstate state; \/\/ Process state$/;" m struct:proc typeref:enum:proc::procstate -state rm.asm /^ state = '%';$/;" d -state rm.asm /^ state = 0;$/;" d -state rm.asm /^ state = 0;$/;" d -state sh.asm /^ state = '%';$/;" d -state sh.asm /^ state = 0;$/;" d -state sh.asm /^ state = 0;$/;" d -state stressfs.asm /^ state = '%';$/;" d -state stressfs.asm /^ state = 0;$/;" d -state stressfs.asm /^ state = 0;$/;" d -state test_master.asm /^ state = '%';$/;" d -state test_master.asm /^ state = 0;$/;" d -state test_master.asm /^ state = 0;$/;" d -state test_mlfq.asm /^ state = '%';$/;" d -state test_mlfq.asm /^ state = 0;$/;" d -state test_mlfq.asm /^ state = 0;$/;" d -state test_sample.asm /^ state = '%';$/;" d -state test_sample.asm /^ state = 0;$/;" d -state test_sample.asm /^ state = 0;$/;" d -state test_stride.asm /^ state = '%';$/;" d -state test_stride.asm /^ state = 0;$/;" d -state test_stride.asm /^ state = 0;$/;" d -state usertests.asm /^ state = '%';$/;" d -state usertests.asm /^ state = 0;$/;" d -state usertests.asm /^ state = 0;$/;" d -state wc.asm /^ state = '%';$/;" d -state wc.asm /^ state = 0;$/;" d -state wc.asm /^ state = 0;$/;" d -state zombie.asm /^ state = '%';$/;" d -state zombie.asm /^ state = 0;$/;" d -state zombie.asm /^ state = 0;$/;" d stati fs.c /^stati(struct inode *ip, struct stat *st)$/;" f -static bootblock.asm /^static inline uchar$/;" l -static bootblock.asm /^static inline void$/;" l -static cat.asm /^static Header *freep;$/;" l -static cat.asm /^static Header base;$/;" l static cat.asm /^static inline void$/;" l static cat.asm /^static void$/;" l -static echo.asm /^static Header *freep;$/;" l -static echo.asm /^static Header base;$/;" l static echo.asm /^static inline void$/;" l static echo.asm /^static void$/;" l -static forktest.asm /^static inline void$/;" l -static grep.asm /^static Header *freep;$/;" l -static grep.asm /^static Header base;$/;" l -static grep.asm /^static inline void$/;" l -static grep.asm /^static void$/;" l -static init.asm /^static Header *freep;$/;" l -static init.asm /^static Header base;$/;" l -static init.asm /^static inline void$/;" l -static init.asm /^static void$/;" l -static kernel.asm /^static inline uchar$/;" l -static kernel.asm /^static inline uint$/;" l -static kernel.asm /^static inline void$/;" l -static kernel.asm /^static int uart; \/\/ is there a uart?$/;" l -static kernel.asm /^static int$/;" l -static kernel.asm /^static pte_t *$/;" l -static kernel.asm /^static struct buf*$/;" t -static kernel.asm /^static struct inode*$/;" t -static kernel.asm /^static struct mp*$/;" t -static kernel.asm /^static struct proc*$/;" t -static kernel.asm /^static uint$/;" l -static kernel.asm /^static void commit();$/;" l -static kernel.asm /^static void fill_rtcdate(struct rtcdate *r)$/;" l -static kernel.asm /^static void recover_from_log(void);$/;" l -static kernel.asm /^static void wakeup1(void *chan);$/;" l -static kernel.asm /^static void$/;" l -static kill.asm /^static Header *freep;$/;" l -static kill.asm /^static Header base;$/;" l -static kill.asm /^static inline void$/;" l -static kill.asm /^static void$/;" l -static ln.asm /^static Header *freep;$/;" l -static ln.asm /^static Header base;$/;" l -static ln.asm /^static inline void$/;" l -static ln.asm /^static void$/;" l -static ls.asm /^static Header *freep;$/;" l -static ls.asm /^static Header base;$/;" l -static ls.asm /^static inline void$/;" l -static ls.asm /^static void$/;" l -static mkdir.asm /^static Header *freep;$/;" l -static mkdir.asm /^static Header base;$/;" l -static mkdir.asm /^static inline void$/;" l -static mkdir.asm /^static void$/;" l -static my_userapp.asm /^static Header *freep;$/;" l -static my_userapp.asm /^static Header base;$/;" l -static my_userapp.asm /^static inline void$/;" l -static my_userapp.asm /^static void$/;" l -static rm.asm /^static Header *freep;$/;" l -static rm.asm /^static Header base;$/;" l -static rm.asm /^static inline void$/;" l -static rm.asm /^static void$/;" l -static sh.asm /^static Header *freep;$/;" l -static sh.asm /^static Header base;$/;" l -static sh.asm /^static inline void$/;" l -static sh.asm /^static void$/;" l -static stressfs.asm /^static Header *freep;$/;" l -static stressfs.asm /^static Header base;$/;" l -static stressfs.asm /^static inline void$/;" l -static stressfs.asm /^static void$/;" l -static test_master.asm /^static Header *freep;$/;" l -static test_master.asm /^static Header base;$/;" l -static test_master.asm /^static inline void$/;" l -static test_master.asm /^static void$/;" l -static test_mlfq.asm /^static Header *freep;$/;" l -static test_mlfq.asm /^static Header base;$/;" l -static test_mlfq.asm /^static inline void$/;" l -static test_mlfq.asm /^static void$/;" l -static test_sample.asm /^static Header *freep;$/;" l -static test_sample.asm /^static Header base;$/;" l -static test_sample.asm /^static inline void$/;" l -static test_sample.asm /^static void$/;" l -static test_stride.asm /^static Header *freep;$/;" l -static test_stride.asm /^static Header base;$/;" l -static test_stride.asm /^static inline void$/;" l -static test_stride.asm /^static void$/;" l -static usertests.asm /^static Header *freep;$/;" l -static usertests.asm /^static Header base;$/;" l -static usertests.asm /^static inline void$/;" l -static usertests.asm /^static void$/;" l -static wc.asm /^static Header *freep;$/;" l -static wc.asm /^static Header base;$/;" l -static wc.asm /^static inline void$/;" l -static wc.asm /^static void$/;" l -static zombie.asm /^static Header *freep;$/;" l -static zombie.asm /^static Header base;$/;" l -static zombie.asm /^static inline void$/;" l -static zombie.asm /^static void$/;" l -static_assert mkfs.c 15;" d file: +static_assert mkfs.c /^#define static_assert(/;" d file: stdout usertests.c /^int stdout = 1;$/;" v sti x86.h /^sti(void)$/;" f stosb x86.h /^stosb(void *addr, int data, int cnt)$/;" f @@ -3929,26 +1170,21 @@ stosl x86.h /^stosl(void *addr, int data, int cnt)$/;" f strchr ulib.c /^strchr(const char *s, char c)$/;" f strcmp ulib.c /^strcmp(const char *p, const char *q)$/;" f strcpy ulib.c /^strcpy(char *s, char *t)$/;" f -stride ptable.h /^ struct proc* stride[NPROC]; \/\/ queue for stride$/;" m struct:__anon3 typeref:struct:__anon3::proc +stride ptable.h /^ struct proc* stride[NPROC]; \/\/ queue for stride$/;" m struct:__anon4 typeref:struct:__anon4::proc strlen string.c /^strlen(const char *s)$/;" f strlen ulib.c /^strlen(char *s)$/;" f strncmp string.c /^strncmp(const char *p, const char *q, uint n)$/;" f strncpy string.c /^strncpy(char *s, const char *t, int n)$/;" f -struct kernel.asm /^ struct proc *curproc = myproc();$/;" l -struct kernel.asm /^ struct proc *np;$/;" l -struct kernel.asm /^ struct proc *p = myproc();$/;" l -struct kernel.asm /^ struct proc *p;$/;" l subdir usertests.c /^subdir(void)$/;" f -sum kernel.asm /^ sum = 0;$/;" d sum mp.c /^sum(uchar *addr, int len)$/;" f file: superblock fs.h /^struct superblock {$/;" s switchkvm vm.c /^switchkvm(void)$/;" f switchuvm vm.c /^switchuvm(struct proc *p)$/;" f -swtch kernel.asm /^swtch:$/;" l swtch swtch.S /^swtch:$/;" l symbols sh.c /^char symbols[] = "<|>&;()";$/;" v sys_alarm sysproc.c /^sys_alarm(void)$/;" f sys_chdir sysfile.c /^sys_chdir(void)$/;" f +sys_clone sysproc.c /^sys_clone(void)$/;" f sys_close sysfile.c /^sys_close(void)$/;" f sys_dup sysfile.c /^sys_dup(void)$/;" f sys_exec sysfile.c /^sys_exec(void)$/;" f @@ -3969,6 +1205,8 @@ sys_read sysfile.c /^sys_read(void)$/;" f sys_sbrk sysproc.c /^sys_sbrk(void)$/;" f sys_set_cpu_share sysproc.c /^sys_set_cpu_share(void)$/;" f sys_sleep sysproc.c /^sys_sleep(void)$/;" f +sys_thread_exit sysproc.c /^sys_thread_exit(void)$/;" f +sys_thread_join sysproc.c /^sys_thread_join(void)$/;" f sys_unlink sysfile.c /^sys_unlink(void)$/;" f sys_uptime sysproc.c /^sys_uptime(void)$/;" f sys_wait sysproc.c /^sys_wait(void)$/;" f @@ -3976,34 +1214,30 @@ sys_write sysfile.c /^sys_write(void)$/;" f sys_yield sysproc.c /^sys_yield(void)$/;" f syscall syscall.c /^syscall(void)$/;" f syscalls syscall.c /^static int (*syscalls[])(void) = {$/;" v file: -sz kernel.asm /^ sz = 0;$/;" d -sz kernel.asm /^ sz = PGROUNDUP(sz);$/;" d -sz kernel.asm /^ sz = curproc->sz;$/;" d sz proc.h /^ uint sz; \/\/ Size of process memory (bytes)$/;" m struct:proc +sz_lock proc.h /^ struct spinlock sz_lock;$/;" m struct:proc typeref:struct:proc::spinlock t mmu.h /^ ushort t; \/\/ Trap on task switch$/;" m struct:taskstate -target kernel.asm /^ target = n;$/;" d taskstate mmu.h /^struct taskstate {$/;" s +testfunc threadtest.c /^int (*testfunc[NTEST])(void) = {$/;" v +testname threadtest.c /^char *testname[NTEST] = {$/;" v tf proc.h /^ struct trapframe *tf; \/\/ Trap frame for current syscall$/;" m struct:proc typeref:struct:proc::trapframe +thread_create ulib.c /^thread_create(thread_t *thread, void *(*start_routine)(void *), void *arg)$/;" f +thread_t types.h /^typedef uint thread_t;$/;" t ticks trap.c /^uint ticks;$/;" v -ticks0 kernel.asm /^ ticks0 = ticks;$/;" d tickslock trap.c /^struct spinlock tickslock;$/;" v typeref:struct:spinlock +tid proc.h /^ int tid; \/\/ Thread ID$/;" m struct:proc time_allotment proc.h /^ int time_allotment; \/\/ ticks for check whether we should drop the priority for mlfq$/;" m struct:proc togglecode kbd.h /^static uchar togglecode[256] =$/;" v -tok sh.asm /^ tok = gettoken(ps, es, 0, 0);$/;" d -total usertests.asm /^ total = 0;$/;" d -total usertests.asm /^ total = 0;$/;" d -total_share kernel.asm /^ total_share = 0;$/;" d total_share proc.h /^int total_share;$/;" v trap trap.c /^trap(struct trapframe *tf)$/;" f trapframe x86.h /^struct trapframe {$/;" s trapno x86.h /^ uint trapno;$/;" m struct:trapframe -trapret kernel.asm /^trapret:$/;" l trapret trapasm.S /^trapret:$/;" l ts proc.h /^ struct taskstate ts; \/\/ Used by x86 to find stack for interrupt$/;" m struct:cpu typeref:struct:cpu::taskstate tvinit trap.c /^tvinit(void)$/;" f type elf.h /^ uint type;$/;" m struct:proghdr type elf.h /^ ushort type;$/;" m struct:elfhdr -type file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" m struct:file typeref:enum:file::__anon2 +type file.h /^ enum { FD_NONE, FD_PIPE, FD_INODE } type;$/;" m struct:file typeref:enum:file::__anon1 type file.h /^ short type; \/\/ copy of disk inode$/;" m struct:inode type fs.h /^ short type; \/\/ File type$/;" m struct:dinode type mmu.h /^ uint type : 4; \/\/ type(STS_{TG,IG32,TG32})$/;" m struct:gatedesc @@ -4018,7 +1252,6 @@ type sh.c /^ int type;$/;" m struct:listcmd file: type sh.c /^ int type;$/;" m struct:pipecmd file: type sh.c /^ int type;$/;" m struct:redircmd file: type stat.h /^ short type; \/\/ Type of file$/;" m struct:stat -uart kernel.asm /^ uart = 1;$/;" d uart uart.c /^static int uart; \/\/ is there a uart?$/;" v file: uartgetc uart.c /^uartgetc(void)$/;" f file: uartinit uart.c /^uartinit(void)$/;" f @@ -4027,587 +1260,26 @@ uartputc uart.c /^uartputc(int c)$/;" f uchar types.h /^typedef unsigned char uchar;$/;" t uint cat.asm /^uint$/;" l uint echo.asm /^uint$/;" l -uint forktest.asm /^uint$/;" l -uint grep.asm /^uint$/;" l -uint init.asm /^uint$/;" l -uint kernel.asm /^uint ticks;$/;" l -uint kill.asm /^uint$/;" l -uint ln.asm /^uint$/;" l -uint ls.asm /^uint$/;" l -uint mkdir.asm /^uint$/;" l -uint my_userapp.asm /^uint$/;" l -uint rm.asm /^uint$/;" l -uint sh.asm /^uint$/;" l -uint stressfs.asm /^uint$/;" l -uint test_master.asm /^uint$/;" l -uint test_mlfq.asm /^uint$/;" l -uint test_sample.asm /^uint$/;" l -uint test_stride.asm /^uint$/;" l uint types.h /^typedef unsigned int uint;$/;" t -uint usertests.asm /^uint$/;" l -uint wc.asm /^uint$/;" l -uint zombie.asm /^uint$/;" l uio usertests.c /^uio()$/;" f uninit usertests.c /^char uninit[10000];$/;" v unlinkread usertests.c /^unlinkread(void)$/;" f -unsigned usertests.asm /^unsigned int$/;" l -unsigned usertests.asm /^unsigned long randstate = 1;$/;" l -use_lock kalloc.c /^ int use_lock;$/;" m struct:__anon6 file: +use_lock kalloc.c /^ int use_lock;$/;" m struct:__anon9 file: userinit proc.c /^userinit(void)$/;" f ushort types.h /^typedef unsigned short ushort;$/;" t uva2ka vm.c /^uva2ka(pde_t *pgdir, char *uva)$/;" f -va kernel.asm /^ va = va0 + PGSIZE;$/;" d -va0 kernel.asm /^ va0 = (uint)PGROUNDDOWN(va);$/;" d vaddr elf.h /^ uint vaddr;$/;" m struct:proghdr -val usertests.asm /^ val = 0x09; \/* year *\/$/;" d valid file.h /^ int valid; \/\/ inode has been read from disk?$/;" m struct:inode validateint usertests.c /^validateint(int *p)$/;" f validatetest usertests.c /^validatetest(void)$/;" f -vector0 kernel.asm /^vector0:$/;" l -vector0 vectors.S /^vector0:$/;" l -vector1 kernel.asm /^vector1:$/;" l -vector1 vectors.S /^vector1:$/;" l -vector10 kernel.asm /^vector10:$/;" l -vector10 vectors.S /^vector10:$/;" l -vector100 kernel.asm /^vector100:$/;" l -vector100 vectors.S /^vector100:$/;" l -vector101 kernel.asm /^vector101:$/;" l -vector101 vectors.S /^vector101:$/;" l -vector102 kernel.asm /^vector102:$/;" l -vector102 vectors.S /^vector102:$/;" l -vector103 kernel.asm /^vector103:$/;" l -vector103 vectors.S /^vector103:$/;" l -vector104 kernel.asm /^vector104:$/;" l -vector104 vectors.S /^vector104:$/;" l -vector105 kernel.asm /^vector105:$/;" l -vector105 vectors.S /^vector105:$/;" l -vector106 kernel.asm /^vector106:$/;" l -vector106 vectors.S /^vector106:$/;" l -vector107 kernel.asm /^vector107:$/;" l -vector107 vectors.S /^vector107:$/;" l -vector108 kernel.asm /^vector108:$/;" l -vector108 vectors.S /^vector108:$/;" l -vector109 kernel.asm /^vector109:$/;" l -vector109 vectors.S /^vector109:$/;" l -vector11 kernel.asm /^vector11:$/;" l -vector11 vectors.S /^vector11:$/;" l -vector110 kernel.asm /^vector110:$/;" l -vector110 vectors.S /^vector110:$/;" l -vector111 kernel.asm /^vector111:$/;" l -vector111 vectors.S /^vector111:$/;" l -vector112 kernel.asm /^vector112:$/;" l -vector112 vectors.S /^vector112:$/;" l -vector113 kernel.asm /^vector113:$/;" l -vector113 vectors.S /^vector113:$/;" l -vector114 kernel.asm /^vector114:$/;" l -vector114 vectors.S /^vector114:$/;" l -vector115 kernel.asm /^vector115:$/;" l -vector115 vectors.S /^vector115:$/;" l -vector116 kernel.asm /^vector116:$/;" l -vector116 vectors.S /^vector116:$/;" l -vector117 kernel.asm /^vector117:$/;" l -vector117 vectors.S /^vector117:$/;" l -vector118 kernel.asm /^vector118:$/;" l -vector118 vectors.S /^vector118:$/;" l -vector119 kernel.asm /^vector119:$/;" l -vector119 vectors.S /^vector119:$/;" l -vector12 kernel.asm /^vector12:$/;" l -vector12 vectors.S /^vector12:$/;" l -vector120 kernel.asm /^vector120:$/;" l -vector120 vectors.S /^vector120:$/;" l -vector121 kernel.asm /^vector121:$/;" l -vector121 vectors.S /^vector121:$/;" l -vector122 kernel.asm /^vector122:$/;" l -vector122 vectors.S /^vector122:$/;" l -vector123 kernel.asm /^vector123:$/;" l -vector123 vectors.S /^vector123:$/;" l -vector124 kernel.asm /^vector124:$/;" l -vector124 vectors.S /^vector124:$/;" l -vector125 kernel.asm /^vector125:$/;" l -vector125 vectors.S /^vector125:$/;" l -vector126 kernel.asm /^vector126:$/;" l -vector126 vectors.S /^vector126:$/;" l -vector127 kernel.asm /^vector127:$/;" l -vector127 vectors.S /^vector127:$/;" l -vector128 kernel.asm /^vector128:$/;" l -vector128 vectors.S /^vector128:$/;" l -vector129 kernel.asm /^vector129:$/;" l -vector129 vectors.S /^vector129:$/;" l -vector13 kernel.asm /^vector13:$/;" l -vector13 vectors.S /^vector13:$/;" l -vector130 kernel.asm /^vector130:$/;" l -vector130 vectors.S /^vector130:$/;" l -vector131 kernel.asm /^vector131:$/;" l -vector131 vectors.S /^vector131:$/;" l -vector132 kernel.asm /^vector132:$/;" l -vector132 vectors.S /^vector132:$/;" l -vector133 kernel.asm /^vector133:$/;" l -vector133 vectors.S /^vector133:$/;" l -vector134 kernel.asm /^vector134:$/;" l -vector134 vectors.S /^vector134:$/;" l -vector135 kernel.asm /^vector135:$/;" l -vector135 vectors.S /^vector135:$/;" l -vector136 kernel.asm /^vector136:$/;" l -vector136 vectors.S /^vector136:$/;" l -vector137 kernel.asm /^vector137:$/;" l -vector137 vectors.S /^vector137:$/;" l -vector138 kernel.asm /^vector138:$/;" l -vector138 vectors.S /^vector138:$/;" l -vector139 kernel.asm /^vector139:$/;" l -vector139 vectors.S /^vector139:$/;" l -vector14 kernel.asm /^vector14:$/;" l -vector14 vectors.S /^vector14:$/;" l -vector140 kernel.asm /^vector140:$/;" l -vector140 vectors.S /^vector140:$/;" l -vector141 kernel.asm /^vector141:$/;" l -vector141 vectors.S /^vector141:$/;" l -vector142 kernel.asm /^vector142:$/;" l -vector142 vectors.S /^vector142:$/;" l -vector143 kernel.asm /^vector143:$/;" l -vector143 vectors.S /^vector143:$/;" l -vector144 kernel.asm /^vector144:$/;" l -vector144 vectors.S /^vector144:$/;" l -vector145 kernel.asm /^vector145:$/;" l -vector145 vectors.S /^vector145:$/;" l -vector146 kernel.asm /^vector146:$/;" l -vector146 vectors.S /^vector146:$/;" l -vector147 kernel.asm /^vector147:$/;" l -vector147 vectors.S /^vector147:$/;" l -vector148 kernel.asm /^vector148:$/;" l -vector148 vectors.S /^vector148:$/;" l -vector149 kernel.asm /^vector149:$/;" l -vector149 vectors.S /^vector149:$/;" l -vector15 kernel.asm /^vector15:$/;" l -vector15 vectors.S /^vector15:$/;" l -vector150 kernel.asm /^vector150:$/;" l -vector150 vectors.S /^vector150:$/;" l -vector151 kernel.asm /^vector151:$/;" l -vector151 vectors.S /^vector151:$/;" l -vector152 kernel.asm /^vector152:$/;" l -vector152 vectors.S /^vector152:$/;" l -vector153 kernel.asm /^vector153:$/;" l -vector153 vectors.S /^vector153:$/;" l -vector154 kernel.asm /^vector154:$/;" l -vector154 vectors.S /^vector154:$/;" l -vector155 kernel.asm /^vector155:$/;" l -vector155 vectors.S /^vector155:$/;" l -vector156 kernel.asm /^vector156:$/;" l -vector156 vectors.S /^vector156:$/;" l -vector157 kernel.asm /^vector157:$/;" l -vector157 vectors.S /^vector157:$/;" l -vector158 kernel.asm /^vector158:$/;" l -vector158 vectors.S /^vector158:$/;" l -vector159 kernel.asm /^vector159:$/;" l -vector159 vectors.S /^vector159:$/;" l -vector16 kernel.asm /^vector16:$/;" l -vector16 vectors.S /^vector16:$/;" l -vector160 kernel.asm /^vector160:$/;" l -vector160 vectors.S /^vector160:$/;" l -vector161 kernel.asm /^vector161:$/;" l -vector161 vectors.S /^vector161:$/;" l -vector162 kernel.asm /^vector162:$/;" l -vector162 vectors.S /^vector162:$/;" l -vector163 kernel.asm /^vector163:$/;" l -vector163 vectors.S /^vector163:$/;" l -vector164 kernel.asm /^vector164:$/;" l -vector164 vectors.S /^vector164:$/;" l -vector165 kernel.asm /^vector165:$/;" l -vector165 vectors.S /^vector165:$/;" l -vector166 kernel.asm /^vector166:$/;" l -vector166 vectors.S /^vector166:$/;" l -vector167 kernel.asm /^vector167:$/;" l -vector167 vectors.S /^vector167:$/;" l -vector168 kernel.asm /^vector168:$/;" l -vector168 vectors.S /^vector168:$/;" l -vector169 kernel.asm /^vector169:$/;" l -vector169 vectors.S /^vector169:$/;" l -vector17 kernel.asm /^vector17:$/;" l -vector17 vectors.S /^vector17:$/;" l -vector170 kernel.asm /^vector170:$/;" l -vector170 vectors.S /^vector170:$/;" l -vector171 kernel.asm /^vector171:$/;" l -vector171 vectors.S /^vector171:$/;" l -vector172 kernel.asm /^vector172:$/;" l -vector172 vectors.S /^vector172:$/;" l -vector173 kernel.asm /^vector173:$/;" l -vector173 vectors.S /^vector173:$/;" l -vector174 kernel.asm /^vector174:$/;" l -vector174 vectors.S /^vector174:$/;" l -vector175 kernel.asm /^vector175:$/;" l -vector175 vectors.S /^vector175:$/;" l -vector176 kernel.asm /^vector176:$/;" l -vector176 vectors.S /^vector176:$/;" l -vector177 kernel.asm /^vector177:$/;" l -vector177 vectors.S /^vector177:$/;" l -vector178 kernel.asm /^vector178:$/;" l -vector178 vectors.S /^vector178:$/;" l -vector179 kernel.asm /^vector179:$/;" l -vector179 vectors.S /^vector179:$/;" l -vector18 kernel.asm /^vector18:$/;" l -vector18 vectors.S /^vector18:$/;" l -vector180 kernel.asm /^vector180:$/;" l -vector180 vectors.S /^vector180:$/;" l -vector181 kernel.asm /^vector181:$/;" l -vector181 vectors.S /^vector181:$/;" l -vector182 kernel.asm /^vector182:$/;" l -vector182 vectors.S /^vector182:$/;" l -vector183 kernel.asm /^vector183:$/;" l -vector183 vectors.S /^vector183:$/;" l -vector184 kernel.asm /^vector184:$/;" l -vector184 vectors.S /^vector184:$/;" l -vector185 kernel.asm /^vector185:$/;" l -vector185 vectors.S /^vector185:$/;" l -vector186 kernel.asm /^vector186:$/;" l -vector186 vectors.S /^vector186:$/;" l -vector187 kernel.asm /^vector187:$/;" l -vector187 vectors.S /^vector187:$/;" l -vector188 kernel.asm /^vector188:$/;" l -vector188 vectors.S /^vector188:$/;" l -vector189 kernel.asm /^vector189:$/;" l -vector189 vectors.S /^vector189:$/;" l -vector19 kernel.asm /^vector19:$/;" l -vector19 vectors.S /^vector19:$/;" l -vector190 kernel.asm /^vector190:$/;" l -vector190 vectors.S /^vector190:$/;" l -vector191 kernel.asm /^vector191:$/;" l -vector191 vectors.S /^vector191:$/;" l -vector192 kernel.asm /^vector192:$/;" l -vector192 vectors.S /^vector192:$/;" l -vector193 kernel.asm /^vector193:$/;" l -vector193 vectors.S /^vector193:$/;" l -vector194 kernel.asm /^vector194:$/;" l -vector194 vectors.S /^vector194:$/;" l -vector195 kernel.asm /^vector195:$/;" l -vector195 vectors.S /^vector195:$/;" l -vector196 kernel.asm /^vector196:$/;" l -vector196 vectors.S /^vector196:$/;" l -vector197 kernel.asm /^vector197:$/;" l -vector197 vectors.S /^vector197:$/;" l -vector198 kernel.asm /^vector198:$/;" l -vector198 vectors.S /^vector198:$/;" l -vector199 kernel.asm /^vector199:$/;" l -vector199 vectors.S /^vector199:$/;" l -vector2 kernel.asm /^vector2:$/;" l -vector2 vectors.S /^vector2:$/;" l -vector20 kernel.asm /^vector20:$/;" l -vector20 vectors.S /^vector20:$/;" l -vector200 kernel.asm /^vector200:$/;" l -vector200 vectors.S /^vector200:$/;" l -vector201 kernel.asm /^vector201:$/;" l -vector201 vectors.S /^vector201:$/;" l -vector202 kernel.asm /^vector202:$/;" l -vector202 vectors.S /^vector202:$/;" l -vector203 kernel.asm /^vector203:$/;" l -vector203 vectors.S /^vector203:$/;" l -vector204 kernel.asm /^vector204:$/;" l -vector204 vectors.S /^vector204:$/;" l -vector205 kernel.asm /^vector205:$/;" l -vector205 vectors.S /^vector205:$/;" l -vector206 kernel.asm /^vector206:$/;" l -vector206 vectors.S /^vector206:$/;" l -vector207 kernel.asm /^vector207:$/;" l -vector207 vectors.S /^vector207:$/;" l -vector208 kernel.asm /^vector208:$/;" l -vector208 vectors.S /^vector208:$/;" l -vector209 kernel.asm /^vector209:$/;" l -vector209 vectors.S /^vector209:$/;" l -vector21 kernel.asm /^vector21:$/;" l -vector21 vectors.S /^vector21:$/;" l -vector210 kernel.asm /^vector210:$/;" l -vector210 vectors.S /^vector210:$/;" l -vector211 kernel.asm /^vector211:$/;" l -vector211 vectors.S /^vector211:$/;" l -vector212 kernel.asm /^vector212:$/;" l -vector212 vectors.S /^vector212:$/;" l -vector213 kernel.asm /^vector213:$/;" l -vector213 vectors.S /^vector213:$/;" l -vector214 kernel.asm /^vector214:$/;" l -vector214 vectors.S /^vector214:$/;" l -vector215 kernel.asm /^vector215:$/;" l -vector215 vectors.S /^vector215:$/;" l -vector216 kernel.asm /^vector216:$/;" l -vector216 vectors.S /^vector216:$/;" l -vector217 kernel.asm /^vector217:$/;" l -vector217 vectors.S /^vector217:$/;" l -vector218 kernel.asm /^vector218:$/;" l -vector218 vectors.S /^vector218:$/;" l -vector219 kernel.asm /^vector219:$/;" l -vector219 vectors.S /^vector219:$/;" l -vector22 kernel.asm /^vector22:$/;" l -vector22 vectors.S /^vector22:$/;" l -vector220 kernel.asm /^vector220:$/;" l -vector220 vectors.S /^vector220:$/;" l -vector221 kernel.asm /^vector221:$/;" l -vector221 vectors.S /^vector221:$/;" l -vector222 kernel.asm /^vector222:$/;" l -vector222 vectors.S /^vector222:$/;" l -vector223 kernel.asm /^vector223:$/;" l -vector223 vectors.S /^vector223:$/;" l -vector224 kernel.asm /^vector224:$/;" l -vector224 vectors.S /^vector224:$/;" l -vector225 kernel.asm /^vector225:$/;" l -vector225 vectors.S /^vector225:$/;" l -vector226 kernel.asm /^vector226:$/;" l -vector226 vectors.S /^vector226:$/;" l -vector227 kernel.asm /^vector227:$/;" l -vector227 vectors.S /^vector227:$/;" l -vector228 kernel.asm /^vector228:$/;" l -vector228 vectors.S /^vector228:$/;" l -vector229 kernel.asm /^vector229:$/;" l -vector229 vectors.S /^vector229:$/;" l -vector23 kernel.asm /^vector23:$/;" l -vector23 vectors.S /^vector23:$/;" l -vector230 kernel.asm /^vector230:$/;" l -vector230 vectors.S /^vector230:$/;" l -vector231 kernel.asm /^vector231:$/;" l -vector231 vectors.S /^vector231:$/;" l -vector232 kernel.asm /^vector232:$/;" l -vector232 vectors.S /^vector232:$/;" l -vector233 kernel.asm /^vector233:$/;" l -vector233 vectors.S /^vector233:$/;" l -vector234 kernel.asm /^vector234:$/;" l -vector234 vectors.S /^vector234:$/;" l -vector235 kernel.asm /^vector235:$/;" l -vector235 vectors.S /^vector235:$/;" l -vector236 kernel.asm /^vector236:$/;" l -vector236 vectors.S /^vector236:$/;" l -vector237 kernel.asm /^vector237:$/;" l -vector237 vectors.S /^vector237:$/;" l -vector238 kernel.asm /^vector238:$/;" l -vector238 vectors.S /^vector238:$/;" l -vector239 kernel.asm /^vector239:$/;" l -vector239 vectors.S /^vector239:$/;" l -vector24 kernel.asm /^vector24:$/;" l -vector24 vectors.S /^vector24:$/;" l -vector240 kernel.asm /^vector240:$/;" l -vector240 vectors.S /^vector240:$/;" l -vector241 kernel.asm /^vector241:$/;" l -vector241 vectors.S /^vector241:$/;" l -vector242 kernel.asm /^vector242:$/;" l -vector242 vectors.S /^vector242:$/;" l -vector243 kernel.asm /^vector243:$/;" l -vector243 vectors.S /^vector243:$/;" l -vector244 kernel.asm /^vector244:$/;" l -vector244 vectors.S /^vector244:$/;" l -vector245 kernel.asm /^vector245:$/;" l -vector245 vectors.S /^vector245:$/;" l -vector246 kernel.asm /^vector246:$/;" l -vector246 vectors.S /^vector246:$/;" l -vector247 kernel.asm /^vector247:$/;" l -vector247 vectors.S /^vector247:$/;" l -vector248 kernel.asm /^vector248:$/;" l -vector248 vectors.S /^vector248:$/;" l -vector249 kernel.asm /^vector249:$/;" l -vector249 vectors.S /^vector249:$/;" l -vector25 kernel.asm /^vector25:$/;" l -vector25 vectors.S /^vector25:$/;" l -vector250 kernel.asm /^vector250:$/;" l -vector250 vectors.S /^vector250:$/;" l -vector251 kernel.asm /^vector251:$/;" l -vector251 vectors.S /^vector251:$/;" l -vector252 kernel.asm /^vector252:$/;" l -vector252 vectors.S /^vector252:$/;" l -vector253 kernel.asm /^vector253:$/;" l -vector253 vectors.S /^vector253:$/;" l -vector254 kernel.asm /^vector254:$/;" l -vector254 vectors.S /^vector254:$/;" l -vector255 kernel.asm /^vector255:$/;" l -vector255 vectors.S /^vector255:$/;" l -vector26 kernel.asm /^vector26:$/;" l -vector26 vectors.S /^vector26:$/;" l -vector27 kernel.asm /^vector27:$/;" l -vector27 vectors.S /^vector27:$/;" l -vector28 kernel.asm /^vector28:$/;" l -vector28 vectors.S /^vector28:$/;" l -vector29 kernel.asm /^vector29:$/;" l -vector29 vectors.S /^vector29:$/;" l -vector3 kernel.asm /^vector3:$/;" l -vector3 vectors.S /^vector3:$/;" l -vector30 kernel.asm /^vector30:$/;" l -vector30 vectors.S /^vector30:$/;" l -vector31 kernel.asm /^vector31:$/;" l -vector31 vectors.S /^vector31:$/;" l -vector32 kernel.asm /^vector32:$/;" l -vector32 vectors.S /^vector32:$/;" l -vector33 kernel.asm /^vector33:$/;" l -vector33 vectors.S /^vector33:$/;" l -vector34 kernel.asm /^vector34:$/;" l -vector34 vectors.S /^vector34:$/;" l -vector35 kernel.asm /^vector35:$/;" l -vector35 vectors.S /^vector35:$/;" l -vector36 kernel.asm /^vector36:$/;" l -vector36 vectors.S /^vector36:$/;" l -vector37 kernel.asm /^vector37:$/;" l -vector37 vectors.S /^vector37:$/;" l -vector38 kernel.asm /^vector38:$/;" l -vector38 vectors.S /^vector38:$/;" l -vector39 kernel.asm /^vector39:$/;" l -vector39 vectors.S /^vector39:$/;" l -vector4 kernel.asm /^vector4:$/;" l -vector4 vectors.S /^vector4:$/;" l -vector40 kernel.asm /^vector40:$/;" l -vector40 vectors.S /^vector40:$/;" l -vector41 kernel.asm /^vector41:$/;" l -vector41 vectors.S /^vector41:$/;" l -vector42 kernel.asm /^vector42:$/;" l -vector42 vectors.S /^vector42:$/;" l -vector43 kernel.asm /^vector43:$/;" l -vector43 vectors.S /^vector43:$/;" l -vector44 kernel.asm /^vector44:$/;" l -vector44 vectors.S /^vector44:$/;" l -vector45 kernel.asm /^vector45:$/;" l -vector45 vectors.S /^vector45:$/;" l -vector46 kernel.asm /^vector46:$/;" l -vector46 vectors.S /^vector46:$/;" l -vector47 kernel.asm /^vector47:$/;" l -vector47 vectors.S /^vector47:$/;" l -vector48 kernel.asm /^vector48:$/;" l -vector48 vectors.S /^vector48:$/;" l -vector49 kernel.asm /^vector49:$/;" l -vector49 vectors.S /^vector49:$/;" l -vector5 kernel.asm /^vector5:$/;" l -vector5 vectors.S /^vector5:$/;" l -vector50 kernel.asm /^vector50:$/;" l -vector50 vectors.S /^vector50:$/;" l -vector51 kernel.asm /^vector51:$/;" l -vector51 vectors.S /^vector51:$/;" l -vector52 kernel.asm /^vector52:$/;" l -vector52 vectors.S /^vector52:$/;" l -vector53 kernel.asm /^vector53:$/;" l -vector53 vectors.S /^vector53:$/;" l -vector54 kernel.asm /^vector54:$/;" l -vector54 vectors.S /^vector54:$/;" l -vector55 kernel.asm /^vector55:$/;" l -vector55 vectors.S /^vector55:$/;" l -vector56 kernel.asm /^vector56:$/;" l -vector56 vectors.S /^vector56:$/;" l -vector57 kernel.asm /^vector57:$/;" l -vector57 vectors.S /^vector57:$/;" l -vector58 kernel.asm /^vector58:$/;" l -vector58 vectors.S /^vector58:$/;" l -vector59 kernel.asm /^vector59:$/;" l -vector59 vectors.S /^vector59:$/;" l -vector6 kernel.asm /^vector6:$/;" l -vector6 vectors.S /^vector6:$/;" l -vector60 kernel.asm /^vector60:$/;" l -vector60 vectors.S /^vector60:$/;" l -vector61 kernel.asm /^vector61:$/;" l -vector61 vectors.S /^vector61:$/;" l -vector62 kernel.asm /^vector62:$/;" l -vector62 vectors.S /^vector62:$/;" l -vector63 kernel.asm /^vector63:$/;" l -vector63 vectors.S /^vector63:$/;" l -vector64 kernel.asm /^vector64:$/;" l -vector64 vectors.S /^vector64:$/;" l -vector65 kernel.asm /^vector65:$/;" l -vector65 vectors.S /^vector65:$/;" l -vector66 kernel.asm /^vector66:$/;" l -vector66 vectors.S /^vector66:$/;" l -vector67 kernel.asm /^vector67:$/;" l -vector67 vectors.S /^vector67:$/;" l -vector68 kernel.asm /^vector68:$/;" l -vector68 vectors.S /^vector68:$/;" l -vector69 kernel.asm /^vector69:$/;" l -vector69 vectors.S /^vector69:$/;" l -vector7 kernel.asm /^vector7:$/;" l -vector7 vectors.S /^vector7:$/;" l -vector70 kernel.asm /^vector70:$/;" l -vector70 vectors.S /^vector70:$/;" l -vector71 kernel.asm /^vector71:$/;" l -vector71 vectors.S /^vector71:$/;" l -vector72 kernel.asm /^vector72:$/;" l -vector72 vectors.S /^vector72:$/;" l -vector73 kernel.asm /^vector73:$/;" l -vector73 vectors.S /^vector73:$/;" l -vector74 kernel.asm /^vector74:$/;" l -vector74 vectors.S /^vector74:$/;" l -vector75 kernel.asm /^vector75:$/;" l -vector75 vectors.S /^vector75:$/;" l -vector76 kernel.asm /^vector76:$/;" l -vector76 vectors.S /^vector76:$/;" l -vector77 kernel.asm /^vector77:$/;" l -vector77 vectors.S /^vector77:$/;" l -vector78 kernel.asm /^vector78:$/;" l -vector78 vectors.S /^vector78:$/;" l -vector79 kernel.asm /^vector79:$/;" l -vector79 vectors.S /^vector79:$/;" l -vector8 kernel.asm /^vector8:$/;" l -vector8 vectors.S /^vector8:$/;" l -vector80 kernel.asm /^vector80:$/;" l -vector80 vectors.S /^vector80:$/;" l -vector81 kernel.asm /^vector81:$/;" l -vector81 vectors.S /^vector81:$/;" l -vector82 kernel.asm /^vector82:$/;" l -vector82 vectors.S /^vector82:$/;" l -vector83 kernel.asm /^vector83:$/;" l -vector83 vectors.S /^vector83:$/;" l -vector84 kernel.asm /^vector84:$/;" l -vector84 vectors.S /^vector84:$/;" l -vector85 kernel.asm /^vector85:$/;" l -vector85 vectors.S /^vector85:$/;" l -vector86 kernel.asm /^vector86:$/;" l -vector86 vectors.S /^vector86:$/;" l -vector87 kernel.asm /^vector87:$/;" l -vector87 vectors.S /^vector87:$/;" l -vector88 kernel.asm /^vector88:$/;" l -vector88 vectors.S /^vector88:$/;" l -vector89 kernel.asm /^vector89:$/;" l -vector89 vectors.S /^vector89:$/;" l -vector9 kernel.asm /^vector9:$/;" l -vector9 vectors.S /^vector9:$/;" l -vector90 kernel.asm /^vector90:$/;" l -vector90 vectors.S /^vector90:$/;" l -vector91 kernel.asm /^vector91:$/;" l -vector91 vectors.S /^vector91:$/;" l -vector92 kernel.asm /^vector92:$/;" l -vector92 vectors.S /^vector92:$/;" l -vector93 kernel.asm /^vector93:$/;" l -vector93 vectors.S /^vector93:$/;" l -vector94 kernel.asm /^vector94:$/;" l -vector94 vectors.S /^vector94:$/;" l -vector95 kernel.asm /^vector95:$/;" l -vector95 vectors.S /^vector95:$/;" l -vector96 kernel.asm /^vector96:$/;" l -vector96 vectors.S /^vector96:$/;" l -vector97 kernel.asm /^vector97:$/;" l -vector97 vectors.S /^vector97:$/;" l -vector98 kernel.asm /^vector98:$/;" l -vector98 vectors.S /^vector98:$/;" l -vector99 kernel.asm /^vector99:$/;" l -vector99 vectors.S /^vector99:$/;" l -vectors vectors.S /^vectors:$/;" l version elf.h /^ uint version;$/;" m struct:elfhdr version mp.h /^ uchar version; \/\/ I\/O APIC version$/;" m struct:mpioapic version mp.h /^ uchar version; \/\/ [14]$/;" m struct:mpconf version mp.h /^ uchar version; \/\/ local APIC verison$/;" m struct:mpproc virt vm.c /^ void *virt;$/;" m struct:kmap file: -void bootblock.asm /^void readseg(uchar*, uint, uint);$/;" l -void bootblock.asm /^void$/;" l void cat.asm /^void$/;" l void echo.asm /^void$/;" l -void forktest.asm /^void$/;" l -void grep.asm /^void$/;" l -void init.asm /^void$/;" l -void kernel.asm /^void cmostime(struct rtcdate *r)$/;" l -void kernel.asm /^void$/;" l -void kill.asm /^void$/;" l -void ln.asm /^void$/;" l -void ls.asm /^void$/;" l -void mkdir.asm /^void$/;" l -void my_userapp.asm /^void$/;" l -void rm.asm /^void$/;" l -void sh.asm /^void$/;" l -void stressfs.asm /^void$/;" l -void test_master.asm /^void$/;" l -void test_mlfq.asm /^void$/;" l -void test_sample.asm /^void$/;" l -void test_stride.asm /^void$/;" l -void usertests.asm /^void argptest()$/;" l -void usertests.asm /^void dirtest(void)$/;" l -void usertests.asm /^void$/;" l -void wc.asm /^void$/;" l -void zombie.asm /^void$/;" l -w console.c /^ uint w; \/\/ Write index$/;" m struct:__anon8 file: +w console.c /^ uint w; \/\/ Write index$/;" m struct:__anon6 file: wait proc.c /^wait(void)$/;" f waitdisk bootmain.c /^waitdisk(void)$/;" f wakeup proc.c /^wakeup(void *chan)$/;" f @@ -4625,56 +1297,17 @@ writei fs.c /^writei(struct inode *ip, char *src, uint off, uint n)$/;" f writeopen pipe.c /^ int writeopen; \/\/ write fd is still open$/;" m struct:pipe file: writetest usertests.c /^writetest(void)$/;" f writetest1 usertests.c /^writetest1(void)$/;" f -wrv kernel.asm /^ wrv = (ushort*)P2V((0x40<<4 | 0x67)); \/\/ Warm reset vector$/;" d wsect mkfs.c /^wsect(uint sec, void *buf)$/;" f x cat.asm /^ x = -xx;$/;" d x cat.asm /^ x = xx;$/;" d x echo.asm /^ x = -xx;$/;" d x echo.asm /^ x = xx;$/;" d -x grep.asm /^ x = -xx;$/;" d -x grep.asm /^ x = xx;$/;" d -x init.asm /^ x = -xx;$/;" d -x init.asm /^ x = xx;$/;" d -x kernel.asm /^ x = -xx;$/;" d -x kernel.asm /^ x = xx;$/;" d -x kill.asm /^ x = -xx;$/;" d -x kill.asm /^ x = xx;$/;" d -x ln.asm /^ x = -xx;$/;" d -x ln.asm /^ x = xx;$/;" d -x ls.asm /^ x = -xx;$/;" d -x ls.asm /^ x = xx;$/;" d -x mkdir.asm /^ x = -xx;$/;" d -x mkdir.asm /^ x = xx;$/;" d -x my_userapp.asm /^ x = -xx;$/;" d -x my_userapp.asm /^ x = xx;$/;" d -x rm.asm /^ x = -xx;$/;" d -x rm.asm /^ x = xx;$/;" d -x sh.asm /^ x = -xx;$/;" d -x sh.asm /^ x = xx;$/;" d -x stressfs.asm /^ x = -xx;$/;" d -x stressfs.asm /^ x = xx;$/;" d -x test_master.asm /^ x = -xx;$/;" d -x test_master.asm /^ x = xx;$/;" d -x test_mlfq.asm /^ x = -xx;$/;" d -x test_mlfq.asm /^ x = xx;$/;" d -x test_sample.asm /^ x = -xx;$/;" d -x test_sample.asm /^ x = xx;$/;" d -x test_stride.asm /^ x = -xx;$/;" d -x test_stride.asm /^ x = xx;$/;" d x umalloc.c /^ Align x;$/;" m union:header file: -x usertests.asm /^ x = -xx;$/;" d -x usertests.asm /^ x = x * 1103515245 + 12345;$/;" d -x usertests.asm /^ x = xx;$/;" d -x wc.asm /^ x = -xx;$/;" d -x wc.asm /^ x = xx;$/;" d -x zombie.asm /^ x = -xx;$/;" d -x zombie.asm /^ x = xx;$/;" d xchecksum mp.h /^ uchar xchecksum; \/\/ extended table checksum$/;" m struct:mpconf xchg x86.h /^xchg(volatile uint *addr, uint newval)$/;" f xint mkfs.c /^xint(uint x)$/;" f xlength mp.h /^ ushort xlength; \/\/ extended table length$/;" m struct:mpconf xshort mkfs.c /^xshort(ushort x)$/;" f -xticks kernel.asm /^ xticks = ticks;$/;" d year date.h /^ uint year;$/;" m struct:rtcdate yield proc.c /^yield(void)$/;" f zeroes mkfs.c /^char zeroes[BSIZE];$/;" v diff --git a/threadtest.c b/threadtest.c new file mode 100644 index 0000000..997ee5e --- /dev/null +++ b/threadtest.c @@ -0,0 +1,696 @@ +#include "types.h" +#include "stat.h" +#include "user.h" + +#define NUM_THREAD 10 +#define NTEST 1 // 14 + +// Show race condition +int racingtest(void); + +// Test basic usage of thread_create, thread_join, thread_exit +int basictest(void); +int jointest1(void); +int jointest2(void); + +// Test whether a process can reuse the thread stack +int stresstest(void); + +// Test what happen when some threads exit while the others are alive +int exittest1(void); +int exittest2(void); + +// Test fork system call in multi-threaded environment +// int forktest(void); + +// Test exec system call in multi-threaded environment +int exectest(void); + +// Test what happen when threads requests sbrk concurrently +int sbrktest(void); + +// Test what happen when threads kill itself +int killtest(void); + +// Test pipe is worked in multi-threaded environment +int pipetest(void); + +// Test sleep system call in multi-threaded environment +int sleeptest(void); + +// Test behavior when we use set_cpu_share with thread +int stridetest1(void); +int stridetest2(void); + +int gcnt; +int gpipe[2]; + +int (*testfunc[NTEST])(void) = { + racingtest, +// basictest, +// jointest1, +// jointest2, +// stresstest, +// exittest1, +// exittest2, +// exectest, +// sbrktest, +// killtest, +// pipetest, +// sleeptest, +// stridetest1, +// stridetest2, +}; +char *testname[NTEST] = { + "racingtest", +// "basictest", +// "jointest1", +// "jointest2", +// "stresstest", +// "exittest1", +// "exittest2", +// "exectest", +// "sbrktest", +// "killtest", +// "pipetest", +// "sleeptest", +// "stridetest1", +// "stridetest2", +}; + +int +main(int argc, char *argv[]) +{ + int i; + int ret; + int pid; + int start = 0; + int end = NTEST-1; + if (argc >= 2) + start = atoi(argv[1]); + if (argc >= 3) + end = atoi(argv[2]); + + for (i = start; i <= end; i++){ + printf(1,"%d. %s start\n", i, testname[i]); + if (pipe(gpipe) < 0){ + printf(1,"pipe panic\n"); + exit(); + } + ret = 0; + + if ((pid = fork()) < 0){ + printf(1,"fork panic\n"); + exit(); + } + if (pid == 0){ + close(gpipe[0]); + ret = testfunc[i](); + write(gpipe[1], (char*)&ret, sizeof(ret)); + close(gpipe[1]); + exit(); + } else{ + close(gpipe[1]); + if (wait() == -1 || read(gpipe[0], (char*)&ret, sizeof(ret)) == -1 || ret != 0){ + printf(1,"%d. %s panic\n", i, testname[i]); + exit(); + } + close(gpipe[0]); + } + printf(1,"%d. %s finish\n", i, testname[i]); + sleep(100); + } + exit(); +} + +// ============================================================================ +void nop(){ } + +void* +racingthreadmain(void *arg) +{ + int tid = (int) arg; + int i; + int tmp; + printf(1, "thread %d on running", tid); + for (i = 0; i < 10000000; i++){ + tmp = gcnt; + tmp++; + nop(); + gcnt = tmp; + printf(1, "thread : %d, i : %d", tid, i); + } + thread_exit((void *)(tid+1)); + exit(); +} + +int +racingtest(void) +{ + thread_t threads[NUM_THREAD]; + int i; + void *retval; + gcnt = 0; + + for (i = 0; i < NUM_THREAD; i++){ + if (thread_create(&threads[i], racingthreadmain, (void*)i) != 0){ + printf(1, "panic at thread_create\n"); + return -1; + } + } + sleep(5000); + for (i = 0; i < NUM_THREAD; i++){ + if (thread_join(threads[i], &retval) != 0 || (int)retval != i+1){ + printf(1, "panic at thread_join\n"); + return -1; + } + } + printf(1,"%d\n", gcnt); + return 0; +} +// +//// ============================================================================ +//void* +//basicthreadmain(void *arg) +//{ +// int tid = (int) arg; +// int i; +// for (i = 0; i < 100000000; i++){ +// if (i % 20000000 == 0){ +// printf(1, "%d", tid); +// } +// } +// thread_exit((void *)(tid+1)); +//} +// +//int +//basictest(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// void *retval; +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], basicthreadmain, (void*)i) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0 || (int)retval != i+1){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// printf(1,"\n"); +// return 0; +//} +// +//// ============================================================================ +// +//void* +//jointhreadmain(void *arg) +//{ +// int val = (int)arg; +// sleep(200); +// printf(1, "thread_exit...\n"); +// thread_exit((void *)(val*2)); +//} +// +//int +//jointest1(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// void *retval; +// +// for (i = 1; i <= NUM_THREAD; i++){ +// if (thread_create(&threads[i-1], jointhreadmain, (void*)i) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// printf(1, "thread_join!!!\n"); +// for (i = 1; i <= NUM_THREAD; i++){ +// if (thread_join(threads[i-1], &retval) != 0 || (int)retval != i * 2 ){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// printf(1,"\n"); +// return 0; +//} +// +//int +//jointest2(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// void *retval; +// +// for (i = 1; i <= NUM_THREAD; i++){ +// if (thread_create(&threads[i-1], jointhreadmain, (void*)(i)) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// sleep(500); +// printf(1, "thread_join!!!\n"); +// for (i = 1; i <= NUM_THREAD; i++){ +// if (thread_join(threads[i-1], &retval) != 0 || (int)retval != i * 2 ){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// printf(1,"\n"); +// return 0; +//} +// +//// ============================================================================ +// +//void* +//stressthreadmain(void *arg) +//{ +// thread_exit(0); +//} +// +//int +//stresstest(void) +//{ +// const int nstress = 35000; +// thread_t threads[NUM_THREAD]; +// int i, n; +// void *retval; +// +// for (n = 1; n <= nstress; n++){ +// if (n % 1000 == 0) +// printf(1, "%d\n", n); +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], stressthreadmain, (void*)i) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// } +// printf(1, "\n"); +// return 0; +//} +// +//// ============================================================================ +// +//void* +//exitthreadmain(void *arg) +//{ +// int i; +// if ((int)arg == 1){ +// while(1){ +// printf(1, "thread_exit ...\n"); +// for (i = 0; i < 5000000; i++); +// } +// } else if ((int)arg == 2){ +// exit(); +// } +// thread_exit(0); +//} +// +//int +//exittest1(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], exitthreadmain, (void*)1) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// sleep(1); +// return 0; +//} +// +//int +//exittest2(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], exitthreadmain, (void*)2) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// while(1); +// return 0; +//} +// +//// ============================================================================ +// +//void* +//execthreadmain(void *arg) +//{ +// char *args[3] = {"echo", "echo is executed!", 0}; +// sleep(1); +// exec("echo", args); +// +// printf(1, "panic at execthreadmain\n"); +// exit(); +//} +// +//int +//exectest(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// void *retval; +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], execthreadmain, (void*)0) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// printf(1, "panic at exectest\n"); +// return 0; +//} +// +//// ============================================================================ +// +//void* +//sbrkthreadmain(void *arg) +//{ +// int tid = (int)arg; +// char *oldbrk; +// char *end; +// char *c; +// oldbrk = sbrk(1000); +// end = oldbrk + 1000; +// for (c = oldbrk; c < end; c++){ +// *c = tid+1; +// } +// sleep(1); +// for (c = oldbrk; c < end; c++){ +// if (*c != tid+1){ +// printf(1, "panic at sbrkthreadmain\n"); +// exit(); +// } +// } +// thread_exit(0); +//} +// +//int +//sbrktest(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// void *retval; +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], sbrkthreadmain, (void*)i) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// +// return 0; +//} +// +//// ============================================================================ +// +//void* +//killthreadmain(void *arg) +//{ +// kill(getpid()); +// while(1); +//} +// +//int +//killtest(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// void *retval; +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], killthreadmain, (void*)i) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// while(1); +// return 0; +//} +// +//// ============================================================================ +// +//void* +//pipethreadmain(void *arg) +//{ +// int type = ((int*)arg)[0]; +// int *fd = (int*)arg+1; +// int i; +// int input; +// for (i = -5; i <= 5; i++){ +// if (type){ +// read(fd[0], &input, sizeof(int)); +// __sync_fetch_and_add(&gcnt, input); +// //gcnt += input; +// } else{ +// write(fd[1], &i, sizeof(int)); +// } +// } +// thread_exit(0); +//} +// +//int +//pipetest(void) +//{ +// thread_t threads[NUM_THREAD]; +// int arg[3]; +// int fd[2]; +// int i; +// void *retval; +// int pid; +// +// if (pipe(fd) < 0){ +// printf(1, "panic at pipe in pipetest\n"); +// return -1; +// } +// arg[1] = fd[0]; +// arg[2] = fd[1]; +// if ((pid = fork()) < 0){ +// printf(1, "panic at fork in pipetest\n"); +// return -1; +// } else if (pid == 0){ +// close(fd[0]); +// arg[0] = 0; +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], pipethreadmain, (void*)arg) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// close(fd[1]); +// exit(); +// } else{ +// close(fd[1]); +// arg[0] = 1; +// gcnt = 0; +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], pipethreadmain, (void*)arg) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// close(fd[0]); +// } +// if (wait() == -1){ +// printf(1, "panic at wait in pipetest\n"); +// return -1; +// } +// if (gcnt != 0) +// printf(1,"panic at validation in pipetest : %d\n", gcnt); +// +// return 0; +//} +// +//// ============================================================================ +// +//void* +//sleepthreadmain(void *arg) +//{ +// sleep(1000000); +// thread_exit(0); +//} +// +//int +//sleeptest(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], sleepthreadmain, (void*)i) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// sleep(10); +// return 0; +//} +// +//// ============================================================================ +// +//void* +//stridethreadmain(void *arg) +//{ +// int *flag = (int*)arg; +// int t; +// while(*flag){ +// while(*flag == 1){ +// for (t = 0; t < 5; t++); +// __sync_fetch_and_add(&gcnt, 1); +// } +// } +// thread_exit(0); +//} +// +//int +//stridetest1(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// int pid; +// int flag; +// void *retval; +// +// gcnt = 0; +// flag = 2; +// if ((pid = fork()) == -1){ +// printf(1, "panic at fork in forktest\n"); +// exit(); +// } else if (pid == 0){ +// set_cpu_share(50); +// } else{ +// set_cpu_share(10); +// } +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], stridethreadmain, (void*)&flag) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// flag = 1; +// sleep(500); +// flag = 0; +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// +// if (pid == 0){ +// printf(1, "50% : %d\n", gcnt); +// exit(); +// } else{ +// printf(1, "10% : %d\n", gcnt); +// if (wait() == -1){ +// printf(1, "panic at wait in forktest\n"); +// exit(); +// } +// } +// +// return 0; +//} +// +//int +//stridetest2(void) +//{ +// thread_t threads[NUM_THREAD]; +// int i; +// int pid; +// int flag; +// void *retval; +// +// gcnt = 0; +// flag = 2; +// if ((pid = fork()) == -1){ +// printf(1, "panic at fork in forktest\n"); +// exit(); +// } +// +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_create(&threads[i], stridethreadmain, (void*)&flag) != 0){ +// printf(1, "panic at thread_create\n"); +// return -1; +// } +// } +// if (pid == 0){ +// set_cpu_share(60); +// } else{ +// set_cpu_share(20); +// } +// flag = 1; +// sleep(500); +// flag = 0; +// for (i = 0; i < NUM_THREAD; i++){ +// if (thread_join(threads[i], &retval) != 0){ +// printf(1, "panic at thread_join\n"); +// return -1; +// } +// } +// +// if (pid == 0){ +// printf(1, "60% : %d\n", gcnt); +// exit(); +// } else{ +// printf(1, "20% : %d\n", gcnt); +// if (wait() == -1){ +// printf(1, "panic at wait in forktest\n"); +// exit(); +// } +// } +// +// return 0; +//} +// +//// ============================================================================ diff --git a/types.h b/types.h index e4adf64..f2e9ba0 100644 --- a/types.h +++ b/types.h @@ -2,3 +2,7 @@ typedef unsigned int uint; typedef unsigned short ushort; typedef unsigned char uchar; typedef uint pde_t; +typedef uint thread_t; + + + diff --git a/ulib.c b/ulib.c index 51a9e74..1f8518b 100644 --- a/ulib.c +++ b/ulib.c @@ -4,6 +4,44 @@ #include "user.h" #include "x86.h" +int +thread_create(thread_t *thread, void *(*start_routine)(void *), void *arg) +{ + void *stack = 0; + stack = malloc(4096); + + return clone(thread, start_routine, arg, stack); +} + +void* +malloc(uint nbytes) +{ + Header *p, *prevp; + uint nunits; + + nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; + if((prevp = freep) == 0){ + base.s.ptr = freep = prevp = &base; + base.s.size = 0; + } + for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ + if(p->s.size >= nunits){ + if(p->s.size == nunits) + prevp->s.ptr = p->s.ptr; + else { + p->s.size -= nunits; + p += p->s.size; + p->s.size = nunits; + } + freep = prevp; + return (void*)(p + 1); + } + if(p == freep) + if((p = morecore(nunits)) == 0) + return 0; + } +} + char* strcpy(char *s, char *t) { diff --git a/umalloc.c b/umalloc.c index a7e7d2c..d04e261 100644 --- a/umalloc.c +++ b/umalloc.c @@ -43,7 +43,7 @@ free(void *ap) freep = p; } -static Header* +Header* morecore(uint nu) { char *p; diff --git a/user.h b/user.h index 1bed21e..2af55ab 100644 --- a/user.h +++ b/user.h @@ -29,8 +29,12 @@ int set_cpu_share(int); int alarm(char*); int yield(void); int getlev(void); +int clone(thread_t *thread, void *(*start_routine)(void *), void *arg, void* stack); +void thread_exit(void *retval) __attribute__((noreturn)); +int thread_join(thread_t thread, void **retval); // ulib.c +int thread_create(thread_t *thread, void *(*start_routine)(void *), void *arg); int stat(char*, struct stat*); char* strcpy(char*, char*); void *memmove(void*, void*, int); diff --git a/usys.S b/usys.S index ed5e71b..828f9bb 100644 --- a/usys.S +++ b/usys.S @@ -35,3 +35,7 @@ SYSCALL(set_cpu_share) SYSCALL(alarm) SYSCALL(yield) SYSCALL(getlev) +SYSCALL(clone) +SYSCALL(thread_exit) +SYSCALL(thread_join) +