- 论坛徽章:
- 0
|
回复 juruqiang
local_irq_disable禁止了硬中断。但是由于禁止了硬中断,相应的软中断一般也不会被调 ...
瀚海书香 发表于 2011-12-09 14:43
LKD中提到
The local_irq_disable() routine is dangerous if interrupts were already disabled
prior to its invocation.The corresponding call to local_irq_enable() unconditionally
enables interrupts, despite the fact that they were off to begin with.
我可以这样理解吗?
可能本地CPU一开始时,特意禁止了某些中断,如果我们调用local_irq_disable()则就会丢失特意禁止的中断信息,
即我们不知道哪些中断是我们特意禁止的,当我们调用local_irq_enable()时,就会打开所有中断,包括那些我们想要关闭的中断。
但一般情况下,我们都不会特意地关闭某些中断,所以,在大多数的情况下,我们会调用local_irq_disable()。
一般也不会被调度?
在什么时候会调度?
谢谢 |
|