Mercurial > hg > CbC > CbC_xv6
diff src/interface/fs.dg @ 294:08a367c3124a
add FileSystem files
author | menikon |
---|---|
date | Wed, 29 Jan 2020 15:58:12 +0900 |
parents | |
children | 2fcabbf8ceda |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/interface/fs.dg Wed Jan 29 15:58:12 2020 +0900 @@ -0,0 +1,38 @@ +typedef struct fs<Type,Impl> { + union Data* fs; + int dev; + struct superblock* sb; + uint dev; + short type; + struct inode* ip; + struct stat* st; + char* dst; + uint off; + uint n; + const char* s; + const char* t; + struct inode* dp; + char* name; + uint* poff; + uint inum; + char* path; + + __code readsb(Impl* fs, int dev, struct superblock* sb, __code next(...)); + __code iinit(Impl* fs, __code next(...)); + __code ialloc(Impl* fs, uint dev, short type, __code next(...)); + __code iupdate(Impl* fs, struct inode* ip, __code next(...)); + __code idup(Impl* fs, struct inode* ip, __code next(...)); + __code ilock(Impl* fs, struct inode* ip, __code next(...)); + __code iunlock(Impl* fs, struct inode* ip, __code next(...)); + __code iput(Impl* fs, struct inode* ip, __code next(...)); + __code iunlockput(Impl* fs, struct inode* ip, __code next(...)); + __code stati(Impl* fs , struct inode* ip, struct stat* st, __code next(...)); + __code readi(Impl* fs, struct inode* ip, char* dst, uint off, uint n, __code next(...)); + __code writei(Impl* fs, struct inode* ip, char* src, uint off, uint n, __code next(...)); + __code namecmp(Impl* fs, const char* s, const char* t, __code next(...)); + __code dirlookup(struct inode* dp, char* name, uint* poff, __code next(...)); + __code dirlink (Impl* fs, struct inode* dp, char* name, uint inum, __code next(...)); + __code namei(Impl* fs, char* path, __code next(...)); + __code nameiparent(Impl* fs, char* path, char* name, __code next(...)); + +} fs;