CONFIG_DEFER(9)

πŸ“¦ in nixpkgs unstable

πŸ’… CONFIG_DEFER(9) β€” Kernel Developer's Manual, bestie πŸ’–

okay so real talk, this is a page from the Kernel Developer's Manual, section 9 β€” aka the "kernel functions" section, iykyk. It's short and it's iconic and you're gonna get it in like thirty seconds, fr fr. πŸŽ€


✨ NAME ✨

config_defer, config_mountroot β€” deferred device configuration. like, "bestie, not yet, we'll configure you later" energy. πŸ¦‹


🌸 SYNOPSIS 🌸

first things first, you gotta pull in the headers:

#include <sys/param.h>
#include <sys/device.h>

then the two functions, and note that they both return void β€” no return value, no drama, they just do the thing:

void
config_defer(struct device *dev, void (*func)(struct device *));

void
config_mountroot(struct device *dev, void (*func)(struct device *));

πŸ”₯ DESCRIPTION πŸ”₯

πŸ’œ config_defer()

so config_defer() is the function the child calls when it wants to defer the rest of its configuration β€” like, pause the vibe check 🧚 β€” until all its parent devices have been attached. once every parent is attached, the function func gets called, with the argument dev. at that point the rest of the configuration can happen. slay. ✨

πŸ’œ config_mountroot()

and config_mountroot() is what a device driver calls to defer the remainder of its configuration until after the root file system is mounted. 🌈 once the root fs is mounted, func is called with the argument dev. that's it, that's the whole function, no cap. 🫢

ngl these are basically the "hold my spot, I'll be right back" functions of the kernel. main character energy, but politely waiting. πŸ‘‘

and that's the whole page bestie, you ate that πŸ’…

this little gem comes from Debian, dated June 13, 2025 β€” the CONFIG_DEFER(9) page, signing off. mwah. πŸ˜­πŸ’–

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms