#include "threads/test.h"
#include "threads/thread.h"
#ifdef USERPROG
-#include "userprog/addrspace.h"
+#include "userprog/process.h"
#include "userprog/exception.h"
#include "userprog/gdt.h"
#include "userprog/syscall.h"
/* Run a user program. */
if (initial_program != NULL)
{
+ tid_t tid;
printf ("\nExecuting '%s':\n", initial_program);
- addrspace_execute (initial_program);
+ tid = process_execute (initial_program);
+#ifdef THREAD_JOIN_IMPLEMENTED
+ if (tid != TID_ERROR)
+ thread_join (tid);
+#endif
}
#else
test ();
#endif
printf ("Powering off...\n");
+ serial_flush ();
+
for (p = s; *p != '\0'; p++)
outb (0x8900, *p);
for (;;);