tty_unregister_ldisc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– tty_unregister_ldisc(9) β€” straight from the Kernel API Manual πŸ’–

okay bestie, this is the manual page for tty_unregister_ldisc(9), and it is lowkey serving kernel-internals realness ✨


🌸 NAME 🌸

tty_unregister_ldisc β€” unload a line discipline πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void tty_unregister_ldisc (const struct tty_ldisc_ops *ldisc );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ldisc β€” ldisc number. that's it, that's the arg 🫢

✨ DESCRIPTION ✨

so this function removes a line discipline from the kernel β€” but only providing it is not currently in use. periodt πŸ’…

🚨 bestie caveat: if it is currently in use, that's a no-go. the "providing it is not currently in use" part is doing a lot of work here.

Locking: takes tty_ldiscs_lock to guard against ldisc races πŸ”’ no cap, that lock is there to keep the ldisc situation from getting messy.


🌈 SEE ALSO 🌈

Kernel file ./drivers/tty/tty_ldisc.c is the spot, and here's the whole friend group πŸ’–


πŸ’Œ from ./drivers/tty, dated October 2026 β€” that's the whole page, bestie, mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from