CONFIG_DEFER(9)
π 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
- Copyright (c) 2001 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms