Use a single exit_status instead of two

This commit is contained in:
2024-11-15 17:20:51 +00:00
parent e76712d3fd
commit 8567434231
4 changed files with 12 additions and 21 deletions

View File

@@ -131,7 +131,7 @@ syscall_exit (int status)
{
/* Sets exit_status of the thread to status. thread_exit () will call
process_exit () if user programs are allowed. */
thread_current ()->exit_status = status;
thread_current ()->result->exit_status = status;
thread_exit ();
}
@@ -271,7 +271,7 @@ syscall_read (int fd, void *buffer, unsigned size)
{
/* Reading from the console. */
char *write_buffer = buffer;
for (int i = 0; i < size; i++)
for (unsigned i = 0; i < size; i++)
write_buffer[i] = input_getc ();
/* In case of console, read is always (eventually) successful. So return