summaryrefslogtreecommitdiffstats
path: root/src/filesys/filesys.c
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 /src/filesys/filesys.c
parent0def77a920885491bce2d5c06248a0066bc36767 (diff)
downloadpintos-44cfbdda96ccde91ea1766c62f2aa4726c8decd8.tar.gz
comment and include
Diffstat (limited to 'src/filesys/filesys.c')
-rw-r--r--src/filesys/filesys.c3
1 files changed, 3 insertions, 0 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. */