disable_irq(9)
π disable_irq β kernel API manual, bestie edition β¨
okay so bestie, we're in the Kernel API Manual (yes, the 9 section, the big-kid one) and today's main character is disable_irq. she's lowkey one of the most important functions in the whole interrupt saga. let's get into it π«Ά
πΈ NAME πΈ
disable_irq β disable an irq and wait for completion π
like, she turns the interrupt off and she waits for everyone to finish their little tasks first. polite queen behavior, honestly.
β¨ SYNOPSIS β¨
void disable_irq (unsigned int irq );
no return value, no drama, just vibes and one parameter. periodt.
π ARGUMENTS π
irqβ the Interrupt to disable. that's it. that's the whole argument. give her the interrupt number and she'll handle the rest π
π¦ DESCRIPTION π¦
Disable the selected interrupt line. Enables and Disables are nested β yes bestie, nested, so keep a mental tally, because they stack like your unread notifications π₯
This function waits for any pending IRQ handlers for this interrupt to complete before returning. she's not leaving until the group chat is quiet, fr fr.
β οΈ If you use this function while holding a resource the IRQ handler may need you will deadlock. like, actual deadlock. the whole thing stops. not cute. do NOT do this ππ
Can only be called from preemptible code as it might sleep when an interrupt thread is associated to irq. so yeah β preemptible code only, because she might catch a nap π΄β¨
π SEE ALSO π
Kernel file ./kernel/irq/manage.c β that's where she lives, go say hi π
and the whole extended fam, in all their glory:
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_hardirq(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)
iykyk π
and that's the whole page, bestie!! this little gem comes from ./kernel/irq, dated October 2026, and she's filed under disable_irq(9). go forth and disable responsibly ππβ
π¦ 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