summaryrefslogtreecommitdiff
path: root/fsvar.h
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-21 19:22:08 +0000
committerrsc <rsc>2007-08-21 19:22:08 +0000
commitf32f3638f4c34fbf2fc4398878e6304612bb3283 (patch)
treecabca9bf9ac8b1465b2c59e27e3dc8020c02e2be /fsvar.h
parent2d61a40b2059b9a198e7c4ff04c6ced88cb3ce65 (diff)
downloadxv6-labs-f32f3638f4c34fbf2fc4398878e6304612bb3283.tar.gz
xv6-labs-f32f3638f4c34fbf2fc4398878e6304612bb3283.tar.bz2
xv6-labs-f32f3638f4c34fbf2fc4398878e6304612bb3283.zip
Various cleanup:
- Got rid of dummy proc[0]. Now proc[0] is init. - Added initcode.S to exec /init, so that /init is just a regular binary. - Moved exec out of sysfile to exec.c - Moved code dealing with fs guts (like struct inode) from sysfile.c to fs.c. Code dealing with system call arguments stays in sysfile.c - Refactored directory routines in fs.c; should be simpler. - Changed iget to return *unlocked* inode structure. This solves the lookup-then-use race in namei without introducing deadlocks. It also enabled getting rid of the dummy proc[0].
Diffstat (limited to 'fsvar.h')
-rw-r--r--fsvar.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/fsvar.h b/fsvar.h
index 449bf3d..8609c2a 100644
--- a/fsvar.h
+++ b/fsvar.h
@@ -4,7 +4,7 @@ struct inode {
uint dev; // Device number
uint inum; // Inode number
int ref; // Reference count
- int busy; // Is the inode "locked"?
+ int flags; // I_BUSY, I_VALID
short type; // copy of disk inode
short major;
@@ -16,6 +16,5 @@ struct inode {
#define ROOTDEV 1 // Device number of root file system
-#define NAMEI_LOOKUP 1
-#define NAMEI_CREATE 2
-#define NAMEI_DELETE 3
+#define I_BUSY 0x1
+#define I_VALID 0x2