关于软中断上一篇文章有提到,这一篇文章就记一点关于tasklet的东西吧

tasklet是一种特殊的软中断,一般挂在中断号为0和5的中断向量上。tasklet也作为一种可延迟的中断存在,为什么这样说,看一张图片吧,转的

[笔记]Linux内核学习之旅--软中断与tasklet

tasklet的队列同样是挂载到中断向量中的,只不过tasklet不同于其他中断的是它是一个任务队列。

也就是说如果这个中断任务不是很实时的,只需要挂载到tasklet的队列中去,自然会处理到它的。

tasklet节点的数据结构如下

struct tasklet_struct
{
       struct tasklet_struct *next;
       unsigned long state;
       atomic_t count;
       void (*func)(unsigned long);
       unsigned long data;
};

其中的func 就是回调函数

再看看..这部分的关于tasklet的可重入性还有其他的好难懂的东西,未完待续...

 

转载于:https://www.cnblogs.com/Bozh/archive/2013/01/18/2866091.html

相关文章:

  • 2022-01-07
  • 2021-12-19
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2021-04-27
  • 2021-08-05
  • 2021-10-07
  • 2021-09-07
  • 2021-07-12
相关资源
相似解决方案