linux 2.6源代码情景分析笔记之中断与异常6
每个中断向量都有自己的irq_desc_t描述符,所有的这些描述符组织在一起形成irq_desc数组。
typedef struct irq_desc {
hw_irq_controller *handler;指向pic对象(hw_irq_controller描述符),服务于irq线
void *handler_data;指向pic方法所使用的数据
struct irqaction *action; /* IRQ action list */标识当出现irq时要调用的中断服务例程。该字段指向irq的irqaction描述符链表的第一个元素。
unsigned int status; /* IRQ status */描述irq线状态的一组标志
unsigned int depth; /* nested irq disables */如果irq线被激活,则显示0;如果irq线被禁止了不止一次,则显示一个正数
unsigned int irq_count; /* For detecting broken interrupts */中断计数器,统计irq线上发生的中断计数
unsigned int irqs_unhandled;中断计数器,统计irq线上发生的无法处理的中断进行计数
spinlock_t lock;用于串行访问irq描述符和pic的自旋锁。
} ____cacheline_aligned irq_desc_t;
extern irq_desc_t irq_desc [NR_IRQS];
/*
* IRQ line status.
*/
#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */IRQ的一个处理程序正在执行
#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */由一个设备驱动程序故意地禁用irq线
#define IRQ_PENDING 4 /* IRQ pending - replay on enable */一个irq已经出现在线上,它的出现也已对pic做出应答,但是内核还没有为它提供服务
#define IRQ_REPLAY 8 &nbs
相关文档:
转载自:http://bbs.dp168.com/thread-23703-1-1.html
Redhat
简介:
Red Hat Linux是商业上运作最成功的一个Linux发行套件,普及程度很高,由Red Hat公司发行。
Red Hat
Linux可算是一个“中年的”Linux发行套件,1.0版本于1994年11月3日发行。虽然其历史不及Slackware般悠久,但比起很多的
Linux发行套件 ......
/* Offtimer.c.For auto halt. */
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#define DELAY 60/* Time of sleeping */
int main()
{
time_t now;
struct tm *p;
while(1)
{
now = time(NULL);
&n ......
Index: flash.c
===================================================================
--- flash.c (revision 1804)
+++ flash.c (working copy)
@@ -26,6 +26,8 @@
#include "ebootnand.h"
#include "ll_nand.h"
#includ ......
对许多用户来说,在DOS和Windows环境下利用工具软件ARJ、Winzip等,压缩或解压文件是比较容易的事。但是,在Linux中如何对文件进行压缩与解压呢?本文基于Red Hat 6.0,介绍了压缩与解压文件的几种方法与技巧,希望对读者有一定的帮助。
命令:
compress
格式:
compress 选项 文件列表
功能:
用Lempel-ziv压缩方法 ......