假设有一个端口映射的I/O设备,它在IRQ线路上任意生成中断。设备的挂起中断可以通过对特定寄存器的单个outb调用来清除。
此外,假设下面的中断处理程序通过request_irq分配给相关的IRQ行
irqreturn_t handler(int irq, void *data)
{
/* clear pending IRQ on device */
outb(0, CLEAR_IRQ_REGISTER_ADDR);
/* device may generate another IRQ at this point,
* but
我读了一些相关的文章:
(1)罗伯特·洛夫:
You cannot sleep in an interrupt handler because interrupts do not have a backing
process context, and thus there is nothing to reschedule back into. In other
words, interrupt handlers are not associated with a task, so there is nothing to
"put to sleep" and (more i