xv6-cs450/buf.h

15 lines
337 B
C
Raw Normal View History

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