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

📄 block_dev.h

📁 COS 0.0.1.rar Cos操作系统源代码
💻 H
字号:
/* block_dev.h - block device definitions   Author:        Paul Barker Part of:       COS Created:       29/10/04 Last Modified: 29/10/04 Copyright (C) 2004 Paul Barker        This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                     (See file "Copying")*/#ifndef _COS_BLOCK_DEV_H_#define _COS_BLOCK_DEV_H_struct block_device;typedef struct block_device block_device_t;struct block_request;typedef struct block_request block_request_t;typedef fresult_t (*block_function_t)(block_request_t* rq, block_device_t* dev);struct block_device{	block_function_t	fn;	u32_t			default_mode;};struct block_request{	u32_t			mode;	u32_t			selector_type;	union {		u32_t value;		block_device_t*	ptr;	} selector;};block_device_t* block_getdev(block_request_t* rq);void block_dump_rq(block_request_t* rq);void block_dump_dev(block_device_t* d);fresult_t block_dispatch(block_request_t* rq, block_device_t* d);fresult_t block_addrq(block_request_t* rq);// selector types#define BSELECT_UNKNOWN	0#define BSELECT_BY_PTR	1// request modes#define BMODE_DEFAULT	0#define BMODE_IMMEDIATE 1#endif // !_COS_BLOCK_DEV_H_

⌨️ 快捷键说明

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