From 44cfbdda96ccde91ea1766c62f2aa4726c8decd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Tue, 16 Mar 2021 12:12:28 +0100 Subject: comment and include --- src/filesys/filesys.c | 3 +++ src/userprog/start_pfs.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1