Reformat stack initialization code to follow style for length and spacing

This commit is contained in:
Themis Demetriades
2024-11-11 21:20:53 +00:00
parent b8d358ecb2
commit 049fc5559c

View File

@@ -40,9 +40,9 @@ struct process_start_data
{
char *cmd; /* Pointer to a copy of the command used to execute the process.
Allocated a page that must be freed by process_start. */
char *cmd_saveptr; /* Value pointed to by 'saveptr' argument used by
successive calls to strtok_r to split 'cmd' into
tokens while maintaining state. */
char *cmd_saveptr; /* Value pointed to by 'saveptr' argument used by
successive calls to strtok_r to split 'cmd' into
tokens while maintaining state. */
char *file_name; /* Name of the file of the process to be started. */
};
@@ -88,7 +88,6 @@ process_execute (const char *cmd)
return tid;
}
static bool install_page (void *upage, void *kpage, bool writable);
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);
@@ -231,8 +230,9 @@ process_init_stack (char *cmd_saveptr, void **esp, char *file_name)
return true;
}
/* Helper function that pushes the first 'data_size' bytes stored in the
address '*data' into the stack given a pointer to the stack pointer '**esp'. */
/* Helper function that pushes the first 'data_size' bytes stored
in the address '*data' into the stack given a pointer to the
stack pointer '**esp'. */
static void *
push_to_stack (void **esp, void *data, size_t data_size)
{