n_tty_poll(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

n_tty_poll(9) β€” poll method for N_TTY, from the Kernel API Manual ✨

🌸 NAME 🌸

n_tty_poll β€” the poll method for N_TTY, periodt. πŸ’… This is the function that shows up when the line discipline needs its poll moment, and yes bestie, we’re in the Kernel API Manual now. πŸŽ€

✨ SYNOPSIS ✨

Okay so the signature is giving exactly this, no cap:

__poll_t n_tty_poll (struct tty_struct *tty , struct file *file ,
       poll_table *wait );

πŸŽ€ ARGUMENTS πŸŽ€

  • tty β€” the terminal device, aka the main character of this call πŸ–₯οΈπŸ’–
  • file β€” the file that’s accessing it, no cap πŸ“
  • wait β€” the poll table, literally the waiting room 🧾✨

πŸ’œ DESCRIPTION πŸ’œ

Okay so picture this: the line discipline gets asked to poll for data or for special events, and this function is the one that answers the call. ✨

Important caveat, bestie: this code is not serialized with respect to other events save open/close. Open/close is the only exception, so don’t assume everything is out here neatly taking turns. 😭

And this code must be sure never to sleep through a hangup β€” like, never ever, not even a little nap. πŸ’€ That’s the whole vibe: no sleeping through a hangup, fr fr.

Locking: called without the kernel lock held -- fine. Slay. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/tty/n_tty.c is the source spot, and here’s the entire squad β€” every single reference, no skips, iykyk:


Source/version vibes: ./drivers/tty Β· October 2026 Β· n_tty_poll(9) πŸ’– byeee bestie, go poll responsibly ✨

πŸ“¦ where this page comes from