X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fthreads%2Finit.c;h=4859d425d712df888229d10c9dda4c539210f163;hp=589a23efc5b0ec779068052dcbbaaa136f036200;hb=c8febc54c8a684bdd9da5aae21dfe76785f87676;hpb=b042250507edf37e2d610aa202008e715aa0db8e 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. */