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 134 additions and 20 deletions
Showing only changes of commit b0c1923d44 - Show all commits

View File

@@ -106,7 +106,15 @@ start_process (void *file_name_)
push_to_stack (&if_.esp, arg, (strlen (arg) + 1) * sizeof (char)); push_to_stack (&if_.esp, arg, (strlen (arg) + 1) * sizeof (char));
struct arg_elem *arg_elem = malloc (sizeof (struct arg_elem)); struct arg_elem *arg_elem = malloc (sizeof (struct arg_elem));
ASSERT (arg_elem != NULL); if (arg_elem == NULL)
{
printf("ERROR: Couldn't allocate argument pointer memory for %s!\n",
file_name);
palloc_free_page (file_name_);
if (success) process_exit ();
thread_exit ();
}
arg_elem->arg = arg; arg_elem->arg = arg;
list_push_front (&arg_list, &arg_elem->elem); list_push_front (&arg_list, &arg_elem->elem);