Cosmetic cleanup: fsinit reads sb and calls loginit. initialize icache
in main.c and don't make it disk specific; the icache is shared. This doesn't matter since we have only one disk, but conceptually cleaner and maybe helpful to students for mount lab.
This commit is contained in:
parent
a9953236cc
commit
2501560cd6
5 changed files with 21 additions and 18 deletions
|
|
@ -493,12 +493,11 @@ forkret(void)
|
|||
release(&myproc()->lock);
|
||||
|
||||
if (first) {
|
||||
// Some initialization functions must be run in the context
|
||||
// of a regular process (e.g., they call sleep), and thus cannot
|
||||
// File system initialization must be run in the context of a
|
||||
// regular process (e.g., because it calls sleep), and thus cannot
|
||||
// be run from main().
|
||||
first = 0;
|
||||
iinit(ROOTDEV);
|
||||
initlog(ROOTDEV);
|
||||
fsinit(ROOTDEV);
|
||||
}
|
||||
|
||||
usertrapret();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue