同一中断处理程序可以抢占一个中断处理程序吗? [英] Can an interrupt handler be preempted by the same interrupt handler?

查看:81
本文介绍了同一中断处理程序可以抢占一个中断处理程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在调用中断处理程序之前,CPU是否禁用本地CPU上的所有中断? 还是只禁用正在服务的特定中断线?

Does the CPU disable all interrupts on local CPU before calling the interrupt handler? Or does it only disable that particular interrupt line, which is being served?

推荐答案

x86会在跳转到中断向量之前禁用所有本地中断(当然是NMI除外). Linux通常会屏蔽特定的中断并重新启用其余的中断(未被屏蔽),除非将特定的标志传递给中断处理程序注册.

x86 disables all local interrupts (except NMI of course) before jumping to the interrupt vector. Linux normally masks the specific interrupt and re-enables the rest of the interrupts (which aren't masked), unless a specific flags is passed to the interrupt handler registration.

请注意,尽管这意味着您的中断处理程序不会在同一CPU上与其自身竞争,但它可以并且将与在SMP/SMT系统中其他CPU上运行的自身竞争.

Note that while this means your interrupt handler will not race with itself on the same CPU, it can and will race with itself running on other CPUs in an SMP / SMT system.

这篇关于同一中断处理程序可以抢占一个中断处理程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆