设为首页  
联系我们  
加入收藏  
网页制作 冲浪宝典 图形图像 操作系统 软件教学 编程开发 认证考试 安全技术 站长专区 文学驿站 娱乐天地 游戏天地 办公软件
文章搜索
您的位置: 首页 >> 文章首页 >> 操作系统 >> Linux >> Linux 核心--16.Linux数据结构
精品推荐
Linux点击TOP10
·Linux下安装LumaQQ
·口袋里的Linux:在您的U盘上运行SLAX
·Linux命令Man解释:PPPD(8) :点对点daemon协议
·虚拟网络计算工具VNC使用指南
·Linux系统中如何正确安装摄像头驱动
·Linux 核心--4.内存管理
·Linux 内核文件系统与设备操作流程分析
·Ethernet HOWTO Linux以太网-HOWTO (4)型号的信息
·Linux精彩桌面 GNOME桌面主题安装实例
·Linux下Flash/Shockwave播放器安装
操作系统点击TOP10
·Windows Vista完全硬盘安装法
·Windows Vista 激活不求人
·Windows Vista局域网网络连接设置
·Windows Vista系统动态桌面截图欣赏
·Windows XP中磁盘的分区应用
·Windows NT/2000/XP 出现蓝屏并显示“STOP 0x0000007f”错误
·让Windows XP变身Vista
·一招搞定Vista系统软件不兼容问题
·教你如何正确配置和优化Windows Vista
·只转两圈 加快Windows XP启动速度
精选专题

Linux 核心--16.Linux数据结构

作者: 来源:http://www.xgdown.com/ 时间:2005-11-18 17:38:08

Linux 核心--16.Linux数据结构(1) 第十五章 Linux核心数据结构 

本章列出了Linux实用的主要数据结构。 


block_dev_strUCt
此结构用于向核心登记块设备,它还被buffer cache实用。所有此类结构都位于blk_dev数组中。 

struct blk_dev_struct {
    void (*request_fn)(void);
    struct request * current_request;
    struct request   plug;
    struct tq_struct plug_tq;
};

buffer_head
此结构包含关于buffer cache中一块缓存的信息。 

/* bh state bits */
#define BH_Uptodate  0   /* 1 if the buffer contains valid data      */
#define BH_Dirty     1   /* 1 if the buffer is dirty                 */
#define BH_Lock      2   /* 1 if the buffer is locked                */
#define BH_Req       3   /* 0 if the buffer has been invalidated     */
#define BH_Touched   4   /* 1 if the buffer has been touched (aging) */
#define BH_Has_aged  5   /* 1 if the buffer has been aged (aging)    */
#define BH_Protected 6   /* 1 if the buffer is protected             */
#define BH_FreeOnIO  7   /* 1 to discard the buffer_head after IO    */

struct buffer_head {
  /* First cache line: */
  unsigned long      b_blocknr;    /* block number                   */
  kdev_t             b_dev;        /* device (B_FREE = free)         */
  kdev_t             b_rdev;       /* Real device                    */
  unsigned long      b_rsector;    /* Real buffer location on disk   */
  struct buffer_head *b_next;      /* Hash queue list                */
  struct buffer_head *b_this_page; /* circular list of buffers in one 
                                      page                           */

  /* Second cache line: */
  unsigned long      b_state;      /* buffer state bitmap (above)    */
  struct buffer_head *b_next_free;
  unsigned int       b_count;      /* users using this block         */

共19页 9 7 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [198 :>

Linux 核心--16.Linux数据结构 相关文章:
Linux 核心--16.Linux数据结构 相关软件:
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
转载请注明来源:http://www.xgdown.com