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