From 2501560cd691fcdb9c310dccc14ac4e7486c99d9 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Sun, 18 Aug 2019 14:35:11 -0400 Subject: 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. --- kernel/proc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'kernel/proc.c') diff --git a/kernel/proc.c b/kernel/proc.c index 1f6bfcc..3d65b46 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -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(); -- cgit v1.2.3