INTR_BARRIER(9)
π INTR_BARRIER β interrupt barrier, bestie
okay so bestie, welcome to intr_barrier β it's a kernel thing (the man page lives in section 9 of the Kernel Developer's Manual, iykyk), and honestly? she's lowkey iconic for how much she does with so little.
πΈ NAME πΈ
intr_barrier β interrupt barrier β¨
Like, a barrier. For interrupts. That's the whole vibe. π
π¦ SYNOPSIS π¦
#include <machine/intr.h>
void
intr_barrier(void *ih);
that's it. that's the whole signature. no cap. π«Ά
π DESCRIPTION π
okay so here's the tea, and it is good tea. β
intr_barrier() guarantees that any interrupt handler invocations for the interrupt handler specified by ih have finished before it returns. literally β every single invocation, done, wrapped, finished, no stragglers, before this function hands control back to you. periodt. π
and the way that ih works is: the cookie you pass to intr_barrier() should be the value returned when the interrupt handler was established β for example, the return value of pci_intr_establish(9). so like, don't just make up a cookie, bestie. use the one they gave you. π
π₯ CONTEXT π₯
so like, where can you even call this? good news:
intr_barrier() can be called from process context. π«Ά
that's the whole section. she's short but she ate. π
π SEE ALSO π
go read these next, they're friends of hers:
pci_intr_establish(9)β where yourihcookie comes from in the first place πspl(9)β the other classic interrupt-adjacent baddie β¨
β οΈ friendly reminder: pass the actual cookie from when the handler was established. a random pointer is not giving what you think it's giving. π
and that's the whole page, bestie!! this lil slice of kernel lore is brought to you by Debian, dated September 13, 2015 β yeah she's vintage, she's a classic, she's still serving. ππ go forth and barrier your interrupts responsibly. mwah. π
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2015 Mark Kettenis
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms