X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=solutions%2Fp2.patch;h=83d91fe22d7c2776869a1e268b21fdc1d454b988;hb=af9c2002e29df71e9dcba3cfec7ba8284d7cef82;hp=9022ac98b9eebaced38d2e77e4dfa40a1efcf8dd;hpb=9fd2be23e4d5255d3e89d4dc07c60e1ddf2aa377;p=pintos-anon diff --git a/solutions/p2.patch b/solutions/p2.patch index 9022ac9..83d91fe 100644 --- a/solutions/p2.patch +++ b/solutions/p2.patch @@ -122,10 +122,10 @@ diff -u src/userprog/process.c~ src/userprog/process.c @@ -14,11 +14,23 @@ #include "threads/init.h" #include "threads/interrupt.h" - #include "threads/mmu.h" +#include "threads/malloc.h" #include "threads/palloc.h" #include "threads/thread.h" + #include "threads/vaddr.h" static thread_func execute_thread NO_RETURN; -static bool load (const char *cmdline, void (**eip) (void), void **esp); @@ -491,7 +491,7 @@ diff -u src/userprog/process.c~ src/userprog/process.c diff -u src/userprog/syscall.c~ src/userprog/syscall.c --- src/userprog/syscall.c~ 2004-09-26 14:15:17.000000000 -0700 +++ src/userprog/syscall.c 2005-06-08 13:45:28.000000000 -0700 -@@ -1,20 +1,480 @@ +@@ -1,20 +1,482 @@ #include "userprog/syscall.h" #include +#include @@ -504,9 +504,9 @@ diff -u src/userprog/syscall.c~ src/userprog/syscall.c +#include "threads/init.h" #include "threads/interrupt.h" +#include "threads/malloc.h" -+#include "threads/mmu.h" +#include "threads/palloc.h" #include "threads/thread.h" ++#include "threads/vaddr.h" - + + @@ -972,7 +972,9 @@ diff -u src/userprog/syscall.c~ src/userprog/syscall.c + struct file_descriptor *fd; + fd = list_entry (e, struct file_descriptor, elem); + next = list_next (e); ++ lock_acquire (&fs_lock); + file_close (fd->file); ++ lock_release (&fs_lock); + free (fd); + } +}