Move problem 1-2 (join) into project 2 as the "wait" system call.
[pintos-anon] / src / threads / init.c
index b4b1057eb750fd290d7a02adbc752c073db7a210..f6a01dc67080688e44d3f45759c73745dcc75331 100644 (file)
@@ -120,11 +120,8 @@ main (void)
   /* Run a user program. */
   if (initial_program != NULL)
     {
-      tid_t tid;
       printf ("\nExecuting '%s':\n", initial_program);
-      tid = process_execute (initial_program);
-      if (tid != TID_ERROR)
-        thread_join (tid);
+      process_wait (process_execute (initial_program));
     }
 #else
   /* Run the compiled-in test function. */