BUS_CHILD_DELETED(9)
π BUS_CHILD_DELETED π
okay bestie, gather round, because today we're talking about the Kernel Developer's Manual page for BUS_CHILD_DELETED(9) β yes it's giving niche, yes it's giving kernel internals, and yes you're gonna understand it, periodt. π
β¨ NAME β¨
BUS_CHILD_DELETED β notify a bus device that a child is being deleted π¦
no cap, that's literally the whole vibe. a child device is getting yeeted, and the bus needs to know about it.
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/bus.h>
void
BUS_CHILD_DELETED(device_t dev, device_t child);
so you pull in those two headers like the icon you are, and then there's this function signature. two device_t args, dev and child, returns void β meaning it's not handing you anything back, it's just doing its thing and dipping. π
β¨ DESCRIPTION β¨
so here's the tea. π The BUS_CHILD_DELETED() method gets invoked by the new-bus framework when a device is deleted. that's it, that's the moment, the framework is like "hey, this device is gone now" and it calls this method.
and why would a bus driver care? because a bus driver can provide an implementation of this method to release bus-specific resources that are associated with a device β think stuff like instance variables. π§ so basically it's your cleanup moment, your little goodbye ritual, the part where you let go of everything that was tied to that child device.
ngl if you're writing a bus driver and you've got stuff hanging off a device that needs tidying up when it's deleted, this is your girl. π«Ά
β¨ SEE ALSO β¨
BUS_ADD_CHILD(9)β the other half of the story, the arrival not the departure πdevice(9)β the whole device concept, go read it, it's lowkey important
β¨ HISTORY β¨
The BUS_CHILD_DELETED() method first appeared in FreeBSD 10.0. so it's been around a minute, and it's still serving. π₯
and that's the whole page, bestie β you ate, you understood kernel bus callbacks, main character energy fr fr. πβ¨
this page came to you from Debian, dated August 21, 2012, filed under BUS_CHILD_DELETED(9) β mwah, take care of her. ππΈ
π¦ 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) 2012 Hudson River Trading LLC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms