disable_hardirq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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


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