BUS_DESCRIBE_INTR(9)
π BUS_DESCRIBE_INTR π
ok so bestie, welcome to BUS_DESCRIBE_INTR(9), part of the Kernel Developer's Manual β¨ β it's the one that lets you name your interrupt handlers, and honestly? iconic.
β¨ NAME β¨
BUS_DESCRIBE_INTR, bus_describe_intr β associate a description with an active interrupt handler π
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/bus.h>
int
BUS_DESCRIBE_INTR(device_t dev, device_t child, struct resource *irq,
void *cookie, const char *descr);
int
bus_describe_intr(device_t dev, struct resource *irq, void *cookie,
const char *fmt, ...);
π¦ DESCRIPTION π¦
So the BUS_DESCRIBE_INTR() method slaps a description onto an active interrupt handler. That's the whole vibe. π
Heads up tho β thecookieparameter must be the value that a successful call toBUS_SETUP_INTR(9)returned for the interruptirq. Like, no substitutes, no random pointers, no vibes-based cookies. π
Meanwhile bus_describe_intr() is just a cute little wrapper around BUS_DESCRIBE_INTR(). As a convenience (and honestly, a serve), bus_describe_intr() lets the caller build the description string using printf(9)-style formatting via fmt. π
Now here's the lore: when an interrupt handler gets established by BUS_SETUP_INTR(9), that handler is named after the device it's established for. That name then shows up in various places β like the interrupt statistics displayed by systat(1) and vmstat(8). π
For devices that use a single interrupt, the device name is already unique enough to identify the interrupt handler, no notes. But for devices that use multiple interrupts? bestie, it's lowkey useful to be able to tell those handlers apart. π So when a description is set for an active interrupt handler, a colon followed by the description gets appended to the device name to form the interrupt handler name. periodt. β¨
π RETURN VALUES π
Zero is returned on success. Otherwise, an appropriate error comes back at you. That's it, that's the deal. π
π SEE ALSO π
π HISTORY π
The BUS_DESCRIBE_INTR() method and the bus_describe_intr() functions first appeared in FreeBSD 8.1. throwback fr fr π«Ά
π BUGS π
It is not currently possible to remove a description from an active interrupt handler. So likeβ¦ choose your description wisely, because it's staying. no take-backsies. π
and that's the whole page, bestie!! π§ this lil writeup came from Debian, dated December 9, 2015, and it lives under the name BUS_DESCRIBE_INTR(9) πβ¨ mwah, go name some interrupts, ily π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2009 Hudson River Trading LLC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms