Update process_init_tack saveptr argument name to cmd_savetpr for clarity

This commit is contained in:
Themis Demetriades
2024-11-10 11:33:29 +00:00
parent 6018c0f6ec
commit 795d81b7ad

View File

@@ -64,7 +64,7 @@ process_execute (const char *cmd)
return tid; return tid;
} }
static bool process_init_stack (char *saveptr, void **esp, char *file_name); static bool process_init_stack (char *cmd_saveptr, void **esp, char *file_name);
static void *push_to_stack (void **esp, void *data, size_t data_size); static void *push_to_stack (void **esp, void *data, size_t data_size);
/* A thread function that loads a user process and starts it /* A thread function that loads a user process and starts it
@@ -125,7 +125,7 @@ start_process (void *cmd)
/* Helper function that initializes the stack of a newly created /* Helper function that initializes the stack of a newly created
user process. Returns true if successful, false otherwise. */ user process. Returns true if successful, false otherwise. */
static bool static bool
process_init_stack (char *saveptr, void **esp, char *file_name) process_init_stack (char *cmd_saveptr, void **esp, char *file_name)
{ {
/* Load command line argument *data* to user process stack. /* Load command line argument *data* to user process stack.
This can't cause overflow due to enforcing that the size of This can't cause overflow due to enforcing that the size of
@@ -152,7 +152,7 @@ process_init_stack (char *saveptr, void **esp, char *file_name)
list_push_front (&arg_list, &arg_elem->elem); list_push_front (&arg_list, &arg_elem->elem);
arg_count++; arg_count++;
arg = strtok_r (NULL, " ", &saveptr); arg = strtok_r (NULL, " ", &cmd_saveptr);
} }
/* Calculate the remaining number of bytes that need to be written /* Calculate the remaining number of bytes that need to be written