Remove call to sema_self_test() from main().
[pintos-anon] / src / threads / init.c
index 453543f5ddde839e57f1904d0afd5907a9692374..477676e09c51fe655ab261194b8244cac4d9db0c 100644 (file)
@@ -14,6 +14,9 @@
 #include "thread.h"
 #include "timer.h"
 #include "vga.h"
+#ifdef FILESYS
+#include "filesys.h"
+#endif
 
 /* Size of kernel static code and data, in 4 kB pages. */
 size_t kernel_pages;
@@ -38,7 +41,7 @@ tfunc (void *aux UNUSED)
           printk ("%s exiting\n", thread_current ()->name);
           break;
         }
-      count = random_ulong () % 25 * 1000000;
+      count = random_ulong () % 25 * 10000;
       printk ("%s waiting %zu: ", thread_current ()->name, count);
       for (i = 0; i < count; i++);
       printk ("%s\n", thread_current ()->name);
@@ -78,16 +81,13 @@ main (void)
   intr_init ();
   timer_init ();
   kbd_init ();
-  intr_enable ();
-
-  thread_init ();
 
-#if 0
-  printk ("running semaphore test...  ");
-  sema_self_test ();
-  printk ("  done.\n");
+#ifdef FILESYS
+  filesys_init (false);
 #endif
 
+  thread_init ();
+
   {
     struct thread *t;
     int i;