xv6-65oo2/buf.h

15 lines
326 B
C
Raw Normal View History

struct buf {
int flags;
uint dev;
uint blockno;
struct sleeplock lock;
uint refcnt;
2007-08-24 19:32:36 +00:00
struct buf *prev; // LRU cache list
2006-08-12 22:34:13 +00:00
struct buf *next;
2007-08-24 19:32:36 +00:00
struct buf *qnext; // disk queue
uchar data[BSIZE];
};
#define B_VALID 0x2 // buffer has been read from disk
#define B_DIRTY 0x4 // buffer needs to be written to disk