annotate src/buf.h @ 132:8e93917ce4be
add sys_read_impl.cbc (incomplete)
author |
anatofuz |
date |
Thu, 05 Dec 2019 10:59:27 +0900 |
parents |
83c23a36980d |
children |
|
rev |
line source |
0
|
1 #ifndef INCLUDE_BUF_H
|
|
2 #define INCLUDE_BUF_H
|
|
3
|
|
4 struct buf {
|
|
5 int flags;
|
|
6 uint dev;
|
|
7 uint sector;
|
|
8 struct buf *prev; // LRU cache list
|
|
9 struct buf *next;
|
|
10 struct buf *qnext; // disk queue
|
|
11 uchar data[512];
|
|
12 };
|
|
13
|
|
14 #define B_BUSY 0x1 // buffer is locked by some process
|
|
15 #define B_VALID 0x2 // buffer has been read from disk
|
|
16 #define B_DIRTY 0x4 // buffer needs to be written to disk
|
|
17
|
|
18 #endif
|