fix various comments

This commit is contained in:
rsc 2006-09-08 13:55:43 +00:00
parent ec5783cbd2
commit d911d83ca1
3 changed files with 3 additions and 9 deletions

6
fs.c
View file

@ -26,9 +26,6 @@
// so we don't use spin locks. Instead, if a process wants to use // so we don't use spin locks. Instead, if a process wants to use
// a particular inode, it must sleep(ip) to wait for it to be not busy. // a particular inode, it must sleep(ip) to wait for it to be not busy.
// See iget below. // See iget below.
//
// XXX Inodes with dev == 0 exist only in memory. They have no on-disk
// representation. This functionality is used to implement pipes.
struct inode inode[NINODE]; struct inode inode[NINODE];
struct spinlock inode_table_lock; struct spinlock inode_table_lock;
@ -362,7 +359,6 @@ iincref(struct inode *ip)
} }
// Copy stat information from inode. // Copy stat information from inode.
// XXX Assumes inode is from disk file system.
void void
stati(struct inode *ip, struct stat *st) stati(struct inode *ip, struct stat *st)
{ {
@ -376,7 +372,6 @@ stati(struct inode *ip, struct stat *st)
#define min(a, b) ((a) < (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b))
// Read data from inode. // Read data from inode.
// XXX Assumes inode is from disk file system.
int int
readi(struct inode *ip, char *dst, uint off, uint n) readi(struct inode *ip, char *dst, uint off, uint n)
{ {
@ -440,7 +435,6 @@ newblock(struct inode *ip, uint lbn)
} }
// Write data to inode. // Write data to inode.
// XXX Assumes inode is from disk file system.
int int
writei(struct inode *ip, char *addr, uint off, uint n) writei(struct inode *ip, char *addr, uint off, uint n)
{ {

4
fs.h
View file

@ -9,8 +9,8 @@
// File system super block // File system super block
struct superblock { struct superblock {
uint size; // Size of file system (bytes???) xxx uint size; // Size of file system image (blocks)
uint nblocks; // Number of blocks uint nblocks; // Number of data blocks
uint ninodes; // Number of inodes. uint ninodes; // Number of inodes.
}; };

2
proc.c
View file

@ -38,7 +38,7 @@ setupsegs(struct proc *p)
} }
c->gdt[0] = SEG_NULL; c->gdt[0] = SEG_NULL;
c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0x100000 + 64*1024, 0); // xxx c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0x100000 + 64*1024, 0);
c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
c->gdt[SEG_TSS] = SEG16(STS_T32A, (uint) &c->ts, sizeof(c->ts), 0); c->gdt[SEG_TSS] = SEG16(STS_T32A, (uint) &c->ts, sizeof(c->ts), 0);
c->gdt[SEG_TSS].s = 0; c->gdt[SEG_TSS].s = 0;