disable_hardirq(9)
π disable_hardirq(9) β Kernel API Manual β¨
okay so bestie, welcome to disable_hardirq β it lives in the disable_hardirq(9) section of the Kernel API Manual and honestly it's giving "polite bouncer at the IRQ club" π
πΈ NAME πΈ
disable_hardirq β disables an irq and waits for hardirq completion π¦
β¨ SYNOPSIS β¨
bool disable_hardirq (unsigned int irq );
π ARGUMENTS π
irqβ Interrupt to disable. that's the one, bestie, that's the line we're putting on pause π
π DESCRIPTION π
So we're disabling the selected interrupt line. easy. and the way it works, Enables and Disables are nested β like, they stack, okay? don't try to be clever about it π
This function waits for any pending hard IRQ handlers for this interrupt to complete before returning. so it's not just "bye, muted" β it's "muted and I'm standing here until everyone's done talking" π
β οΈ real talk: if you use this function while holding a resource the hard IRQ handler may need, you will deadlock. not a vibe. deadlock is so not the move ππ
When you use it to optimistically disable an interrupt from atomic context, the return value must be checked. like, you have to look at it. no ignoring it, no skipping, fr fr π«Ά
And yes β this function may be called from IRQ context. but "with care", so likeβ¦ be careful. main character energy with a helmet on π
β RETURN β
false if a threaded handler is active. π
π SEE ALSO π
Kernel file ./kernel/irq/manage.c β and the whole group chat of friends:
synchronize_hardirq(9)synchronize_irq(9)irq_can_set_affinity(9)irq_can_set_affinity_usr(9)irq_set_thread_affinity(9)irq_affinity_schedule_notify_work(9)irq_update_affinity_desc(9)irq_set_affinity(9)irq_force_affinity(9)irq_set_affinity_notifier(9)irq_set_vcpu_affinity(9)disable_irq_nosync(9)disable_irq(9)disable_nmi_nosync(9)enable_irq(9)enable_nmi(9)irq_set_irq_wake(9)irq_wake_thread(9)free_irq(9)request_threaded_irq(9)request_any_context_irq(9)request_nmi(9)irq_percpu_is_enabled(9)free_percpu_irq(9)request_percpu_irq_affinity(9)request_percpu_nmi(9)prepare_percpu_nmi(9)teardown_percpu_nmi(9)irq_get_irqchip_state(9)irq_set_irqchip_state(9)irq_has_action(9)irq_check_status_bit(9)
that's the whole page, babes π this one came out of ./kernel/irq and it's dated October 2026 β disable_hardirq(9), slay, see you in the kernel π§ββοΈβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms