易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux核心数据结构

Table of Contents, Show Frames, No Frames
第十五章 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 */
unsigned long b_size; /* block size */
/* Non-performance-critical data follows. */
char *b_data; /* pointer to data block *


相关文档:

将Linux代码移植到Windows的简单方法

一.前言
  Linux拥有丰富各种源代码资源,但是大部分代码在Windows平台情况是无法正常编译的。Windows平台根本无法直接利用这些源代码资源。如果想要使用完整的代码,就要做移植工作。因为C/C++ Library的不同和其他的一些原因,移植C/C++代码是一项困难的工作。本文将以一个实际的例子(Tar)来说明如何把Linux代码移植 ......

Linux initial RAM disk (initrd) overview


Linux initial RAM disk (initrd) overview
Learn about its anatomy, creation, and use in the Linux boot process
M. Tim Jones
(mtj@mtjones.com
), Consultant Engineer, Emulex
M. Tim Jones is an embedded software architect and the author of GNU/Linux Application Programming
, AI Application Prog ......

linux启动时挂载rootfs的几种方式

[转]linux启动时挂载rootfs的几种方式
一直对linux启动时挂载根文件系统的过程存在着很多疑问,今天在水木精华区找到了有用的资料,摘录如下:
1。linux启动时,经过一系列初始化之后,需要mount 根文件系统,为最后运行init进程等做准备,mount
根文件系统有这么几种方式:
1)文件系统已经存在于硬盘(或者类似的设备 ......

linux 文本模式下发送带附件email

mail+uuencode
[root@room i386]# uuencode openvpn-2.0.5-1.i386.rpm openvpn-2.0.5-1.i386.rpm | mail -s youname@domain.com openvpn-2.0.5-1.i386.rpm
如果没有找到 uuencode 命令,则需要安装sharutils
[root@room i386]# yum install sharutils
未做测试,不知道是否可行,暂做保存 ......

Linux基本指令

Linux基本指令
alias
替指令取别名
◎ alias 列出目前系统所使用的所有指令别名
◎ alias 别名=Linux 指令名称 此时若输入「别名」则功能会跟输入「Linux 指令名称」相同
◎ 若想要每次开机都使用此别名,在 bash 中,一定要在 .bashrc 中指定,如果是 tcsh 中,则要在 .cshrc 中指定
ar
将许多档案备存成一个或多个 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号