摘要: 1.内核定时器: Linux 内核所提供的用于操作定时器的数据结构和函数如下: (1) timer_list 在 Linux 内核中,timer_list 结构体的一个实例对应一个定时器 1 struct timer_list { 2 struct list_head entry; /* 定时器列表 阅读全文
posted @ 2016-05-01 12:01 Grace、 阅读(467) 评论(0) 推荐(0) 编辑
摘要: Linux中断 Linux 的中断处理分为两个半部,顶半部处理紧急的硬件操作,底半部处理不紧急的耗时操作。tasklet 和工作队列都是调度中断底半部的良好机制,tasklet 基于软中断实现。内核定时器也依靠软中断实现。 1.申请和释放中断 申请中断 int request_irq(unsigne 阅读全文
posted @ 2016-05-01 11:36 Grace、 阅读(658) 评论(0) 推荐(0) 编辑