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—select详解
select系统调用时用来让我们的程序监视多个文件句柄的状态变化的。程序会停在select这里等待,直到被监视的文件句柄有一个或多个发生了状态改变。
关于文件句柄,其实就是一个整数,通过socket函数的声明就明白了:
int socket(int domain, int type, int protocol);
我们最熟悉的句柄是0、1、2 ......
创建时间:2003-08-22
文章提交:raodan (raod_at_30san.com)
==Phrack Inc.==
卷标 0x0b, 期刊号 0x3d, Phile #0x0d of 0x0f
|=---------------------=[ 深入Linux网络核心堆栈 ]=-----------------------= ......
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
未做测试,不知道是否可行,暂做保存 ......
信号灯与其他进程间通信方式不大相同,它主要提供对进程间共享资源访问控制机制。相当于内存中的标志,进程可以根据它判定是否能够访问某些共享资源,同时,进程也可以修改该标志。除了用于访问控制外,还可用于进程同步。
一、信号灯概述
信号灯与其他进程间通信方式不大相同,它主要提供对进程间共享资源访问控制机制 ......
The
Java Console provides information about the Java Runtime Environment
(JRE) version, user home directory, and any error message that occurs
while running an applet or application. You can enable the Java Console
for the Linux platform.
......