summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-03-16 12:12:28 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-16 12:12:28 +0100
commit44cfbdda96ccde91ea1766c62f2aa4726c8decd8 (patch)
treea478a02f47089a246c8c6fe197664ca8bbf267ca
parent0def77a920885491bce2d5c06248a0066bc36767 (diff)
downloadpintos-44cfbdda96ccde91ea1766c62f2aa4726c8decd8.tar.gz
comment and include
-rw-r--r--src/filesys/filesys.c3
-rwxr-xr-xsrc/userprog/start_pfs.sh2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/filesys/filesys.c b/src/filesys/filesys.c
index 789bcf2..d30f728 100644
--- a/src/filesys/filesys.c
+++ b/src/filesys/filesys.c
@@ -7,7 +7,10 @@
#include "filesys/inode.h"
#include "filesys/directory.h"
#include "devices/disk.h"
+#include "threads/synch.h"
+/* Locks filesys_create so the same file isn't
+ created twice with the same name. */
static struct lock create_lock;
/* The disk that contains the file system. */
diff --git a/src/userprog/start_pfs.sh b/src/userprog/start_pfs.sh
index 8948e32..26b9eb9 100755
--- a/src/userprog/start_pfs.sh
+++ b/src/userprog/start_pfs.sh
@@ -7,4 +7,4 @@ pintos --qemu -v -p random -a random -- -q
pintos --qemu -v -p ../../examples/pfs -a pfs -- -q
pintos --qemu -v -p ../../examples/pfs_writer -a pfs_writer -- -q
pintos --qemu -v -p ../../examples/pfs_reader -a pfs_reader -- -q
-pintos --qemu -v -- run pfs
+pintos --qemu -v -- -q run pfs