简体   繁体   English

spin_lock_irqsave中的flag参数保存哪些信息?

[英]What information does flag argument in spin_lock_irqsave save?

I know irqsave version of spinlock notes down the interrupt state while taking lock and restore interrupt state while releasing the lock. 我知道自旋锁的irqsave版本会记下锁定时的中断状态,并在释放锁定时恢复中断状态。

My doubt is, say if there are 10 interrupt vectors in total and 2 of them are in disabled state (assume a device driver has disabled these two interrupt vectors) while taking lock using irqsave variant. 我的疑问是,假设使用irqsave变量进行锁定时,是否总共有10个中断向量并且其中2个处于禁用状态(假设设备驱动程序已禁用这两个中断向量)。 Does the flag argument of spin_lock_irqsave() note down interrupt states and enables only the 8 interrupt during restore? spin_lock_irqsave()flag参数是否记下中断状态并在恢复期间仅启用8个中断? What if those 2 disabled interrupts are enabled from other CPUs after the state is saved in flag argument? 如果将状态保存在flag参数中之后,从其他CPU启用了这2个禁用的中断怎么办?

The spin_lock_irqsave function does not mask and unmask specific interrupt sources; spin_lock_irqsave函数不会屏蔽和取消屏蔽特定的中断源。 it disables the processing of all maskable interrupts on the calling processor. 它禁用了调用处理器上所有可屏蔽中断的处理。 Interrupt spinlocks create critical regions of code that are uninterruptible. 中断自旋锁会创建不可中断的关键代码区域。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM