get_tty_driver(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ get_tty_driver(9) πŸŽ€

Welcome to the Kernel API Manual, bestie! Today's main character is get_tty_driver(9), and she is here to find the device of a tty. Iconic behavior, honestly. πŸ’…βœ¨

🌸 NAME 🌸

get_tty_driver β€” find device of a tty. That's the whole job, no cap. 🫢

✨ SYNOPSIS ✨

struct tty_driver * get_tty_driver (dev_t device , int *index );

🫢 ARGUMENTS 🫢

  • device β€” device identifier. It's the thing that tells you which device we're talking about. πŸ’–
  • index β€” returns the index of the tty. She hands that index right back to you, periodt. πŸŽ€

πŸ’– DESCRIPTION πŸ’–

Okay so this routine returns a tty driver structure, given a device number, and also passes back the index number. That's it β€” that's the slay. 🌟

πŸ”’ Locking: caller must hold tty_mutex. This is not a vibe check, bestie β€” the caller must hold it, fr fr.

🌈 SEE ALSO 🌈

Kernel file: ./drivers/tty/tty_io.c. The whole see-also squad is here, and yes they all showed up: πŸ¦‹


Signing off from ./drivers/tty β€” October 2026, get_tty_driver(9) edition. Stay hydrated and hold that tty_mutex, bestie. πŸ’–βœ¨

πŸ“¦ where this page comes from