n_tty_poll(9)
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:
n_tty_kick_worker(9)n_tty_write_wakeup(9)put_tty_queue(9)reset_buffer_flags(9)n_tty_flush_buffer(9)is_utf8_continuation(9)is_continuation(9)do_output_char(9)process_output(9)process_output_block(9)__process_echoes(9)add_echo_byte(9)echo_move_back_col(9)echo_set_canon_col(9)echo_erase_tab(9)echo_char_raw(9)echo_char(9)finish_erasing(9)eraser(9)isig(9)n_tty_receive_break(9)n_tty_receive_overrun(9)n_tty_receive_parity_error(9)n_tty_receive_char_flow_ctrl(9)n_tty_receive_char(9)n_tty_receive_buf_common(9)n_tty_set_termios(9)n_tty_close(9)n_tty_open(9)copy_from_read_buf(9)canon_copy_from_read_buf(9)job_control(9)n_tty_read(9)n_tty_write(9)n_tty_inherit_ops(9)
Source/version vibes: ./drivers/tty Β· October 2026 Β· n_tty_poll(9) π byeee bestie, go poll responsibly β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms