Add support for some basic system calls and args handling correctly. #29

Merged
sb3923 merged 49 commits from system-calls into master 2024-11-07 19:36:30 +00:00
2 changed files with 97 additions and 21 deletions
Showing only changes of commit 6f9c911ebe - Show all commits

View File

@@ -118,6 +118,10 @@ start_process (void *file_name_)
/* TODO: Allocate an extra page for the rest of the process stack. */ /* TODO: Allocate an extra page for the rest of the process stack. */
} }
/* Align stack pointer to word size before pushing argv elements for
performance. */
if_.esp -= align_size * sizeof (uint8_t);
/* Push pointers to process arguments from argument linked list */ /* Push pointers to process arguments from argument linked list */
struct list_elem *e = list_begin (&arg_list); struct list_elem *e = list_begin (&arg_list);
struct list_elem *tail = list_tail (&arg_list); struct list_elem *tail = list_tail (&arg_list);