⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcache.h

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 H
字号:
typedef struct Bbuf	Bbuf;typedef struct Bcache	Bcache;enum{	Nbcache=	32,		/* number of blocks kept in pool */};/* *  block cache descriptor */struct Bbuf{	Lru;				/* must be first in struct */	ulong	bno;	int	inuse;	Bbuf	*next;			/* next in dirty list */	int	dirty;	char	*data;};/* *  the buffer cache */struct Bcache{	Lru;	int	bsize;			/* block size in bytes */	int	f;			/* fd to disk */	Bbuf	*dfirst;		/* dirty list */	Bbuf	*dlast;	Bbuf	bb[Nbcache];};int	bcinit(Bcache*, int, int);Bbuf*	bcalloc(Bcache*, ulong);Bbuf*	bcread(Bcache*, ulong);void	bcmark(Bcache*, Bbuf*);int	bcwrite(Bcache*, Bbuf*);int	bcsync(Bcache*);int	bread(Bcache*, ulong, void*);int	bwrite(Bcache*, ulong, void*);int	bref(Bcache*, Bbuf*);void	error(char*, ...);void	warning(char*);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -