Call serial_flush() in power_off().
[pintos-anon] / src / threads / init.c
index 155ccae6adf1f2b50d2450bb6739a6b183c28498..26b9345879c1848ce1d7321ea6e68160854e022f 100644 (file)
@@ -21,6 +21,7 @@
 #include "threads/test.h"
 #include "threads/thread.h"
 #ifdef USERPROG
+#include "userprog/process.h"
 #include "userprog/exception.h"
 #include "userprog/gdt.h"
 #include "userprog/syscall.h"
@@ -112,7 +113,7 @@ main (void)
   if (initial_program != NULL)
     {
       printf ("\nExecuting '%s':\n", initial_program);
-      thread_execute (initial_program); 
+      process_execute (initial_program); 
     }
 #else
   test ();
@@ -277,6 +278,8 @@ power_off (void)
 #endif
 
   printf ("Powering off...\n");
+  serial_flush ();
+
   for (p = s; *p != '\0'; p++)
     outb (0x8900, *p);
   for (;;);