disable_irq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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