Combine syscall code with final stack initialization code #32

Merged
td1223 merged 27 commits from read-only-exec into userprog-merge 2024-11-11 22:23:20 +00:00
4 changed files with 170 additions and 26 deletions
Showing only changes of commit 115c650c55 - Show all commits

View File

@@ -238,7 +238,10 @@ thread_create (const char *name, int priority,
struct thread *parent_thread = thread_current ();
init_thread (t, name, parent_thread->nice, priority, parent_thread->recent_cpu);
tid = t->tid = allocate_tid ();
#ifdef USERPROG
hash_init (&t->open_files, fd_hash, fd_less, NULL);
#endif
/* Prepare thread for first run by initializing its stack.
Do this atomically so intermediate values for the 'stack'