From 5aac37d1674dfc5b3b32ea5c53b5d80376283914 Mon Sep 17 00:00:00 2001 From: sBubshait Date: Tue, 5 Nov 2024 23:28:17 +0000 Subject: [PATCH] Add temporary fixes to process_wait and setup stack, w/ E --- src/userprog/process.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/userprog/process.c b/src/userprog/process.c index 49b9bd5..c9f6339 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -14,6 +14,7 @@ #include "threads/flags.h" #include "threads/init.h" #include "threads/interrupt.h" +#include "threads/synch.h" #include "threads/palloc.h" #include "threads/thread.h" #include "threads/vaddr.h" @@ -88,7 +89,8 @@ start_process (void *file_name_) int process_wait (tid_t child_tid UNUSED) { - return -1; + for (;;) + barrier (); } /* Free the current process's resources. */ @@ -451,7 +453,7 @@ setup_stack (void **esp) { success = install_page (((uint8_t *) PHYS_BASE) - PGSIZE, kpage, true); if (success) - *esp = PHYS_BASE; + *esp = PHYS_BASE - 12; else palloc_free_page (kpage); }