Randomize the bits that bitmap_scan() returns, to make student errors
[pintos-anon] / src / threads / init.c
index 57797be7dbdd023a351b04798ad6eebe7acf481a..ef82cb192083e398f1c859a2faaf403a8c35ff8e 100644 (file)
@@ -90,6 +90,9 @@ main (void)
   argv = read_command_line ();
   argv = parse_options (argv);
 
+  /* Set random seed if parse_options() didn't. */
+  random_init (0);
+
   /* Initialize memory system. */
   palloc_init ();
   malloc_init ();
@@ -101,9 +104,6 @@ main (void)
   gdt_init ();
 #endif
 
-  /* Set random seed if parse_options() didn't. */
-  random_init (0);
-
   /* Initialize interrupt handlers. */
   intr_init ();
   timer_init ();