问题描述
我知道linux确实做了嵌套的中断,其中一个中断可以抢占"另一个中断,但是其他任务呢?
I know that linux does nested interrupts where one interrupt can "preempt" another interrupt, but what about with other tasks.
我只是想了解linux如何处理中断.它们可以被其他一些用户任务/内核任务抢占吗?
I am just trying to understand how linux handles interrupts. Can they be preempted by some other user task/kernel task.
推荐答案
简单的答案:中断只能被更高优先级的中断打断.
Simple answer: An interrupt can only be interrupted by interrupts of higher priority.
因此,如果中断的优先级低于内核调度程序中断优先级或用户任务中断优先级,则中断可以被内核或用户任务中断.
Therefore an interrupt can be interrupted by the kernel or a user task if the interrupt's priority is lower than the kernel scheduler interrupt priority or user task interrupt priority.
请注意,用户任务"是指用户定义的中断.
Note that by "user task" I mean user-defined interrupt.
这篇关于是否可以抢占中断处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!