Various cleanup: - Got rid of dummy proc[0]. Now proc[0] is init. - Added initcode.S to exec /init, so that /init is just a regular binary. - Moved exec out of sysfile to exec.c - Moved code dealing with fs guts (like struct inode) from sysfile.c to fs.c. Code dealing with system call arguments stays in sysfile.c - Refactored directory routines in fs.c; should be simpler. - Changed iget to return *unlocked* inode structure. This solves the lookup-then-use race in namei without introducing deadlocks. It also enabled getting rid of the dummy proc[0].
Showing
- BUGS 19 additions, 5 deletionsBUGS
- Makefile 9 additions, 4 deletionsMakefile
- defs.h 7 additions, 1 deletiondefs.h
- exec.c 136 additions, 0 deletionsexec.c
- fs.c 148 additions, 105 deletionsfs.c
- fsvar.h 3 additions, 4 deletionsfsvar.h
- initcode.S 28 additions, 0 deletionsinitcode.S
- main.c 40 additions, 80 deletionsmain.c
- proc.c 23 additions, 27 deletionsproc.c
- string.c 10 additions, 0 deletionsstring.c
- syscall.c 0 additions, 1 deletionsyscall.c
- sysfile.c 32 additions, 187 deletionssysfile.c
Loading
Please register or sign in to comment