synchronize_hardirq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to synchronize_hardirq(9) from the Kernel API Manual β€” manual name folded in near the top like a little name tag, we're being cute and correct today. This one is giving β€œwait for pending hard IRQ handlers (on other CPUs) to finish,” and the vibe check is please do not deadlock yourself. πŸ’…


✨ NAME ✨

  • synchronize_hardirq β€” wait for pending hard IRQ handlers (on other CPUs). That's literally the whole name-lane, bestie.

πŸ¦‹ SYNOPSIS πŸ¦‹

bool synchronize_hardirq (unsigned int irq );

πŸ’… ARGUMENTS πŸ’…

  • irq β€” the interrupt number to wait for. That's the one you're stalking until it's done. πŸ‘€

🌸 DESCRIPTION 🌸

So here's the tea: this function waits for any pending hard IRQ handlers for this interrupt to complete before returning. It's a β€œlet the hardirq finish first” moment, no cap.

🚨 Deadlock warning, fr fr: if you use this function while holding a resource the IRQ handler may need, you will deadlock. That's not a vibe. That's a whole system freeze.

It does not take associated threaded handlers into account. So if you're expecting threaded-handler coverage from this function, bestie, that's not what this is doing.

⚠️ Do not use this for shutdown scenarios where you must be sure that all parts (hardirq and threaded handler) have completed. That is a different requirement, and this function is not that girl.

This function may be called β€” with care β€” from IRQ context. The β€œwith care” is doing a lot of heavy lifting there, so respect it. 🫢

It also does not check whether there is an interrupt in flight at the hardware level, but not serviced yet. Why? Because this might deadlock when called with interrupts disabled and the target CPU of the interrupt is the current CPU. Literally the current CPU. The audacity. 😭

πŸ”₯ RETURN πŸ”₯

false if a threaded handler is active. That's the return detail, and we are keeping it exactly as it is.

πŸ‘‘ SEE ALSO πŸ‘‘

The kernel file in question is ./kernel/irq/manage.c, and the cross-reference besties are:


catch u later, ./kernel/irq β€’ October 2026 β€’ synchronize_hardirq(9) πŸ’œπŸ«Ά

πŸ“¦ where this page comes from