From c8febc54c8a684bdd9da5aae21dfe76785f87676 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 11 Sep 2004 23:35:30 +0000 Subject: [PATCH] Update initialization order. --- src/threads/init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/threads/init.c b/src/threads/init.c index 589a23e..4859d42 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -1,4 +1,5 @@ #include "threads/init.h" +#include #include #include #include @@ -53,10 +54,12 @@ int main (void) NO_RETURN; int main (void) { - /* Needed by printf(), so initialize them very early. */ + /* Initialize everything needed for printf() first. */ ram_init (); + thread_init (); vga_init (); serial_init_poll (); + console_init (); /* Greet user. */ printf ("Pintos booting with %'d kB RAM...\n", ram_pages * 4); @@ -65,7 +68,6 @@ main (void) argv_init (); /* Initialize memory system, segments, paging. */ - thread_init (); palloc_init (); paging_init (); #ifdef USERPROG @@ -74,7 +76,7 @@ main (void) #endif malloc_init (); - /* Set random seed if not already done. */ + /* Set random seed if argv_init() didn't. */ random_init (0); /* Initialize interrupt handlers. */ -- 2.30.2