Add a little demo/test code for the `threads' project.
[pintos-anon] / src / threads / init.c
index 35ce92a2e255c7b68865931877dba832c9ff048a..589a23efc5b0ec779068052dcbbaaa136f036200 100644 (file)
@@ -18,6 +18,7 @@
 #include "threads/mmu.h"
 #include "threads/paging.h"
 #include "threads/palloc.h"
+#include "threads/test.h"
 #include "threads/thread.h"
 #ifdef USERPROG
 #include "userprog/exception.h"
@@ -58,7 +59,7 @@ main (void)
   serial_init_poll ();
 
   /* Greet user. */
-  printf ("Booting cnachos86 with %'d kB RAM...\n", ram_pages * 4);
+  printf ("Pintos booting with %'d kB RAM...\n", ram_pages * 4);
 
   /* Parse command line. */
   argv_init ();
@@ -105,6 +106,8 @@ main (void)
       printf ("\nExecuting '%s':\n", initial_program);
       thread_execute (initial_program); 
     }
+#else
+  test ();
 #endif
 
   /* Terminate this thread. */