Fix stack initialization to correctness of passing argument tests #28

Closed
td1223 wants to merge 6 commits from user-programs-stdout into user-programs
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 1ca9d09512 - Show all commits

View File

@@ -105,6 +105,7 @@ syscall_exit (int status)
{ {
/* Sets exit_status of the thread to status. thread_exit () will call /* Sets exit_status of the thread to status. thread_exit () will call
process_exit () if user programs are allowed. */ process_exit () if user programs are allowed. */
printf ("%s: exit(%d)\n", thread_current()->name, status);
thread_current ()->exit_status = status; thread_current ()->exit_status = status;
thread_exit (); thread_exit ();
} }