tty_poll(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_poll β€” check tty status πŸ’…

okay so this is tty_poll from the Kernel API Manual (section 9, kernel-functions land, iykyk) and honestly? she's a little delegator and I respect it.


✨ SYNOPSIS ✨

__poll_t tty_poll (struct file *filp , poll_table *wait );

like, that's the whole vibe. cute. short. to the point. periodt πŸŽ€


🫢 ARGUMENTS 🫢

  • filp β€” the struct file that's being polled, aka the file in question, the main character of this operation πŸ‘‘
  • wait β€” the poll wait structures you're updating. yes bestie you're updating them, that's the job 🌸

πŸ’– DESCRIPTION πŸ’–

So what does she actually do? She calls the line discipline polling method to obtain the poll status of the device. That's it. That's the whole thing. She's the middleman and she's slaying at it πŸ’…βœ¨

Locking: she locks the called line discipline, but β€” and this is the important bit, ngl β€” the ldisc poll method may be re-entered freely by other callers. no cap. so don't go thinking you've got some exclusive little lock situation going on here, because you do not πŸ”₯


🌈 SEE ALSO 🌈

the whole friend group 🫢 all of these live in the Kernel file ./drivers/tty/tty_io.c:

like I said. the whole friend group. go say hi πŸ’œ


and that's the page!! brought to you by ./drivers/tty, dated October 2026, filed under tty_poll(9) β€” mwah, stan, bye πŸ¦‹πŸ’–πŸŽ€

πŸ“¦ where this page comes from