@@ -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);
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 <stdio.h>
+#include <string.h>
+#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"
-
+
+
+ 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);
+ }
+}