Skip to content
Snippets Groups Projects
Commit 4b0256bd authored by a2-stratford's avatar a2-stratford
Browse files

Merge branch 'Alex/6-Implement-populate-stack-process' of...

Merge branch 'Alex/6-Implement-populate-stack-process' of https://gitlab.uwe.ac.uk/project-purple-stallion/Pintos into Alex/6-Implement-populate-stack-process
parents 00305475 da5c6367
Branches
No related tags found
1 merge request!5Alex/6 implement populate stack process
......@@ -17,6 +17,6 @@ int parse_arguments(const char* command_line, char***argv);
* I have used stackPointer as the name as that makes sense inside populate_stack,
* In process.c esp has been renamed to initialStackPointer
*/
void populate_stack(void* stackPointer, int argc, char** argv);
void populate_stack(void** stackPointer, int argc, char** argv);
#endif /* userprog/argument_parsing.h */
......@@ -68,7 +68,7 @@ start_process (void *file_name_)
if_.cs = SEL_UCSEG;
if_.eflags = FLAG_IF | FLAG_MBS;
success = load (file_name, &if_.eip, &if_.initialStackPointer);
success = load (file_name, &if_.eip, &if_.esp);
/* If load failed, quit. */
palloc_free_page (file_name);
......@@ -228,7 +228,7 @@ load (const char *file_name, void (**eip) (void), void **initialStackPointer)
struct thread *t = thread_current ();
struct Elf32_Ehdr ehdr;
struct file * = NULL;
off_t file_ofs;file
off_t file_ofs;
bool success = false;
int i;
......@@ -456,7 +456,6 @@ setup_stack (void **initialStackPointer, char **argv, int argc)
success = install_page (((uint8_t *) PHYS_BASE) - PGSIZE, kpage, true);
if (success) {
*initialStackPointer = PHYS_BASE - 12;
arr[]
} else
palloc_free_page (kpage);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment