//中断退出时 1.void irq_exit(void) { ... //递减中断嵌套深度 sub_preempt_count(IRQ_EXIT_OFFSET); //如果已经退出中断,并且软中断标志被置位 if (!in_interrupt() && local_softirq_pending()) //执行软中断 do_softirq(); ... } //APIC时钟中断中 2.void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) { ... irq_exit(); ... } //重新激活下半部时 3.void local_bh_enable(void) { _local_bh_enable_ip((unsigned long)__builtin_return_address(0)); } static inline void _local_bh_enable_ip(unsigned long ip) { ... if (unlikely(!in_interrupt() && local_softirq_pending())) do_softirq(); ... }
时间: 2024-10-29 18:11:11