#include "threads/init.h"
+#include <console.h>
#include <debug.h>
#include <limits.h>
#include <random.h>
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);
argv_init ();
/* Initialize memory system, segments, paging. */
- thread_init ();
palloc_init ();
paging_init ();
#ifdef USERPROG
#endif
malloc_init ();
- /* Set random seed if not already done. */
+ /* Set random seed if argv_init() didn't. */
random_init (0);
/* Initialize interrupt handlers. */