File:buf.h - ikarishinjieva/unixV6-code-analyze-chs GitHub Wiki
4561
4562 /*
4563 * This is the head of the queue of available
4564 * buffers-- all unused except for the 2 list heads.
4565 */
4566
4567 struct buf bfreelist;
4568
4569 /*
- 以下是struct buf结构中 b_flags 使用的定义常量
4570 * These flags are kept in b_flags.
4571 */
4572 #define B_WRITE 0 /* non-read pseudo-flag */
4573 #define B_READ 01 /* read when I/O occurs */
4574 #define B_DONE 02 /* transaction finished */
4575 #define B_ERROR 04 /* transaction aborted */
- 该缓存块读/写设备完成
4576 #define B_BUSY 010 /* not on av_forw/back list */
- 该缓存块读/写设备出错
4577 #define B_PHYS 020 /* Physical IO potentially
- 该缓存块正在读/写设备,设备忙
4578 using the Unibus map */
4579 #define B_MAP 040 /* This block has the UNIBUS
4580 map allocated */
4581 #define B_WANTED 0100 /* issue wakeup when
4582 BUSY goes off */
4583 #define B_RELOC 0200 /* no longer used */
- 有进程正在请求该缓存块
4584 #define B_ASYNC 0400 /* don’t wait wait for I/O
4585 completion */
- 该缓存块 进行异步写
4586 #define B_DELWRI 01000 /* don’t write till block
4587 leaves available list */
4588
- 该缓存块 进行延迟写
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599