From eb458efa59d65cc2b06011c78cd3b9e126e2b495 Mon Sep 17 00:00:00 2001 From: Themis Demetriades Date: Sun, 3 Nov 2024 17:38:38 +0000 Subject: [PATCH] Update process_wait skeleton to loop infinitely for testing purposes --- src/userprog/process.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/userprog/process.c b/src/userprog/process.c index 49b9bd5..fdcf2c4 100644 --- a/src/userprog/process.c +++ b/src/userprog/process.c @@ -17,6 +17,7 @@ #include "threads/palloc.h" #include "threads/thread.h" #include "threads/vaddr.h" +#include "threads/synch.h" static thread_func start_process NO_RETURN; static bool load (const char *cmdline, void (**eip) (void), void **esp); @@ -88,7 +89,12 @@ start_process (void *file_name_) int process_wait (tid_t child_tid UNUSED) { - return -1; + /* TODO: Implement correct process waiting behaviour. + Currently an infinite loop for testing purposes. */ + while (1) + { + barrier (); + } } /* Free the current process's resources. */