Merge basic system calls with stack set-up infrastructure #27

Merged
td1223 merged 31 commits from user-programs into user-programs-stdout 2024-11-06 22:21:28 +00:00
5 changed files with 187 additions and 125 deletions
Showing only changes of commit 2dccd87a76 - Show all commits

View File

@@ -659,6 +659,8 @@ init_thread (struct thread *t, const char *name, int nice, int priority,
t->recent_cpu = recent_cpu;
t->priority = t->base_priority;
t->exit_status = -1;
old_level = intr_disable ();
list_push_back (&all_list, &t->allelem);
intr_set_level (old_level);

View File

@@ -111,6 +111,7 @@ struct thread
/* Shared between thread.c and synch.c. */
struct list_elem elem; /* List element. */
int exit_status; /* Exit Status: 0 = successful exit. */
#ifdef USERPROG
/* Owned by userprog/process.c. */