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 167 additions and 26 deletions
Showing only changes of commit e40794e672 - Show all commits

View File

@@ -340,6 +340,9 @@ fd_get_file (int fd)
struct hash_elem *e struct hash_elem *e
= hash_find (&thread_current ()->open_files, &fake_file_info.elem); = hash_find (&thread_current ()->open_files, &fake_file_info.elem);
if (e == NULL)
return NULL;
return hash_entry (e, struct open_file, elem); return hash_entry (e, struct open_file, elem);
} }