Implement complete stack initialization, process_wait, and all system calls correctly except exec #34

Merged
td1223 merged 46 commits from userprog-merge into master 2024-11-11 22:56:29 +00:00
4 changed files with 9 additions and 8 deletions
Showing only changes of commit b866fa88cd - Show all commits

View File

@@ -81,12 +81,12 @@ start_process (void *file_name_)
char *saveptr; char *saveptr;
char *arg = strtok_r (file_name_, " ", &saveptr); char *arg = strtok_r (file_name_, " ", &saveptr);
char file_name[15]; char file_name[FNAME_MAX_LEN + 1];
strlcpy (file_name, arg, 15); strlcpy (file_name, arg, FNAME_MAX_LEN + 1);
/* TODO: Move naming of thread to process_execute, so start /* TODO: Move naming of thread to process_execute, so start
tokenizing there. */ tokenizing there. */
strlcpy (thread_current ()->name, file_name, 15); strlcpy (thread_current ()->name, file_name, FNAME_MAX_LEN + 1);
/* Initialize interrupt frame and load executable. */ /* Initialize interrupt frame and load executable. */
memset (&if_, 0, sizeof if_); memset (&if_, 0, sizeof if_);