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

📄 ubuffer.h

📁 一个NAND FLASH文件系统
💻 H
字号:
/** * *	\file ubuffer.h *	\brief fast/static buffer management *	\author	Created by Ricky, 2003.6.10 * */#ifndef ___UBUFFER_H___#define ___UBUFFER_H___#ifdef __cplusplusextern "C"{#endif/**********************************************************************************************	global referenced macro defines & type defines*********************************************************************************************/struct ubufm{	void *node_pool;		/* data pool */	unsigned int node_size; /* data struct size */	unsigned int node_nums;	/* ubuf(data) num */	void *freeList;			/* free list, used by ubuf internal */	int lock;				/* buffer lock */};/**********************************************************************************************	global referenced variables*********************************************************************************************//**********************************************************************************************	global function prototype*********************************************************************************************//** init ubuffer data structure with given discriptor */int uBufInit(struct ubufm *dis); /** get buffer from pool */void * uBufGet(struct ubufm *dis);/** * get buffer from pool * this is Critical protect version, * you should use this version when multitherad  * access the same buffer pool */void * uBufGetCt(struct ubufm *dis);/** put buffer to pool */int uBufPut(void *p, struct ubufm *dis);/** * put buffer to pool,  * this is critical protect version, * you should use this version when multithread * access the same buffer pool */int uBufPutCt(void *p, struct ubufm *dis);/** get buffer pointer by index(offset) */void * uBufGetBufByIndex(unsigned int index, struct ubufm *dis);/** get index by pointer */int uBufGetIndex(void *p, struct ubufm *dis);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

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