内核定时器与软中断
时间:2010-09-06
来源:互联网
ULKv3 上介绍run_timer_softirq 函数执行定时器中断,该函数执行的时候,会禁用本地中断。
那是否可以这样理解,如果我写的定时器函数在执行期间,本地CPU就不会再被其他事件所中断,软中断也不会产生?
QUOTE:
The run_timer_softirq( ) function is the deferrable function associated with the TIMER_SOFTIRQ softirq. It essentially performs the following actions:
Stores in the base local variable the address of the tvec_base_t data structure associated with the local CPU.
Acquires the base->lock spin lock and disables local interrupts.
Stores in the base local variable the address of the tvec_base_t data structure associated with the local CPU.
Acquires the base->lock spin lock and disables local interrupts.
那是否可以这样理解,如果我写的定时器函数在执行期间,本地CPU就不会再被其他事件所中断,软中断也不会产生?
作者: Godbach 发布时间: 2010-09-06
应该还是会被硬中断打断的,但是不会被软中断打断。
作者: ShadowStar 发布时间: 2010-09-06
看代码的确是这样,在遍历timer的时候,会调用spin_lock_irq。等到取得一个timer,在调用它的回调函数之前,才会unlock。或者就是等遍历完以后再unlock。
我想应该是因为中断的处理函数是可以add_timer什么的,所以这里不禁止中断还不行……
我想应该是因为中断的处理函数是可以add_timer什么的,所以这里不禁止中断还不行……
作者: kouu 发布时间: 2010-09-06
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28