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

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


相关文档:

实战Linux Bluetooth编程 (七) SDP协议

Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......

Linux各发行版本简介

转载自: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发行套件 ......

linux下c语言关机程序

/* 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 ......

WinCE Eboot中加入Linux boot的支持

Index: flash.c
===================================================================
--- flash.c    (revision 1804)
+++ flash.c    (working copy)
@@ -26,6 +26,8 @@
#include "ebootnand.h"
#include "ll_nand.h"
#includ ......

Linux发送arp请求与接收arp响应

Linux 中获得本机网卡MAC地址很简单,ioctl()就OK。可如何获得局域网其他主机的MAC地址呢…链路层广播ARP请求,然后接收ARP响应。实现介个功能其实已有现成三方库可用,如libnet。不过想加深对协议的理解和Linux网络编程API的理解,jiayi 还是决定用Linux的PF_PACKET自己实现,改啊改,终于成功~以下是大体思路
1. ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号