GONE_IN(9)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 14.5, freebsd 15.1

πŸ’… GONE_IN(9) β€” the deprecation-notice girlies

ok so this page is from the Kernel Developer's Manual (section 9, kernel stuff, iykyk) and it's about gone_in and gone_in_dev β€” the two functions that let the kernel be like "bestie this thing is so over" before a feature gets yeeted. 🫢


✨ NAME ✨

gone_in, gone_in_dev β€” the deprecation notice functions, aka the ones that announce a thing is leaving πŸ’€


πŸŽ€ SYNOPSIS πŸŽ€

#include <sys/systm.h>

void
gone_in(int major, const char *msg);

void
gone_in_dev(device_t dev, int major, const char *msg);

like, that's the whole vibe. two functions, one header, no notes. ✨


🌸 DESCRIPTION 🌸

okay so gone_in() (the family, both of them) exists to give everyone a heads up that the kernel is currently using a driver or some other functionality that is deprecated and is gonna get removed in a future FreeBSD release. not me being dramatic, it's literally in the source. πŸ™ˆ

the notice gets sent to the kernel dmesg(8) log and it shows up on the console. so everybody sees it. no hiding. main character energy fr.

the major argument is the major version of the FreeBSD release that's gonna remove the deprecated functionality β€” that's the deadline, bestie. mark your calendar. πŸ—“οΈ

here's the part where the wording changes, and it's lowkey iconic:

  • in releases before major, the deprecation notice says β€œDeprecated code (to be removed in FreeBSD major): *msg*” β€” a gentle heads up 🌈
  • in releases equal to and after major, the notice says β€œObsolete code will be removed soon: *msg*” β€” that's the glow-up to full chaos mode πŸ’€πŸ”₯

same functions, different energy depending on what release you're on. the vibe check is real.


πŸ¦‹ EXAMPLES πŸ¦‹

here's how it actually looks in the wild, slay:

void
sample_init(void)
{
        /* Initialization code omitted. */

        gone_in(14, "Giant-locked filesystem");
}

int
example_driver_attach(struct example_driver_softc *sc)
{
        /* Attach code omitted. */

        gone_in_dev(sc->dev, 14, "Giant-locked driver");
}

see how gone_in just takes the version and a message, and gone_in_dev also gets handed the device_t dev? yeah. that's the whole difference. πŸ’…


πŸ‘‘ HISTORY πŸ‘‘

the gone_in functions first appeared in FreeBSD 11. iconic behavior since day one. ⭐


ngl if you're writing kernel code and you're still using something deprecated, drop a gone_in in there so nobody gets jump-scared later. considerate queen behavior. 🧚

ok that's the whole page, no cap πŸ’– this beauty came from the Debian rendering, dated August 16, 2021 β€” mwah, thanks for reading bestie, go write some deprecation notices πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from